Developers

A messaging API you’ll finish integrating before your coffee cools.

REST + JSON, one header to authenticate, predictable errors, delivery webhooks and an interactive playground. SMPP available for high-throughput senders.

Open API reference Get an API key
node · send.js
const res = await fetch('https://tiansms.com/api/v1/sms/send', {
  method: 'POST',
  headers: { 'x-api-key': process.env.TIAN_KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({
    to: '+233241234567',
    message: 'Your Tian order #1042 has shipped.',
    sender_id: 'AFIAFASHION'
  })
});
const { data } = await res.json();
console.log(data.message_id, data.cost); // msg_7f3a… 0.045
Endpoints

Everything is under /api/v1

MethodEndpointWhat it does
POST/sms/sendSend one SMS. Supports Idempotency-Key.
POST/sms/bulkSend the same message to an array of numbers.
GET/sms/status/:message_idDelivery status, cost and timestamps.
POST/otp/send · /otp/verifyGenerate and check one-time passcodes.
GET/contacts · /contacts/:idManage your address book programmatically.
GET/account/balance · /account/usageWallet balance and 30-day usage stats.

Scoped API keys

Give each app only the scopes it needs (sms.send, otp.send, otp.verify), IP whitelist and daily spend caps.

Delivery webhooks

Receive signed delivery reports on your URL, with automatic retries if your server is down.

SMPP

Enterprise senders can bind over SMPP 3.4 for sustained high TPS with the same billing.

Playground

Try every endpoint from the browser with your key and see real responses before writing code.

Errors

Predictable responses

Every response has the same shape, so your error handling stays simple.

200 OK
{
  "success": true,
  "message": "SMS sent successfully",
  "data": { "message_id": "msg_7f3a…", "cost": 0.045, "message_count": 1 }
}
400 Bad Request
{
  "success": false,
  "message": "Insufficient balance"
}

Rate limit: 100 requests / 15 minutes per key by default (RateLimit-* headers included). Need more? Talk to us.

Ship it today

Create an account, generate a key and send a real SMS to your own phone in the playground.

Get API key