Overview
Using the API
What our API is for and how to get the best out of it.
Our SMS API allows you to integrate reliable text messaging directly into your applications. There are several ways to integrate with The SMS Works to send and recieve messages. This overview will help you to decide on the best approach for each of your use-cases.
What to Send
You can send one message at a time (/message/send
) or batches of messages. There are two types of batches, which allow you to send either (1) the same message to lots of people (/batch/send
) or (2) a collection of unique messages personalised to your audience (/batch/any
).
Messages can be sent immediately from your application, or scheduled to go out at a specific date and time. That applies to single messages and to both of the batch methods. This gives you the flexibility to tailor the message and delivery to have the most impact.
How to Send Messages
We've provided cut-and-paste snippets of code that you can use in your applications to integrate our SMS sending capabilities. You can either call our end-points directly, or use one of our Software Development Kits (SDK's), for enhanced error handling and integration with your business logic. Samples are provided for each approach.
We also provide an Email 2 SMS service, which lets you integrate SMS elsewhere into your business processes in a simple way. To integrate with popular business applications with minimal coding we can also provide access to our Zapier app.
Charges
A standard text message of up to 160 characters in length sent in the UK uses one SMS credit. Longer messages, and messages that use non-standard unicode characters, will cost more than one credit to send.
Text messages sent to non-UK mobile numbers from the SMS Works platform will likely cost more than one credit per standard text message. This includes messages sent to the Isle of Man and the Channel Islands. You should review our international pricing if you intend to send messages overseas.
Tracking Delivery
When you send a message with our API, we'll respond with a confirmation that the message was sent, and a message ID. Whenever the status of the message is changed by the network we'll send you an up-to-date delivery report, with all of the details. You can register a webhook on your account page to receive these delivery reports into your application.
Getting Replies
We offer SMS Reply Numbers which allow your customers to send responses to your out-going messages. You can either set up webhooks to receive these responses, or we can forward them to your preferred email address. This makes it easy to keep the conversation going, in a way that suits your technology, people and processes.
Quick Start
Get up and running
- Set up a free SMS Works account
-
Sign in to your account and generate a JSON Web Token for authentication on the API Key tab, as shown below.
-
Once you have your Token and we've assigned your free test credits, you can send your first test message. There are three options:
- Install one of our SDK's
-
Make a regular HTTP POST to our https://api.thesmsworks.co.uk/v1/message/send end-point from your application, or using our ready-made Postman collection.
- Make a simple cURL request using the code snippet below, to send a test message.
curl --location --request POST 'https://api.thesmsworks.co.uk/v1/message/send' --header 'Content-Type: application/json' --header 'Authorization: Your JSON Web Token goes here' --data-raw '{ "sender": "TheSMSWorks", "destination": "44777777777", "content": "My super awesome message" }'