Send SMS

POST /v1/messages sends to one number or up to 100. A 202 answer means Taysend accepted the send. Delivery comes later.

Request

Required: sender_id, plus to or recipients (1–100 numbers), plus message or template_id. sender_id is 3–11 characters.

Optional: type (otp, transactional, marketing, alert, service or unknown; transactional when left out), scheduled_at, variables, client_reference (up to 64 characters, returned on the message).

Delivery reports go to your webhook endpoints. A callback_url on the message is checked but not used today, and metadata is stored but not returned. Use GET /v1/lookup?to= for a prefix network estimate (not HLR).

POST https://api.taysend.com/v1/messages
Authorization: Bearer sms_test_...
Idempotency-Key: <a new UUID for each message>
Content-Type: application/json

{
  "to": "+233200000001",
  "sender_id": "TAYSEND",
  "message": "Your verification code is 482193",
  "type": "otp"
}

Response

A send answers 202 Accepted. Check for any 2xx, not for 200. The sender_id you send comes back as from. With recipients the answer is { count, data: [ …messages ] }.

POST /v1/messages202 Accepted
{
  "id": "msg_01hx...",
  "status": "QUEUED",
  "to": "+233200000001",
  "from": "TAYSEND",
  "segments": 1,
  "encoding": "GSM7",
  "category": "OTP",
  "environment": "TEST",
  "client_reference": null,
  "estimated_price": "0.050000",
  "currency": "GHS",
  "created_at": "2026-11-18T10:00:00.000Z"
}
QUEUED is acceptance. Open the message id, or wait for a webhook, for the delivery report.

Idempotency

Idempotency-Key is optional. Same Idempotency-Key + same body replays the original response and sends nothing new. Same key + different body returns 409 IDEMPOTENCY_CONFLICT. Use a new key for each message. Batch send is POST /v1/messages/batch, up to 100 messages.