Whispir Forums

New Features

RSS Feed

Message ID now returned as a header in the message response

  1. As of January 2013, all messages sent using the Whispir API will automatically return the location of the message in the message response.

    Previously when sending messages, only the status code of 202 Accepted was returned. For example

    HTTP 1.1 POST http://api.whispir.com/messages?apikey=<yourkey>
    Authorization: Basic am9obi5zbWl0aDpteXBhc3N3b3Jk
    Content-Type: application/vnd.whispir.message-v1+json
    Accept: application/vnd.whispir.message-v1+json
       "to" : "61400000000"
       "subject" : "Test SMS Message"
       "body" : "This is the body of my test SMS message"

    Would result in the response message:

    HTTP 1.1 202 Accepted
    Your message has been accepted for processing.

    Whispir will now automatically include the 'Location' header to advise where your application can find the newly created message.

    HTTP 1.1 202 Accepted
    Location: http://api.whispir.com/messages/ABD435DBFCD663DEDEFF?apikey=<yourkey>
    Your message has been accepted for processing.

    For more information on this feature please consult the documentation here or contact apisupport@whispir.com.

    Message edited by Jordan Walsh 5 years ago

[ Page 1 of 1 ]