Transactional Messaging

Ashley Parks -

POST /api/v2/transactional_messages 

Parameters

Name

Description

transactional_message[number]

Phone number (required)

transactional_message[content]

Message content (required)

transactional_message[webhook_callback_url]

Webhook callback URL (optional)

transactional_message[is_mms]

 Send MMS? set to true (optional)

transactional_message[subject]

 MMS Subject (optional)

transactional_message[attachment_id]

MMS Attachment ID (integer) (required if is_mms) 

transactional_message[fallback_content]

MMS Fallback SMS Content  (required if is_mms)

 

NOTE: You will get 2 types of webhooks when sending transactional message

- Delivery status: https://gist.github.com/CodingFu/1e682a5960d3def2423ceb1aaac2b0bb

- Reply: https://gist.github.com/CodingFu/3e0c8b81514ebd92aadf77bbf156c89a

 

Request

Route

POST /api/v2/transactional_messages

Body

{"transactional_message":{"number":"3015550127","content":"Test me!"}}

cURL

curl "https://app.tatango.com/api/v2/transactional_messages" -d '{"transactional_message":{"number":"3015550127","content":"Test me!"}}' -X POST \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-u tatango:tatango_key_Skd1jbmGJXEbiZxsMnZHjg \
-H "Host: example.org" \
-H "Cookie: "

 

Response

Status

201 Created

Body

{"status":"Message successfully sent.","transactional_message":{"id":1,"number":"3015550127","content":"Test me!","status":"pending"}}

Notes

  • If a phone number responds to a transactional message, with a HELP or STOP command, Tatango will process that message, and send back a system response message to that phone number. The HELP or STOP command is not considered a reply to a transactional message, so Tatango will not send the HELP or STOP command via the webhook callback URL.
  • If a phone number has responded with a STOP command to your short code, you will not be able to message that phone number via the transactional API. To unblock a phone number, contact Tatango support.

Error Messages

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.