> ## Documentation Index
> Fetch the complete documentation index at: https://docs.routa.chat/llms.txt
> Use this file to discover all available pages before exploring further.

# Partner API

> Overview of the Partner API: how a platform creates one project per customer, connects each customer's number and receives everyone's events.

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.

> [!WARNING]
>
> 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

| Piece | What it is |
| - | - |
| **Partner** | Your organization on Routa, with a partner profile. |
| **Customer project** | One project per customer. You identify it by your own ID, the `external_ref`. |
| **Project API key** | One key per project. This key, not the partner key, is what the customer's traffic uses. |
| **Partner key** | The `rt_partner_…` credential that creates projects and issues keys. See [Partner keys](https://docs.routa.chat/en/partners/partner-keys.md). |
| **Signed link** | The address the customer opens to connect their number. See [Signed link](https://docs.routa.chat/en/partners/signed-link.md). |
| **Organization webhook** | A single webhook endpoint that receives the events of every project. See [Organization webhook](https://docs.routa.chat/en/partners/webhook.md). |

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

```text theme={null}
1. Create the customer project     POST /v1/partner/projects
2. Issue the project API key       POST /v1/partner/projects/{id}/api_keys
3. Sign the link and open it       the customer connects the number on WhatsApp
4. Confirm                         GET /v1/partner/projects/{id}
5. Send with the project key       POST /v1/messages
6. (Optional) Delete the project   DELETE /v1/partner/projects/{id}
```

The step by step, with examples, is in [Onboard a customer](https://docs.routa.chat/en/partners/onboarding.md).

## 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

| Resource | Endpoints |
| - | - |
| Projects | [Create](https://docs.routa.chat/en/api-reference/endpoint/partner/create-project.md), [list](https://docs.routa.chat/en/api-reference/endpoint/partner/list-projects.md), [retrieve](https://docs.routa.chat/en/api-reference/endpoint/partner/retrieve-project.md), [rename](https://docs.routa.chat/en/api-reference/endpoint/partner/update-project.md), [delete](https://docs.routa.chat/en/api-reference/endpoint/partner/delete-project.md) |
| Project API keys | [Issue](https://docs.routa.chat/en/api-reference/endpoint/partner/create-project-api-key.md), [rotate](https://docs.routa.chat/en/api-reference/endpoint/partner/rotate-project-api-key.md), [revoke](https://docs.routa.chat/en/api-reference/endpoint/partner/revoke-project-api-key.md) |
| Channels | [List](https://docs.routa.chat/en/api-reference/endpoint/partner/list-channels.md), [delete a disabled channel](https://docs.routa.chat/en/api-reference/endpoint/partner/delete-channel.md) |
| Organization webhook | [Retrieve](https://docs.routa.chat/en/api-reference/endpoint/partner/retrieve-webhook.md), [set](https://docs.routa.chat/en/api-reference/endpoint/partner/set-webhook.md), [rotate the secret](https://docs.routa.chat/en/api-reference/endpoint/partner/rotate-webhook-secret.md) |

To use the Partner API through the Node.js SDK, see [Partners in the SDK](https://docs.routa.chat/en/sdk/partner.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.