The SMS Works API
  1. batch messages
The SMS Works API
  • auth
    • /auth/getApiKey
      GET
    • /auth/token
      POST
  • batch messages
    • /batch/schedule
      POST
    • /batch/send
      POST
    • /batch/{batchid}
      GET
    • /batches/schedule/{batchid}
      DELETE
  • credits
    • /credits/balance
      GET
  • messages
    • /message/flash
      POST
    • /message/schedule
      POST
    • /message/send
      POST
    • /messages
      POST
    • /messages/failed
      POST
    • /messages/inbox
      POST
    • /messages/schedule/{messageid}
      DELETE
    • /messages/{messageid}
      DELETE
    • /messages/{messageid}
      GET
  • utils
    • /utils/errors/{errorcode}
      GET
    • /utils/test
      GET
  1. batch messages

/batch/schedule

POST
/batch/schedule
batch messages
Schedules a batch of SMS messages to be sent at the date time you specify
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.thesmsworks.co.uk/v1/batch/schedule' \
--header 'Content-Type: application/json' \
--data-raw '{
    "content": "My super awesome batch message",
    "deliveryreporturl": "http://your.domain.com/delivery/report/path",
    "destinations": [
        "447777777777",
        "447777777778",
        "447777777779"
    ],
    "schedule": "Wed Jul 19 2017 20:26:28 GMT+0100 (BST)",
    "sender": "YourCompany",
    "tag": "SummerSpecial",
    "ttl": 10
}'
Response Response Example
200 - Example 1
{
    "message": "string",
    "errorCode": 0,
    "permanent": true,
    "status": "string"
}

Request

Body Params application/json
SMS Message Batch
content
string 
required
Message to send to the recipient
Example:
My super awesome batch message
deliveryreporturl
string 
optional
The url to which we should POST delivery reports to for this message. If none is specified, we'll use the global delivery report URL that you've configured on your account page.
Example:
http://your.domain.com/delivery/report/path
destinations
array[string]
required
Telephone numbers of each of the recipients
Example:
["447777777777","447777777778","447777777779"]
schedule
string 
optional
Date-time at which to send the batch. This is only used by the batch/schedule service.
Example:
Wed Jul 19 2017 20:26:28 GMT+0100 (BST)
sender
string 
required
The sender of the message. Should be no longer than 11 characters for alphanumeric or 15 characters for numeric sender ID's. No spaces or special characters.
Example:
YourCompany
tag
string 
optional
An identifying label for the message, which you can use to filter and report on messages you've sent later. Ideal for campaigns. A maximum of 280 characters.
Example:
SummerSpecial
ttl
number 
optional
The number of minutes before the message is deleted. Optional. Omit to prevent delivery report deletion. Integer.
Example:
10
Examples

Responses

🟢200Error
application/json
Body
message
string 
required
errorCode
number 
required
Numeric code used to identify the error. Integer.
permanent
boolean 
optional
status
string 
required
🟢201Success
Modified at 2022-09-11 19:34:57
Previous
/auth/token
Next
/batch/send
Built with