curl --request POST \
--url https://c3uezq47el.execute-api.us-west-2.amazonaws.com/main/integrations/developer/zapier/create-comment-action \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"developerProvider": "zapier",
"from": "<string>",
"id": "<string>",
"to": "<string>",
"mediaUrl": "<string>",
"mentions": [
"<string>"
],
"text": "<string>",
"userId": "<string>"
}
'import requests
url = "https://c3uezq47el.execute-api.us-west-2.amazonaws.com/main/integrations/developer/zapier/create-comment-action"
payload = {
"developerProvider": "zapier",
"from": "<string>",
"id": "<string>",
"to": "<string>",
"mediaUrl": "<string>",
"mentions": ["<string>"],
"text": "<string>",
"userId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
developerProvider: 'zapier',
from: '<string>',
id: '<string>',
to: '<string>',
mediaUrl: '<string>',
mentions: ['<string>'],
text: '<string>',
userId: '<string>'
})
};
fetch('https://c3uezq47el.execute-api.us-west-2.amazonaws.com/main/integrations/developer/zapier/create-comment-action', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://c3uezq47el.execute-api.us-west-2.amazonaws.com/main/integrations/developer/zapier/create-comment-action",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'developerProvider' => 'zapier',
'from' => '<string>',
'id' => '<string>',
'to' => '<string>',
'mediaUrl' => '<string>',
'mentions' => [
'<string>'
],
'text' => '<string>',
'userId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://c3uezq47el.execute-api.us-west-2.amazonaws.com/main/integrations/developer/zapier/create-comment-action"
payload := strings.NewReader("{\n \"developerProvider\": \"zapier\",\n \"from\": \"<string>\",\n \"id\": \"<string>\",\n \"to\": \"<string>\",\n \"mediaUrl\": \"<string>\",\n \"mentions\": [\n \"<string>\"\n ],\n \"text\": \"<string>\",\n \"userId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://c3uezq47el.execute-api.us-west-2.amazonaws.com/main/integrations/developer/zapier/create-comment-action")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"developerProvider\": \"zapier\",\n \"from\": \"<string>\",\n \"id\": \"<string>\",\n \"to\": \"<string>\",\n \"mediaUrl\": \"<string>\",\n \"mentions\": [\n \"<string>\"\n ],\n \"text\": \"<string>\",\n \"userId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://c3uezq47el.execute-api.us-west-2.amazonaws.com/main/integrations/developer/zapier/create-comment-action")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"developerProvider\": \"zapier\",\n \"from\": \"<string>\",\n \"id\": \"<string>\",\n \"to\": \"<string>\",\n \"mediaUrl\": \"<string>\",\n \"mentions\": [\n \"<string>\"\n ],\n \"text\": \"<string>\",\n \"userId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"conversationId": "<string>",
"id": "<string>",
"text": "<string>",
"workspaceId": "<string>"
}{
"error": "workspace not found"
}{
"error": "workspace not found"
}{
"error": "workspace not found"
}[
{
"field": "<string>",
"message": "<string>"
}
]{
"error": "workspace not found"
}Create a comment
Adds an internal comment to the conversation between from (a workspace outbound channel) and to (a contact). The comment author is the authenticated user; userId in the body is ignored.
curl --request POST \
--url https://c3uezq47el.execute-api.us-west-2.amazonaws.com/main/integrations/developer/zapier/create-comment-action \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"developerProvider": "zapier",
"from": "<string>",
"id": "<string>",
"to": "<string>",
"mediaUrl": "<string>",
"mentions": [
"<string>"
],
"text": "<string>",
"userId": "<string>"
}
'import requests
url = "https://c3uezq47el.execute-api.us-west-2.amazonaws.com/main/integrations/developer/zapier/create-comment-action"
payload = {
"developerProvider": "zapier",
"from": "<string>",
"id": "<string>",
"to": "<string>",
"mediaUrl": "<string>",
"mentions": ["<string>"],
"text": "<string>",
"userId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
developerProvider: 'zapier',
from: '<string>',
id: '<string>',
to: '<string>',
mediaUrl: '<string>',
mentions: ['<string>'],
text: '<string>',
userId: '<string>'
})
};
fetch('https://c3uezq47el.execute-api.us-west-2.amazonaws.com/main/integrations/developer/zapier/create-comment-action', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://c3uezq47el.execute-api.us-west-2.amazonaws.com/main/integrations/developer/zapier/create-comment-action",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'developerProvider' => 'zapier',
'from' => '<string>',
'id' => '<string>',
'to' => '<string>',
'mediaUrl' => '<string>',
'mentions' => [
'<string>'
],
'text' => '<string>',
'userId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://c3uezq47el.execute-api.us-west-2.amazonaws.com/main/integrations/developer/zapier/create-comment-action"
payload := strings.NewReader("{\n \"developerProvider\": \"zapier\",\n \"from\": \"<string>\",\n \"id\": \"<string>\",\n \"to\": \"<string>\",\n \"mediaUrl\": \"<string>\",\n \"mentions\": [\n \"<string>\"\n ],\n \"text\": \"<string>\",\n \"userId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://c3uezq47el.execute-api.us-west-2.amazonaws.com/main/integrations/developer/zapier/create-comment-action")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"developerProvider\": \"zapier\",\n \"from\": \"<string>\",\n \"id\": \"<string>\",\n \"to\": \"<string>\",\n \"mediaUrl\": \"<string>\",\n \"mentions\": [\n \"<string>\"\n ],\n \"text\": \"<string>\",\n \"userId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://c3uezq47el.execute-api.us-west-2.amazonaws.com/main/integrations/developer/zapier/create-comment-action")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"developerProvider\": \"zapier\",\n \"from\": \"<string>\",\n \"id\": \"<string>\",\n \"to\": \"<string>\",\n \"mediaUrl\": \"<string>\",\n \"mentions\": [\n \"<string>\"\n ],\n \"text\": \"<string>\",\n \"userId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"conversationId": "<string>",
"id": "<string>",
"text": "<string>",
"workspaceId": "<string>"
}{
"error": "workspace not found"
}{
"error": "workspace not found"
}{
"error": "workspace not found"
}[
{
"field": "<string>",
"message": "<string>"
}
]{
"error": "workspace not found"
}Authorizations
An OAuth 2.0 access token, sent as Authorization: Bearer <token>. MessageDesk is the OAuth 2.0 provider (backed by AWS Cognito): an integration such as Zapier obtains the token through the authorization-code flow when a user connects their MessageDesk account. Access tokens are valid for 24 hours and are refreshed with the refresh token.
Body
Comment to create
Comment to create
Integration provider making the request
zapier Workspace phone number (outbound channel) in E.164 format
Workspace ID the request targets
45Contact phone number in E.164 format
Publicly reachable URL of an image or file to attach
User IDs to mention in the comment
Message text, up to 1200 characters
1200Optional acting user; overwritten with the authenticated user on endpoints that record authorship
45Was this page helpful?

