Get inbound SMS messages
If for some reason you are unable to receive incoming SMS to the endpoint of your choice in real time, you can use this API call to fetch messages. Each request will return a batch of received messages - only once. The API request will only return new messages that arrived since the last API request.
Authorizations:
query Parameters
limit | integer <int32> Example: limit=2 Maximum number of messages to be returned in a response. If not set, the latest 50 records are returned. Maximum limit value is |
applicationId | string Example: applicationId=marketing-automation-application Application id that the message is linked to. For more details, see our documentation. |
entityId | string Example: entityId=promotional-traffic-entity Entity id that the message is linked to. For more details, see our documentation. |
campaignReferenceId | string Example: campaignReferenceId=summersale ID of a campaign that was sent in the message. |
Responses
successful response
Unauthorized
Forbidden
Error responses
Internal Server Error
Error responses
Request samples
- cURL
- Java
- C#
- Go
- Python
- PHP
- JavaScript
- NodeJs
- Ruby
curl -L -g 'https://{baseUrl}/sms/1/inbox/reports?limit=2&applicationId=marketing-automation-application&entityId=promotional-traffic-entity&campaignReferenceId=summersale' \ -H 'Authorization: {authorization}' \ -H 'Accept: application/json'
Response samples
- default
- 401
- 403
- 4XX
- 500
- 5XX
{- "results": [
- {
- "messageId": "817790313235066447",
- "from": "385916242493",
- "to": "385921004026",
- "text": "QUIZ Correct answer is Paris",
- "cleanText": "Correct answer is Paris",
- "keyword": "QUIZ",
- "receivedAt": "2019-11-09T16:00:00.000+0000",
- "smsCount": 1,
- "price": {
- "pricePerMessage": 0,
- "currency": "EUR"
}, - "callbackData": "callbackData"
}
], - "messageCount": 1,
- "pendingMessageCount": 0
}
Need assistance
Encountering issues
What's new? Check out
Unsure about a term? See