API Docs

Send SMS

Send single or bulk SMS notifications to your recipients. The SMS API supports delivery confirmations, custom sender IDs, and multiple providers for reliable delivery.

Headers

  • Authorization: Bearer YOUR_API_KEY
  • Content-Type: application/json

Body Parameters

to_phone

Required - Phone number in international format (e.g., +263771234567). For bulk SMS, provide an array of phone numbers.

message

Required - The SMS message content (max 160 characters for single SMS).

sender_id

Optional - Custom sender ID (default: "PING"). Must be approved for custom sender IDs.

provider

Optional - SMS provider to use ("twilio", "africastalking"). System auto-selects if not specified.

Sample Requests

Send Single SMS

curl -X POST https://api.ping.co.zw/v1/notification/api/sms/send \
-H "Authorization: Bearer sk_test_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
  "to_phone": "+263771234567",
  "message": "Hello from Ping! Your verification code is 123456.",
  "sender_id": "PING"
}'

Sample Responses

Single SMS Success

{
  "result": "success",
  "message": "SMS sent successfully",
  "environment": "test",
  "details": {
    "status": "success",
    "message_sid": "SM1234567890abcdef",
    "provider": "twilio"
  }
}

SMS Character Limits

  • Single SMS: 160 characters (GSM 7-bit) or 70 characters (Unicode)
  • Concatenated SMS: Automatically splits longer messages
  • Cost: Each 160-character segment counts as one SMS

Next Steps