Skip to main content
The Partner API is for platforms that resell WhatsApp to their own customers. Instead of asking each customer to create a Routa account, you create one project per customer, issue the API key of that project and send the customer to a Routa page to connect their number.
The Partner API is experimental in the SDK (@routa-chat/sdk/partner) and is only available on plans that include it. Routa grants this access: you cannot turn it on yourself. Without it, every call responds 404 partner_api_not_available.

How the pieces fit together

The partner key never sends messages. On any data route (/v1/messages, /v1/events, /v1/webhook_endpoints and the others), it responds 401 api_key_invalid. After onboarding, the customer’s traffic uses the API key of their project, with the Routa SDK or the data API.

What you do once, in the dashboard

You take these steps in the dashboard, under Settings, on the Partner tab. The API does not do them for you. That is on purpose: a leaked key cannot replace itself.
  1. Create the partner profile. You get your ID (ptn_…) and the signing secret, which is shown only once.
  2. Register the redirect origins your links can send the customer back to.
  3. Issue a partner key (rt_partner_…), which is also shown only once.
Keep the partner key and the signing secret on your server, in a secrets vault. Never put them in a web page, a mobile app or a public repository.

The life cycle of a customer

The step by step, with examples, is in Onboard a customer.

Limits

  • Request rate. All /v1/partner/* routes share one limit per organization: 10 requests per second, with a burst of up to 30. Above it, the API responds 429 with the Retry-After header. This limit cannot be changed.
  • Projects. The plan limits the number of projects in the organization. Above the limit, creating a project responds 402 project_limit_exceeded. An abandoned onboarding and a customer who left still count. Delete the project to free the slot.

API reference

To use the Partner API through the Node.js SDK, see Partners in the SDK.