Introduction

Create a TEST key, POST to a simulated Ghana number, then GET the message id. LIVE uses the same states. HTTP 202 means we accepted the request. Delivery is a later report.

TEST keys

Shown once. They cannot send LIVE.

Ghana routes

Network from the prefix: MTN, Telecel, AT.

Idempotency

Same key and body returns the first response.

Message id

Poll GET /v1/messages/:id for the DLR.

Quick start

  1. 01

    Get API key

    Register, then mint sms_test_ in the console.

  2. 02

    Send a request

    POST /v1/messages with an Idempotency-Key.

  3. 03

    Check status

    GET /v1/messages/:id. QUEUED is not DELIVERED.

TEST sends are free: they go to the simulated route, never reach a phone, and nothing is taken from your wallet, so a new account can test straight away. LIVE sends need a topped-up wallet and an approved sender ID.

export TAYSEND_KEY=sms_test_your_key

curl -X POST "https://api.taysend.com/v1/messages" \
  -H "Authorization: Bearer $TAYSEND_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "+233200000001",
    "sender_id": "TAYSEND",
    "message": "Hello from Taysend",
    "type": "transactional"
  }'

Idempotency-Key is optional. Use a new one for each message.

Try it in the sandbox
Sample response202 Accepted
{
  "id": "msg_01hx...",
  "status": "QUEUED",
  "environment": "TEST",
  "to": "+233200000001",
  "from": "TAYSEND"
}
202 here is acceptance. Delivery waits on a DLR. The sender_id you send comes back as from.

Try the sandbox

Send from this page with no API key. Use your Ghana number for one real text a day, or a simulated number to force delivered, failed, expired, a network rejection, delayed, or timeout.

Sandbox

No API key. Your Ghana number gets one real text a day.

LIVE

One real SMS to this number per day. Sender Taysend.

18/143 characters. “Taysend sandbox: ” is added in front.

Response

{
  "id": "msg_…",
  "status": "QUEUED",
  "environment": "LIVE"
}

Simulated numbers

+233200000001delivered
+233200000002failed
+233200000003expired
+233200000004failed (rejected by the network)
+233200000005delayed (delivered after ~3s)
+233200000006timeout (UNSAFE_TO_RETRY, no failover)