Messages

Retrieve a previously sent message

A call to GET /messages gives you the list of the last 20 sent messages. You can use pagination to retrieve further messages.

If a specific message has to be retrieved, you need to know the message ID. This can be done by retrieving the list of messages using GET /messages (include the workspace if needed) and then looping through them to get details of each message.

Note: GET /messages will only retrieve messages sent by you. But if you want to retrieve all the messages sent in the workspace (sent by others as well), append &viewType=shared to the URL query.

  • JSON
  • XML

{{codeStart}}

HTTP 1.1 GET https://api.<region>.whispir.com/messages/069BF68E5E0FE99B?apikey=[your_api_key]

Authorization: Basic <YOUR AUTH HEADER>

x-api-key: your_api_key

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

{

    "to" : "+1000000000",

    "subject" : "Test Message",

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

    "label" : "",

    "voice" : "",

    "web" : "",

    "from" : "",

    "direction" : "OUTGOING",

    "social" : "",

    "createdTime" : "1569303376000"

    "responseCount" : 0,

    ...

    "link": [

    {

  "uri": "https://api.<region>.whispir.com/messages/069BF68E5E0FE99B?apikey=[your-api-key]",

  "rel": "self",

  "method": "GET"

    }

  ]

}

{{codeEnd}}