Skip to main content
The Routa API is REST over HTTPS, with JSON requests and responses and key authentication in the Bearer scheme. This page gathers the rules shared by every endpoint. Each endpoint has its own page, with parameters, examples and a playground to try calls. The full OpenAPI specification is in openapi.json.

Base URL

Every public endpoint is under the /v1 prefix. The API key, not the URL, defines the environment (live or test). See Environments.
The API does not set CORS headers. Always call it from your server and never from a browser or an app, so you do not expose your key.

Authentication

Send your API key in the Authorization header:
Each key belongs to one project and carries scopes. A route that requires a scope the key lacks responds 403 insufficient_scope. See API keys. The /v1/partner/* routes use another credential: the partner key (rt_partner_...), which belongs to the organization and provisions the projects of your customers. The two keys do not mix. The partner key never sends messages, and a project key gets 401 partner_key_invalid on partner routes. See Partner API.

What the API key reaches

The partner routes use the partner key, not the project key:
You manage organizations, members, partner keys, a project’s channels and billing in the dashboard, with a user session. Those routes do not accept an API key and are not part of this reference.

Response format

Single object

A resource is returned directly, with no envelope:

Lists

Collections come inside an envelope with pagination metadata:

Error

See every field in Errors.
Some responses do not follow the list envelope: GET /v1/usage returns { from_date, to_date, data } with no pagination, and GET /v1/webhook_endpoints returns every endpoint at once, with has_more always false. Check the format on each endpoint page.
Every response carries the Routa-Request-Id header. Quote it when you contact support.

Pagination

Lists use cursor pagination. There is no page or offset.
GET /v1/events uses after (the ID of the last event) instead of cursor. See Pagination. The partner listings (GET /v1/partner/projects and GET /v1/partner/channels) accept a limit from 1 to 200, with a default of 50.

Idempotency

POST /v1/messages accepts the Idempotency-Key header. Repeating the request with the same key and the same body returns the original response, with Idempotent-Replay: true, without creating another message. Keys are kept for 24 hours. See Idempotency.

Rate limits

The limits of the project routes apply per project, per endpoint class. Every response carries the RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset headers. A 429 carries Retry-After:
The /v1/partner/* routes have their own limit, per organization: 10 req/s sustained, with a burst of 30, in a single bucket for all of those routes. A 429 carries the same headers. See Rate limits.

HTTP status codes

Conventions

Phone numbers

Use the E.164 format, such as +5581999999999. The leading + is optional on input. Responses carry the number in E.164.

IDs

Identifiers are opaque strings with a prefix that tells the type.

Dates

All dates and times follow ISO 8601 in UTC, such as 2026-09-04T13:22:41.031Z. Date-only parameters use YYYY-MM-DD.

Enums

The values of fields such as status and direction are lowercase strings. Fields documented as open can gain new values. Handle unknown values safely.

Versioning

The version is in the URL (/v1). Within v1, changes are additive only: new endpoints, new optional request fields and new response fields. Any other change becomes v2. Ignore unknown fields in responses.

Next steps

Quickstart

Send your first message.

Send message

The main endpoint of the API.

Webhooks

Receive delivery events and inbound messages.

Node.js SDK

Use the official TypeScript client.