The SMS Works API
  1. auth
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. auth

/auth/token

POST
/auth/token
auth
Generates a JSON Web Token for including in the Authorization header of all your calls to the API. This only needs to be done once. Generate the customer ID, API Key & Secret required for this call from the API Key tab your account page.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.thesmsworks.co.uk/v1/auth/token' \
--header 'Content-Type: application/json' \
--data-raw '{
    "customerid": "string",
    "key": "string",
    "secret": "string"
}'
Response Response Example
200 - Example 1
{
    "token": "JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJPbmxpbmUgSldUIEJ1aWxkZXIiLCJpYXQiOjE1MDA0OTU2NjEsImV4cCI6MTUzMjAzMTY2MSwiYXVkIjoid3d3LmV4YW1wbGUuY29tIiwic3ViIjoianJvY2tldEBleGFtcGxlLmNvbSIsIkdpdmVuTmFtZSI6IkpvaG5ueSIsIlN1cm5hbWUiOiJSb2NrZXQiLCJFbWFpbCI6Impyb2NrZXRAZXhhbXBsZS5jb20iLCJSb2xlIjpbIk1hbmFnZXIiLCJQcm9qZWN0IEFkbWluaXN0cmF0b3IiXX0.BR1BIDy0Mw3R4ilfqAojsnh7bp_pgeX2jfjhhZyaexQ"
}

Request

Body Params application/json
authorisation object
customerid
string 
optional
Your customer ID, available from your account area at https://thesmsworks.co.uk/user/login
key
string 
optional
API Key, available from your account area at https://thesmsworks.co.uk/user/login
secret
string 
optional
API Secret, available from your account area at https://thesmsworks.co.uk/user/login
Examples

Responses

🟢200Success
application/json
Body
token
string 
required
Example:
JWT eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJPbmxpbmUgSldUIEJ1aWxkZXIiLCJpYXQiOjE1MDA0OTU2NjEsImV4cCI6MTUzMjAzMTY2MSwiYXVkIjoid3d3LmV4YW1wbGUuY29tIiwic3ViIjoianJvY2tldEBleGFtcGxlLmNvbSIsIkdpdmVuTmFtZSI6IkpvaG5ueSIsIlN1cm5hbWUiOiJSb2NrZXQiLCJFbWFpbCI6Impyb2NrZXRAZXhhbXBsZS5jb20iLCJSb2xlIjpbIk1hbmFnZXIiLCJQcm9qZWN0IEFkbWluaXN0cmF0b3IiXX0.BR1BIDy0Mw3R4ilfqAojsnh7bp_pgeX2jfjhhZyaexQ
🔴500Error
Modified at 2022-09-11 19:34:57
Previous
/auth/getApiKey
Next
/batch/schedule
Built with