Developers

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. This applies to both single messages and to the batch methods, giving 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.

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 reply 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.

SMS Credits

A standard text message of up to 160 characters in length sent in the UK uses one SMS credit. Longer messages are split into to 153 character segments (with the remaining 7 characters being used to recombine the message on the device when it is delivered). Therefore, for a message of 307 characters in length, you will be charged 3 credits. You can use our message length calculator to work out how much you will be charged.

Messages that use non-standard unicode characters and emojis are limited to 70 characters, with longer messages being split into 67 character segments per SMS credit.

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.

The SMS Works offers several cost saving tools to help you limit unnecessary credit usage. These can be enabled in your SMS Works account.

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.

    JSON Web Token

  • 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"
      }'
© 2024 The SMS Works Ltd. All rights reserved.
Registered in England & Wales. Company Number 10663067. VAT Registration no. 273 8847 55.