A JSON-based synchronous API designed for ease of use - send and receive SMS messages.
Back to API listBefore integrating, please consider the following:
Set up an API token under Profile → API Authentication. Use the right token for your needs and never share a private token with an end user. If you don't have credits yet, buy them from your account or by calling 0207 856 0422.
Requests go to https://api.datasoap.co.uk over SSL (port 443), as JSON, with your token in the auth header:
Authorization: Bearer f07772e880ae4789b5a964c91a151a...
/v1/sms/singleQueues a single message to be sent and returns an ID you can use to check deliverability later. You can only send from your approved SMS headers, and to numbers not in your associated unsubscribe group.
{"to": "07976123456","from": "DataSoap","message": "Hi John...... etc"}
{ "id": 1634215, "status": "Pending" }
Status is Pending or Failed on the initial request. If there's an error, it comes back in an errors field - see Errors below.
/v1/sms/status/{id}Get the current status of a message, to check its deliverability.
{ "id": "1634215", "status": "Delivered" }
/v1/sms/sentA paginated list of every message sent. All fields are optional filters - drop the ones you don't need.
{"pageSize": 10,"pageNumber": 1,"from": "No Reply","to": "07976123456","date": { "from": "2023-01-07T11:08:22.897Z", "to": "2024-12-07T11:08:22.897Z" }}
{"data": [{ "id": 1634215, "from": "DataSoap", "to": "+447976123456", "message": "Hi John...... etc", "sentOn": "2023-01-31T11:45:40.363" },{ "id": 1634214, "from": "NoReply", "to": "+447976123456", "message": "Your 2FA code is 123456", "sentOn": "2023-01-31T11:45:40.363" }]}
/v1/sms/receivedA paginated list of every message received - you'll need to buy a number from your account before you can start receiving messages. All fields are optional filters.
{"pageSize": 10,"pageNumber": 1,"from": "07976123456","to": "079761210023","date": { "from": "2023-01-07T11:08:22.897Z", "to": "2024-12-07T11:08:22.897Z" }}
{"data": [{ "id": 634215, "from": "+447976123456", "to": "+4479761210023", "message": "Hi, can I get a call back?", "receivedOn": "2023-01-30T09:45:04.133" }]}
If an error occurs, the response contains an errors field with the relevant detail:
{"errors": [{ "code": "-110", "message": "Invalid format, check your model is valid and numbers are in E164 format", "temporary": false }]}
The same infrastructure behind every endpoint on this page, in production today.