How to Send SMS
How to Send SMS Using Header Authorization

How to Send SMS Using Header Authorization

Send SMSes by making a HTTP GET request with the following:

Endpoint

https://api.smsleopard.com/v1/sms/send?message={intended_message}&destination={comma_separated_list}&source={sender_id}

Authorization

Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=

Code Examples

curl -u API_KEY:API_SECRET -X GET https://api.smsleopard.com/v1/sms/send?message=Get%20message&destination=+254700000001&source=sms_leopard

Parameters

  • message - The SMS you intend to send to the recipient. Should be URL encoded.
  • destination - The phone numbers to send SMS to e.g. 254700000001. Do not include the plus symbol in the country code. If sending the same message to multiple recipients, the numbers can be comma-separated list e.g. 254700000001,254700000002,254700000003
  • source - A Sender ID of your smsleopard business account. If you have not yet been assigned any, use SMS_Leopard for testing purposes. Click here (opens in a new tab) to learn more.
Example of a Successful Response

Status code: 201

{
	"success": true,
	"message": "Sent to 1/1. Cost KES 0.90",
	"recipients": [
		{
			"id": "eb4647b2-2695-4aba-958e-0b39d965f6d0",
			"cost": 0.9,
			"number": "+254700000000",
			"status": "queued"
		}
	]
}