Api
SMS
Send Messages using SP Pay RESTful API.
Sending SMSs using the SP Pay is very easy. You only need to make a single call to submit an SMS for distribution.
Note: Before you can use any Sender ID i.e. what you put in the 'from' section of the API, you will need to submit and have it approved from the User Portal.
Send as SMS
POST - Send SMS
Send an SMS.
Endpoint
{{sppay-host}}/v1/api/sms/send
Request
{
"from" : "SP Pay",
"to" : [
"233271777557",
"233597018036"
],
"message": "Testing this works."
}
fromrequired
String
Approved Sender ID.
torequired
Array | String
Array of recipients in international number format without the +
.
messagerequired
String
Message to be sent.
Response
{
"rate": "0.060",
"currency": "GHS",
"messages": [
{
"recipient": "233271777557",
"message_id": 14,
"status_id": 2,
"status_message": "Submitted to queue for processing."
},
{
"recipient": "233597018036",
"message_id": 15,
"status_id": 2,
"status_message": "Submitted to queue for processing."
}
]
}
rate
String
Total cost charged for SMS request.
currency
String
Currency of amount charged.
messages
Array | Object
Array of message objects created.
recipient
String
Recipient number in internation format without the +
.
message_id
integer
ID of SMS created in system.
status_id
integer
Status ID of SMS in system.
status_message
String
Status message of SMS in system.