Callbacks

Using callbacks

Callbacks can be added to a message by specifying the callback name within the request to the /messages endpoint. Any responses to the sent message are forwarded back to the URL within the callback named Sample Callback 1.

  • JSON
  • XML

Using callbacks

Callbacks can be added to messages by adding the callbackId parameter and the name of the callback as follows:

{{codeStart}}

HTTP 1.1 POST https://api.<region>.whispir.com/messages?apikey=[api_key]

Authorization: Basic am9obi5zbWl0aDpteXBhc3N3b3Jk

x-api-key: your_api_key

Content-Type: application/vnd.whispir.message-v1+json

{

"to" : "+1000000000",

"subject" : "Test SMS Message",

"body" : "This is the body of my test SMS message",

"callbackId" : "Sample Callback 1"

}

{{codeEnd}}