Documentation

API Reference

Complete API reference for sending messages, managing routes, and handling delivery signals.

Base URL

https://api.trustrouter.ai

Authentication

All requests require a bearer token in the Authorization header:

Authorization: Bearer tr_live_xxxxxxxxxxxx

Endpoints

POST/v1/messagesSend a message (SMS, WhatsApp, Viber, RCS)
GET/v1/messages/:idGet message status and delivery details
GET/v1/routesList available routes for a destination
POST/v1/policiesCreate or update a routing policy
GET/v1/analyticsQuery delivery analytics and metrics

Request example

{
  "to": "+447500000000",
  "channel": "sms",
  "content": {
    "text": "Your verification code is 123456"
  },
  "routing": {
    "mode": "policy",
    "policy_id": "otp-low-latency"
  },
  "webhook_url": "https://your-app.com/webhooks/dlr"
}

Response example

{
  "id": "msg_abc123xyz",
  "status": "accepted",
  "route": {
    "provider": "infobip",
    "type": "direct",
    "destination": "CY-Orange"
  },
  "cost": {
    "amount": 0.012,
    "currency": "USD"
  }
}

Rate limits

Default rate limit: 100 requests/second. Contact support for higher limits. Rate limit headers are included in all responses.