Message responses

Retrieve a message

The example request below returns the message that the API user requested:

GET /messages/069BF68E5E0FE99B?apikey=498nadsasdff09fewdsafjaa90f

Each of the URLs specified in the response can be accessed using the REL and appropriate METHOD to perform the specified functionality.

Rel attribute descriptions

self

Retrieves the current message.

summaryStatus

Returns the status information of the message as a messagestatus object, in a summary view.

detailedStatus

Returns the status information of the message as a messagestatus object, in a detailed view.

summaryResponses

Returns the response information of the message as a messageresponse object, in a summary view.

detailedResponses

Returns the response information of the message as a messageresponse object, in a detailed view.

summaryResponsesWithResponseRule

Returns the response information of the message as a messageresponse object, filtered by the response rule (if one was used) in a summary view.

detailedResponsesWithResponseRule

Returns the response information of the message as a messageresponse object, filtered by the response rule (if one was used) in a detailed view.

  • JSON
  • XML

Retrieve a message

Use the API to retrieve a sent message:

{{codeStart}}

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

Authorization: Basic am9obi5zbWl0aDpteXBhc3N3b3Jk

x-api-key: your_api_key

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

{

"to": "+1000000000",

"subject": "test subject",

"body": "test body",

"direction": "OUTGOING",

"responseCount": "0",

"createdTime": "1460070991",

"link": [{

"method": "GET",

"rel": "self",

"uri": "https://api.<region>.whispir.com/messages/069BF68E5E0FE99B?apikey=498nadsasdff09fewdsafjaa90f"

},{

"method": "GET",

"rel": "summaryStatus",

"uri": "https://api.<region>.whispir.com/messages/069BF68E5E0FE99B/messagestatus?view=summary&apikey=498nadsasdff09fewdsafjaa90f"

},{

"method": "GET",

"rel": "detailedStatus",

"uri": "https://api.<region>.whispir.com/messages/069BF68E5E0FE99B/messagestatus?view=detailed&apikey=498nadsasdff09fewdsafjaa90f"

},{

"method": "GET",

"rel": "summaryResponses",

"uri": "https://api.<region>.whispir.com/messages/069BF68E5E0FE99B/messageresponses?view=summary&filter=default&apikey=498nadsasdff09fewdsafjaa90f"

},{

"method": "GET",

"rel": "detailedResponses",

"uri": "https://api.<region>.whispir.com/messages/069BF68E5E0FE99B/messageresponses?view=detailed&filter=default&apikey=498nadsasdff09fewdsafjaa90f"

},{

"method": "GET",

"rel": "summaryResponsesWithResponseRule",

"uri": "https://api.<region>.whispir.com/messages/069BF68E5E0FE99B/messageresponses?view=summary&filter=responserule&apikey=498nadsasdff09fewdsafjaa90f"

},{

"method": "GET",

"rel": "detailedResponsesWithResponseRule",

"uri": "https://api.<region>.whispir.com/messages/069BF68E5E0FE99B/messageresponses?view=detailed&filter=responserule&apikey=498nadsasdff09fewdsafjaa90f"

}]

}

{{codeEnd}}