curl or the official Node.js SDK.
Prerequisites
Before you start, you need:- An account on the Routa dashboard.
- A connected channel. A channel is a WhatsApp number linked to your project. Connect it in the dashboard; the connection uses the guided Embedded Signup flow.
- To use the SDK: Node.js 22 or later.
There is no endpoint to connect channels through the API yet. Connect the number in the dashboard and use the channel
id (chan_...) in your calls.Send your first message
1
Create an API key
In the dashboard, open the API keys page, in the Developer group of the sidebar, and create a key for your project. The key starts with Learn more in Authentication.
rt_live_ or rt_test_ and is shown only once. Copy it and store it somewhere safe.2
Check that the key works
GET /v1/whoami has no side effects and returns the organization, the project and the scopes of the key.Response
3
Send a message
Provide the channel, the recipient in E.164 format and the text. The
Idempotency-Key header makes sure a retry does not create a second message.Response (202 Accepted)
4
Track delivery
status: "accepted" means Routa received the message, not that it reached the recipient. The message moves on to sent, delivered and read (or failed). Check the current state at any time:Next steps
Receive events by webhook
Register an HTTPS endpoint and receive
message.delivered, message.read and message.received.Send templates
Send messages with templates approved by WhatsApp.
Handle errors
Understand the error format and which failures are worth a retry.
API reference
Every endpoint, parameter and response.