How to Send SMS
How to Send SMS Using URL Params

How to Send SMS Using URL Parameters

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

Endpoint

https://api.smsleopard.com/v1/sms/send?username={account_id}&password={account_key}&message={intended_message}&destination={comma_seperated_list}&source={sender_id}

Code Examples

curl -u https://api.smsleopard.com/v1/sms/send?username=account_id&password=account_secret&message=test&destination=254700000001&source=smsleopard

Parameters

  • Username - This is the account id obtained by generating you API keys.
  • Password - This is the account secret obtained by generating you API keys.
  • Message - The message you intend to send to the recipient. Should be URL encoded.
  • Destination - Numbers to send to eg 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 eg. 254700000001, 254700000002, 254700000003
  • Source - Sender ID for the message.
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"
		}
	]
}