Send Broadcast Message

Ashley Parks -

POST /api/v2/lists/:list_id/messages

Parameters

Name Description
message[content] message content

Request

Headers

Accept: application/json
Content-Type: application/json
Authorization: Basic dGF0YW5nbzp0YXRhbmdvX2tleV9KTWc4UnlBV1VHU0FhTTlYLVgtc3dn

Host: example.org
Cookie: 

Route

POST /api/v2/lists/1/messages

Body

{"message":{"content":"Hello, world!"}}

cURL

curl "https://app.tatango.com/api/v2/lists/1/messages" -d '{"message":{"content":"Hello, world!"}}' -X POST \
	-H "Accept: application/json" \
	-H "Content-Type: application/json" \
	-u tatango:tatango_key_JMg8RyAWUGSAaM9X-X-swg \
	-H "Host: example.org" \
	-H "Cookie: "

Optional Parameters

  • To send the message to a single phone number, add the phone_number parameter:  
    {"message": {"content": "Hello, world!", phone_number: "9258642505"}}
  • To send the message to multiple phone numbers, add the phone_numbers parameter:  
    {"message": {"content": "Hello, world!", phone_numbers: ["9258642505", "3605551212"]}}
  • Note that all numbers passed via phone_number and phone_numbers must already be subscribed to the list in order to receive the message.

Response

Headers

Content-Type: application/json; charset=utf-8
X-Meta-Request-Version: 0.2.6
Content-Security-Policy: default-src https: 'self'; connect-src http: https: 'self' wss://*.intercom.io; img-src https: 'self'; script-src 'self' *.intercom.io *.intercomcdn.com 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; report-uri /uri-directive
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Frame-Options: SAMEORIGIN
X-Permitted-Cross-Domain-Policies: none
X-XSS-Protection: 1; mode=block
X-UA-Compatible: IE=Edge,chrome=1
ETag: "0e271c62c1b0765842a8eefb30091c19"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: 1e44abda5350bfb93260100029697db0
X-Runtime: 0.071095
Set-Cookie: __profilin=p%3Dt; path=/
Content-Length: 34

Status

201 Created

Body

{"status":"OK","message":{"id":1}}

Error Messages

{
“status”: “error”,
“error”: “Content is too long.”
}

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.