Skip to main content
This guide takes you from zero to a sent WhatsApp message. You can use 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 rt_live_ or rt_test_ and is shown only once. Copy it and store it somewhere safe.
Learn more in Authentication.
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:
In production, receive each step through webhooks instead of polling the API.
Accepting a message does not confirm delivery. Never treat 202 Accepted as a delivered message. See the message lifecycle.

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.