Sinch SMS API is one of the easiest APIs we offer and enables you to add fast and reliable global SMS to your applications. Send single messages, scheduled batch messages, use available message templates and more.
- List incoming messages
API Overview | Sinch (v1)
https://{region}.sms.api.sinch.com/
Delivery reports
The REST API uses message statuses and error codes in delivery reports, which refer to the state of the batch and can be present in either Retrieve a delivery report or sent as a callback.
Groups
A group is a set of phone numbers (or MSISDNs) that can be used as a target when sending an SMS. An phone number (MSISDN) can only occur once in a group and any attempts to add a duplicate are ignored but not rejected.
The REST API handles MO media messages by uploading them to specified s3 storage location and providing the URL to download the attachment. On a successful upload, the code will be 0. If the upload fails, the code will be a value other than 0.
| Status Code | Name | Status | Description |
|---|---|---|---|
| 0 | Uploaded | Uploaded | Attachment successfully uploaded to storage. |
| 1 | Internal failure | Failed | Internal exception happened during upload. |
| 2 | Bucket not found | Failed | Provisioned bucket doesn't exist. |
Your service plan ID. You can find this on your Dashboard.
Only list messages sent to this destination. Multiple phone numbers formatted as either E.164 or short codes can be comma separated.
Only list messages received at or after this date/time. Formatted as ISO-8601: YYYY-MM-DDThh:mm:ss.SSSZ.
Default: Now-24
Only list messages received before this date/time. Formatted as ISO-8601: YYYY-MM-DDThh:mm:ss.SSSZ.
Using a client reference in inbound messages requires additional setup on your account. Contact your account manager to enable this feature.
Only list inbound messages that are in response to messages with a previously provided client reference.
- Global API
https://us.sms.api.sinch.com/xms/v1/{service_plan_id}/inbounds
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://us.sms.api.sinch.com/xms/v1/jd63jf88477ll123ab4567cd89012ef3/inbounds?page=2&page_size=30&to=%2B14155553421%2C45607&start_date=2019-08-24T14%3A15%3A22Z&end_date=2016-10-02T09%3A34%3A18.542Z&client_reference=myReference' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'OK. A successful response , or an Error.
The page of inbounds matching the given filters.
{ "count": 2, "page": 0, "inbounds": [ { … } ], "page_size": 2 }
Your service plan ID. You can find this on your Dashboard.
- Global API
https://us.sms.api.sinch.com/xms/v1/{service_plan_id}/inbounds/{inbound_id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
https://us.sms.api.sinch.com/xms/v1/jd63jf88477ll123ab4567cd89012ef3/inbounds/01FC66621XXXXX119Z8PMV1QPA \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'OK. A successful response , or an Error.
When the system received the message.
Formatted as ISO-8601: YYYY-MM-DDThh:mm:ss.SSSZ.
The Sinch phone number or short code to which the message was sent.
If this inbound message is in response to a previously sent message that contained a client reference, then this field contains that client reference.
Utilizing this feature requires additional setup on your account. Contact your account manager to enable this feature.
When the message left the originating device. Only available if provided by operator.
Formatted as ISO-8601: YYYY-MM-DDThh:mm:ss.SSSZ.
{ "body": "Test message", "client_reference": "ABC123", "from": "+11203494390", "id": "01FC66621XXXXX119Z8PMV1QPA", "operator_id": "35000", "received_at": "2019-08-24T14:15:22Z", "sent_at": "2019-08-24T14:15:22Z", "to": "11203453453", "type": "mo_text" }
Request
An inbound message is a message sent to one of your short codes or long numbers from a mobile phone. To receive inbound message callbacks, a URL needs to be added to your REST API. This URL can be specified in your Dashboard.
The incoming message to your sinch number
When the system received the message.
Formatted as ISO-8601: YYYY-MM-DDThh:mm:ss.SSSZ.
The Sinch phone number or short code to which the message was sent.
If this inbound message is in response to a previously sent message that contained a client reference, then this field contains that client reference.
Utilizing this feature requires additional setup on your account. Contact your account manager to enable this feature.
When the message left the originating device. Only available if provided by operator.
Formatted as ISO-8601: YYYY-MM-DDThh:mm:ss.SSSZ.
- Global API
https://us.sms.api.sinch.com/incomingSMS
{ "body": "This is a test message.", "from": "16051234567", "id": "01XXXXX21XXXXX119Z8P1XXXXX", "operator_id": "string", "received_at": "2022-08-24 14:15:22+00:00", "sent_at": "2022-08-24 14:15:22+00:00", "to": "13185551234", "type": "mo_text" }