Logo

Getting Started

IntroductionAuthentication

OTP

POSTRequest OTPPOSTVerify OTPDELETERevoke OTPGETGet TokenGETGet OTP by Recipient

Texts

POSTSend SMSSMS Final Status CodesSMS Character Sets

Lists

GETGet contact listGETGet rowPOSTCreate rowPATCHUpdate rowDELETEDelete row
Logo
DocumentationAPI ReferenceChangelog

Texts

Send SMS

Send an SMS message to one or more recipients

Request

curl -X POST "https://api.simpu.co/sms/send" \
  -H "Content-Type: application/json" \
  -d '{
    "channel": "sms",
    "recipients": "2348023456789, 2348098765432",
    "sender_id": "Simpu",
    "content": "Hello! World. This is a test message.",
    "template_id": "674535b2b39158b9aae90188fcec23eb",
    "personalisation": [
      {
        "to": "2348023456789",
        "substitutions": {
          "name": "John Doe"
        }
      }
    ],
    "external_ref": "674535b2b39158b9aae90188fcec23eb",
    "is_trackable": false,
    "callback": "https://example.com/sms/delivery_report"
  }'

Response

{
  "id": "674535b2b39158b9aae90188fcec23eb",
  "recipients": [
    "2348023456789"
  ],
  "sender_id": "Simpu",
  "is_trackable": false,
  "content": "Hello! World. This is a test message.",
  "external_ref": "674535b2b39158b9aae90188fcec23eb",
  "callback": "https://example.com/sms/delivery_report",
  "template_id": "674535b2b39158b9aae90188fcec23eb",
  "personalisation": [
    {
      "to": "2348023456789",
      "substitutions": {
        "name": "John Doe"
      }
    }
  ],
  "created_datetime": "2024-06-28T23:56:38.128604+00:00",
  "updated_datetime": "2024-06-28T23:56:38.128604+00:00",
  "meta": {
    "method": "POST",
    "resource": "/send/sms",
    "estimate": {
      "available_balance": 1000.5,
      "charge": 3,
      "encoding": "UTF-8",
      "message_length": 160,
      "pages": 1
    }
  }
}
POST

/sms/send

Request Body

application/json

SMS message object

channel
string
Channel to send the SMS message
Allowed values: "sms" | "whatsapp"
Example: "sms"
recipients
stringrequired
Recipients of the SMS message, comma separated list of phone numbers
Example: "2348023456789, 2348098765432"
sender_id
stringrequired
Sender ID of the SMS message
Required range: x <= 11
Example: "Simpu"
content
string
Content of the SMS message, this is required if a template ID is not specified
Example: "Hello! World. This is a test message."
template_id
string
Template ID of the SMS message, this is required if content is not specified
Example: "674535b2b39158b9aae90188fcec23eb"
personalisation
object[]
Personalisation of the SMS message, this is applicable if a template ID is specified
to
stringrequired
Recipient of the personalisation
Example: "2348023456789"
substitutions
objectrequired
Substitutions of the personalisation
Example: {"name":"John Doe"}
external_ref
string
This is a reference to the message in your system
Example: "674535b2b39158b9aae90188fcec23eb"
is_trackable
booleandefault: false
This determines if links in the message should be tracked, links in the message will be replaced with trackable links
Example: false
callback
string
This is the URL to receive delivery reports for the message `test`
Example: "https://example.com/sms/delivery_report"

Response

application/json

SMS response

id
stringrequired
Unique ID of the SMS message
Example: "674535b2b39158b9aae90188fcec23eb"
recipients
arrayrequired
Recipients of the SMS message
Example: ["2348023456789"]
sender_id
stringrequired
Sender ID of the SMS message
Required range: x <= 11
Example: "Simpu"
is_trackable
booleanrequired
This determines if links in the message should be tracked
Example: false
content
string
Content of the SMS message
Example: "Hello! World. This is a test message."
external_ref
string
This is a reference to the message in your system
Example: "674535b2b39158b9aae90188fcec23eb"
callback
string
This is the URL to receive delivery reports for the message
Example: "https://example.com/sms/delivery_report"
template_id
string
Template ID of the SMS message
Example: "674535b2b39158b9aae90188fcec23eb"
personalisation
object[]
Personalisation of the SMS message
to
stringrequired
Recipient of the personalisation
Example: "2348023456789"
substitutions
objectrequired
Substitutions of the personalisation
Example: {"name":"John Doe"}
created_datetime
string
Date and time the SMS was created
Example: "2024-06-28T23:56:38.128604+00:00"
updated_datetime
string
Date and time the SMS token was last updated, if any
Example: "2024-06-28T23:56:38.128604+00:00"
meta
object
No description provided
method
stringrequired
The HTTP method used to make the request
Example: "POST"
resource
stringrequired
The resource requested
Example: "/send/sms"
estimate
object
No description provided
available_balance
numberrequired
Available balance for the request
Example: 1000.5
charge
numberrequired
Charge for the request
Example: 3
encoding
stringrequired
Encoding of the message
Allowed values: "GSM" | "UCS-2"
Example: "UTF-8"
message_length
numberrequired
Length of the message
Example: 160
pages
numberrequired
Number of pages for the message
Example: 1

Built with Chakra UI

Request

curl -X POST "https://api.simpu.co/sms/send" \
  -H "Content-Type: application/json" \
  -d '{
    "channel": "sms",
    "recipients": "2348023456789, 2348098765432",
    "sender_id": "Simpu",
    "content": "Hello! World. This is a test message.",
    "template_id": "674535b2b39158b9aae90188fcec23eb",
    "personalisation": [
      {
        "to": "2348023456789",
        "substitutions": {
          "name": "John Doe"
        }
      }
    ],
    "external_ref": "674535b2b39158b9aae90188fcec23eb",
    "is_trackable": false,
    "callback": "https://example.com/sms/delivery_report"
  }'

Response

{
  "id": "674535b2b39158b9aae90188fcec23eb",
  "recipients": [
    "2348023456789"
  ],
  "sender_id": "Simpu",
  "is_trackable": false,
  "content": "Hello! World. This is a test message.",
  "external_ref": "674535b2b39158b9aae90188fcec23eb",
  "callback": "https://example.com/sms/delivery_report",
  "template_id": "674535b2b39158b9aae90188fcec23eb",
  "personalisation": [
    {
      "to": "2348023456789",
      "substitutions": {
        "name": "John Doe"
      }
    }
  ],
  "created_datetime": "2024-06-28T23:56:38.128604+00:00",
  "updated_datetime": "2024-06-28T23:56:38.128604+00:00",
  "meta": {
    "method": "POST",
    "resource": "/send/sms",
    "estimate": {
      "available_balance": 1000.5,
      "charge": 3,
      "encoding": "UTF-8",
      "message_length": 160,
      "pages": 1
    }
  }
}