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/{batchid}

GET
/batch/{batchid}
batch messages
Retrieve all messages in a batch with the given batch ID
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://api.thesmsworks.co.uk/v1/batch/'
Response Response Example
200 - Example 1
[
    {
        "batchid": "2586749",
        "content": "My super awesome message",
        "created": "Wed Jul 19 2017 20:53:46 GMT+0100 (BST)",
        "customerid": "0fca8c3c-6cbc-11e7-8154-a6006ad3dba0",
        "deliveryreporturl": "https://your.domain.com/delivery/report/path",
        "destination": "447777777777",
        "failurereason": {
            "code": 34,
            "details": "Handset error",
            "permanent": false
        },
        "id": 123456789,
        "identifier": 7777777777,
        "keyword": "CALRISSIAN",
        "messageid": 123456789,
        "modified": "Wed Jul 19 2017 20:53:49 GMT+0100 (BST)",
        "schedule": "Wed Jul 19 2017 20:53:45 GMT+0100 (BST)",
        "sender": "YourCompany",
        "status": "DELIVERED",
        "tag": "campaign2"
    }
]

Request

Path Params
batchid
string 
required
The ID of the batch you would like returned

Responses

🟢200Success
application/json
Body
array of:
batchid
string 
optional
Example:
2586749
content
string 
required
Example:
My super awesome message
created
string 
required
Example:
Wed Jul 19 2017 20:53:46 GMT+0100 (BST)
customerid
string 
required
Example:
0fca8c3c-6cbc-11e7-8154-a6006ad3dba0
deliveryreporturl
string 
optional
Example:
https://your.domain.com/delivery/report/path
destination
number 
required
Example:
447777777777
failurereason
object 
optional
code
number 
optional
Numeric code that defines the error. Integer.
Example:
34
details
string 
optional
Example:
Handset error
permanent
boolean 
optional
Example:
false
id
string 
optional
Example:
123456789
identifier
string 
optional
Example:
7777777777
keyword
string 
optional
Example:
CALRISSIAN
messageid
string 
required
Example:
123456789
modified
string 
required
Example:
Wed Jul 19 2017 20:53:49 GMT+0100 (BST)
schedule
string 
required
Example:
Wed Jul 19 2017 20:53:45 GMT+0100 (BST)
sender
string 
required
Example:
YourCompany
status
string 
required
Example:
DELIVERED
tag
string 
required
Example:
campaign2
🟠404Error
🔴500Error
Modified at 2022-09-11 19:34:57
Previous
/batch/send
Next
/batches/schedule/{batchid}
Built with