Developer Documentation

Build SMS workflows with the TSCONECT API.

Send Bulky SMS, OTPs, alerts, and transactional messages from your applications with REST endpoints, delivery callbacks, and secure API keys.

POST https://api.tsconect.com/v1/messages/send
{
  "sender": "TSCONECT",
  "to": "+254700000000",
  "message": "Your code is 847291"
}
202 Accepted message queued
Base URL
Production

All requests are sent over HTTPS. Use JSON request bodies and expect JSON responses.

https://api.tsconect.com/v1
Authentication and API Keys

Authenticate every request with a bearer token generated from your TSCONECT dashboard. Keep keys private and rotate them when team access changes.

Authorization: Bearer ts_live_xxxxxxxxxxxxxxxxx
Content-Type: application/json
Live KeyProduction trafficUse for real SMS delivery.
Test KeySandbox trafficUse for integration testing.
RotateAccess controlDisable old keys immediately.
Send Single SMS
POST
POST /messages/send
ParameterTypeRequiredDescription
senderstringYesApproved sender ID.
tostringYesRecipient phone number in international format.
messagestringYesSMS body, up to multipart SMS limits.
callback_urlstringNoWebhook URL for delivery updates.
{
  "sender": "TSCONECT",
  "to": "+254700000000",
  "message": "Your OTP is 847291.",
  "callback_url": "https://example.com/sms/callback"
}
{
  "message_id": "msg_01HX92",
  "status": "queued",
  "parts": 1,
  "cost_units": 1
}
Bulk Send
POST

Use the bulk endpoint when sending the same campaign to multiple recipients or when merging template variables per contact.

POST /messages/bulk
{
  "sender": "TSCONECT",
  "template": "Hi {name}, your appointment is {date}.",
  "recipients": [
    { "to": "+254700000001", "name": "Jane", "date": "Friday" }
  ]
}
Message Status Lookup
GET
GET /messages/{message_id}
{
  "message_id": "msg_01HX92",
  "status": "delivered",
  "delivered_at": "2026-04-28T09:14:00Z"
}
Delivery Callbacks

Set a callback URL to receive delivery updates. Your endpoint should return a 2xx response quickly.

{
  "event": "message.delivered",
  "message_id": "msg_01HX92",
  "to": "+254700000000",
  "status": "delivered",
  "timestamp": "2026-04-28T09:14:00Z"
}
Errors
CodeStatusMeaningResolution
400Bad RequestInvalid payload or missing field.Check required parameters.
401UnauthorizedMissing or invalid API key.Verify bearer token.
402Insufficient CreditsAccount has no SMS units.Top up your account.
429Rate LimitedToo many requests.Retry with backoff.
500Server ErrorTemporary platform issue.Retry or contact support.