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

> ## Agent Instructions
> Integrating Pilot Status end to end? Follow https://docs.pilotstatus.com.br/guides/integrate-with-ai.md (pt-BR: https://docs.pilotstatus.com.br/pt-BR/guides/integrate-with-ai.md). No step requires contacting support: every credential is shown in the dashboard or in an API response, and a lost one is regenerated, not recovered.
> Webhook signing secret: shown ONCE in the Signing secret window right after creating the webhook on /webhooks, and in the `secret` field of the POST /v1/webhooks response (MCP: webhooks_create). Lost it: Edit Webhook → Generate a new secret, POST /v1/webhooks/{id}/rotate-secret, or webhooks_rotate_secret (the old one stops working at once). Verify `x-pilot-status-signature` = hex HMAC-SHA256 of the raw request body keyed with that secret.
> Meta verify token (number connected with the user's own Meta app credentials): Meta Number Created! window after connecting, then the number's card on Numbers (workspace Owner), or webhook.verifyToken in the POST /v1/numbers/meta response. It is not the webhook signing secret.
> REST auth: `x-api-key: ps_...` header, never Authorization: Bearer. MCP: https://mcp.pilotstatus.com.br/mcp (148 tools, OAuth 2.1 or x-api-key); Code Mode: https://mcp.pilotstatus.com.br/code. Destructive MCP tools return a preview and a confirm_token: show the preview and call again only after the user's explicit yes. Over OAuth, revealing or creating ps_ API keys is workspace Owner only.

# API Keys and Workspace Keys Screens in the Pilot Status Dashboard

> The two key screens of the dashboard: API Keys (/api-keys), with each number's default key (ps_number_), and Workspace keys (/workspace-api-keys), with the primary workspace key, named keys and the workspace webhooks whose plwh_ signing secret is shown once. Every raw key is shown only once, when it is created or regenerated — the dashboard never shows it again, so a lost key is recovered by regenerating it. Also covers account keys (Profile → API), the panic revoke buttons and who can do what.

Pilot Status has three kinds of API key, and each one lives in a different place in the dashboard:

| Kind | Prefix | Screen | Sidebar |
| - | - | - | - |
| **Number key** | `ps_number_` | **API Keys** — `/api-keys` | **API Keys**, under **Selected Number** |
| **Workspace key** (primary + named) | `ps_workspace_` | **Workspace keys** — `/workspace-api-keys` | **API Keys**, under **Workspace** |
| **Account key** | `ps_account_` | **Profile → API** — `/profile?tab=api` | **Profile**, then the **API** tab |

The sidebar shows two entries both called **API Keys**: the one in the **Selected Number** group is the per-number screen; the one in the **Workspace** group is the workspace keys screen. What each kind of key can do is explained in [Key types](https://docs.pilotstatus.com.br/concepts/key-types.md).

> [!WARNING]
>
> **Every raw key is shown once.** When you generate or regenerate any key — number, primary, named or account — the full value appears in a dialog a single time. After you close it, the dashboard shows only the prefix and the last four characters (`ps_number_••••••••3b5d`). Nobody, Pilot Status support included, can show it to you again. If you lost a key, **regenerate it** (number or primary key) or **revoke it and create another** (named or account key) — and update the integration that used the old one.

## Who can use these screens

| Action | Owner | Admin | Agent | Analyst |
| - | - | - | - | - |
| Open **API Keys** and **Workspace keys** (`apikeys:read`) | ✅ | ✅ | — | — |
| Generate / regenerate a **number's** default key (`apikeys:rotate`) | ✅ | ✅ | — | — |
| Generate / regenerate the **primary** workspace key (`apikeys:reveal`) | ✅ | — | — | — |
| Create / revoke **named** workspace keys | ✅ | ✅ | — | — |
| Panic revoke buttons | ✅ | ✅ | — | — |
| **Webhooks** and **Deliveries** tabs of Workspace keys (`phone_lines:webhooks`) | ✅ | ✅ | — | — |
| Create / revoke your own **account keys** (Profile → API) | ✅ | ✅ | ✅ | ✅ |

Agents and Analysts do not see either **API Keys** entry in the sidebar. An Admin sees the primary key card without the **Regenerate** / **Generate primary key** button. When the workspace has no primary key yet, the card says *"Generating the primary key is an owner action — it is shown in plaintext only once."*; when it already has one, the button is simply not there.

***

## API Keys (`/api-keys`) — the number's default key

Title **API Keys**, subtitle *"Manage your API access keys"*. The screen is about **the number selected in the header**: switch numbers in the header to manage another number's key. With no number selected it says *"Select a number in the header to manage its API key."*

Each number has **one default key**, scoped to that number — there is no "create another key" for a number, only regenerate. The info card **Number default key** says so: *"Each number has a single default API key, scoped to this number. Regenerating replaces the previous key."*

### What you see

The key card shows:

* **Key** — masked: prefix, eight dots, last four characters. The full value is never shown here.
* A **scope badge**: *"Scope: number \{number} only"* for a number key, or *"Scope: workspace (all numbers)"* for an older tenant-scoped key, with the hint *"To send through a number, this key requires the x-whatsapp-number-id header."*
* **Created** and **Last used** (`-` if never used).
* The **Regenerate API key** button. With no key yet, the card says *"No API key created"* and the button is **Generate API key**.

If the key could not be loaded, the card **Could not read this number's key** tells you not to generate a new one before reloading (generating replaces the previous key) and offers **Try again**.

The Pilot Status test number cannot have a key: *"Test number: select one of your numbers to create an API key."*

### Generate or regenerate the key

1. Click **Generate API key** (or **Regenerate API key**).
2. Confirm the browser prompt — *"Are you sure? Regenerating immediately invalidates the current key."* (for a number with no key yet: *"Do you want to generate an API key for this number?"*).
3. The **API Key created** dialog shows the full key with a copy button and the warning *"Warning: for security, the full key is shown only this once. Copy and store it now."* Copy it, then **Close**.

The toast says *"API Key created! Copy it now, it will not be shown again."* The old key stops working immediately; any integration using it breaks until you paste the new one. There is no grace period. Generating and regenerating need the Owner or Admin role — the same roles that can open this screen.

### Revoke this number's keys (panic button)

**Revoke this number's keys**, at the top right, opens a dialog of the same name. It counts the keys it will destroy (*"This revokes \{keys} key(s) of number \{number}. Other numbers' keys and the workspace key are left untouched."*), lets you tick **Issue a new default key for this number afterwards** (off every time the dialog opens), and asks you to type the workspace name. If you asked for a new key, it is shown once in the same dialog.

> [!NOTE]
>
> Revoking a number's keys **does not close the number**: a workspace key can still send through it with the `x-whatsapp-number-id` header. To close that path too, revoke the workspace key on the **Workspace keys** screen (see below). Webhooks and number connections keep working; only integrations that send an API key stop.

### Privacy & retention and Number settings

Below the key, the same screen holds two panels for the selected number:

* **Privacy & retention** — **Mode**: **Store indefinitely**, **Store for X days** (with **Retention days**) or **Don't store (relay only)**; button **Save privacy**. See [Data retention](https://docs.pilotstatus.com.br/trust/data-retention.md) and [API keys](https://docs.pilotstatus.com.br/api/api-keys.md).
* **Number settings** — **Always online**, **Reject calls** (with **Reject message**, *"Empty = no reply"*), **Mark as read**, **Ignore groups**, **Ignore status**, **Ignore channels**, **Import history on connect**, **Send history to webhooks**; each provider-backed toggle offers **Provider default**, **On** or **Off**. Button **Save settings**. The same settings are available on the **Numbers** screen.

***

## Workspace keys (`/workspace-api-keys`)

Title **Workspace keys**, subtitle *"The API keys of the current workspace."* The screen has three tabs, kept in the address as `?tab=`:

| Tab | `?tab=` | Content |
| - | - | - |
| **Keys** | `chaves` (default) | Primary key, named keys, link to per-number keys |
| **Webhooks** | `webhooks` | The workspace webhooks: list, create, edit, activate/pause, delete |
| **Deliveries** | `entregas` | Counters and the latest 50 deliveries of the selected webhook |

Without the webhooks permission (Agent, Analyst — who cannot open the screen at all), only **Keys** exists. `Ctrl/⌘+N` opens **New webhook** from any tab.

### Keys tab — Primary key

The **Primary key** card: *"This is the key the in-app AI agent and the integrations use. Regenerating replaces only the primary key — the named keys keep working."*

It shows **Key** (masked), **Created at** and **Last used** (or **Never used**), and the button **Regenerate** — or **Generate primary key** when the workspace has none yet (*"This workspace has no primary key yet."*).

1. Click **Regenerate**. The dialog **Regenerate the primary key?** warns *"The previous primary key will be invalidated immediately. Named keys are not affected."* (For a first key: **Generate the primary key?** — *"The full key will be shown only once."*)
2. Confirm. The **Primary key generated** dialog shows the full key, a **Copy key** button and *"Warning: the full key is shown only this once. Copy and store it now."* **Close** it when you have stored it.

**Owner only.** The primary key cannot be revoked — only regenerated.

Under the card, Owners and Admins see two panic buttons:

* **Revoke the workspace key** — dialog of the same name: revokes the workspace key(s) only; per-number keys are left untouched.
* **Revoke EVERYTHING (workspace + numbers)** — dialog **Revoke ALL account keys**: revokes every workspace key **and** every per-number key, showing the server's count (*"This revokes \{keys} key(s) of this workspace, covering \{numbers} number(s)"*).

Both ask you to type the workspace name (*"To confirm, type the workspace name: \{name}"*) and offer **Issue a new workspace key afterwards** (unticked by default); the button is **Revoke everything and issue a new key**. A new key, if requested, is shown **once** in the dialog — and it is a **workspace** key, not a number key: to send through a number it needs `x-whatsapp-number-id`. If your integration used a number key, create the new one on **API Keys** (`/api-keys`).

Use these when a key leaked and you do not know which one. To replace a single known key, regenerate or revoke that key instead.

### Keys tab — Named keys

**Named keys**: *"Extra workspace keys, one per integration, so you can revoke one without taking the others down."* The primary key also appears in this list with the **Primary** badge.

* **Create a key** — type a **Key name** (e.g. *"CRM integration"*, up to 60 characters) and click **Create key**. The dialog **Key "\{name}" created** shows the full key once, with **Copy key** and **Close**.
* **Revoke** — on a row (not on the primary). The dialog **Revoke the key "\{name}"?** warns *"Every integration using this key stops working immediately. This cannot be undone."*; confirm with **Revoke key**.
* Each row shows the name, masked key, **Created \{date}** and **Last used \{date}** / **Never used**.

Only Owners and Admins see the create field and the **Revoke** buttons. Up to **50** live keys per workspace, primary included (*"Limit of \{limit} keys reached. Revoke one you no longer use to create another."*). Named keys cannot be regenerated: revoke and create another. A named key created by a member is revoked when that member leaves the workspace — see [Members](https://docs.pilotstatus.com.br/dashboard/members.md).

### Keys tab — Per-number keys

A card **Per-number keys** with **Open per-number keys**, which takes you to `/api-keys`.

### Webhooks tab — workspace webhooks

**Workspace webhooks**: *"One registry for the workspace events: the phone line ones and the paid wallet top-up (wallet.topup\_paid). Deliveries are signed with the x-pilot-status-signature header."* This is a different registry from the number webhooks on the [**Webhooks** screen](https://docs.pilotstatus.com.br/dashboard/webhooks.md).

* Counters: **Total Webhooks**, **Active**, **Inactive**.
* A webhook selector (**Select webhook...**, searchable). Selecting one shows its summary (name, URL, events, **Active**/**Paused**, last delivery) and its actions: edit, activate/deactivate, delete.
* **New webhook** opens the **New webhook** modal: **Name** (optional, e.g. *"CRM integration"*), **URL \*** and **Events** (pick events, or **Every phone line event**). *"“All events” covers phone line events only: the paid wallet top-up (wallet.topup\_paid) arrives only if you tick that event."* Click **Create webhook**.
* Edit opens **Edit webhook** with the same fields; save with **Save changes**.
* Delete asks **Delete this webhook?** — *"Deliveries to this URL stop right away."*

> [!WARNING]
>
> **The signing secret (`plwh_…`) is shown once.** Right after **Create webhook**, the **Signing secret** dialog shows it with **Copy** and the note *"Shown once. Store it now — no read returns it again."* Every delivery carries `x-pilot-status-signature`: the hex HMAC-SHA256 of the raw body, keyed with this secret. Workspace webhooks have **no secret rotation**: if you lost the secret, delete the webhook and create it again — the new one gets a new secret, shown once.

### Deliveries tab

**Deliveries**: *"The latest 50 deliveries of the selected webhook, with the status and your endpoint's response. Click a row to see the payload sent."*

Pick the webhook in the same selector (the selection is shared with the **Webhooks** tab). You see the counters **Total deliveries**, **Delivered**, **Failed**, then a table with **When**, **Event**, **Status** (**Pending**, **Delivered**, **Failed**), **Response** and **Attempts**. Clicking a row opens the delivery detail with the payload. There are no filters and no replay for this registry.

***

## Profile → API — account keys

**Profile**, tab **API** (`/profile?tab=api`), holds **Account keys**: *"An account key is yours, not a workspace's: it manages your workspaces and acts inside any workspace you are an active member of. Each request picks the workspace with the x-workspace-id header and runs with your role there."* The badge reads **Scope: Everything in every workspace**.

Every member, whatever their role, can create and revoke their own account keys here (up to **20** per user), with the same **Key name** / **Create key** / **Revoke** flow and the same shown-once dialog as named keys. Owners and Admins also get a **Workspace keys** card with **Open workspace keys**.

> [!NOTE]
>
> The workspace key is not here: revoke or regenerate it on **Workspace keys** (`/workspace-api-keys`). The **Revoke this number's keys** dialog points there too (*"revoke the workspace key in Workspace keys"*).

***

## Do it via API / MCP

| Dashboard action | API | MCP tool |
| - | - | - |
| List per-number keys | [`GET /v1/api-keys`](https://docs.pilotstatus.com.br/api/api-keys) (workspace key) | `api_keys_list` (over OAuth/MCP, workspace Owner only, checked on every call and recorded in the audit log — see [Secrets and API keys over OAuth](https://docs.pilotstatus.com.br/integrations/mcp-server.md#secrets-and-api-keys-over-oauth)) |
| Regenerate a number's key | [`POST /v1/api-keys`](https://docs.pilotstatus.com.br/api/api-keys) with `whatsappNumberId` | `api_keys_regenerate_number` |
| Regenerate the primary key | [`POST /v1/api-keys/regenerate`](https://docs.pilotstatus.com.br/api/api-keys) | — |
| List / create / revoke named workspace keys | [`/v1/workspaces/{id}/api-keys`](https://docs.pilotstatus.com.br/api/workspaces#workspace-keys) (account key) | `workspaces_api_keys_list`, `workspaces_api_keys_create`, `workspaces_api_keys_revoke` |
| Workspace webhooks: list, get, create, edit, delete | [`/v1/workspace/webhooks`](https://docs.pilotstatus.com.br/api/workspace-webhooks) | `workspace_webhooks_list`, `workspace_webhooks_get`, `workspace_webhooks_create`, `workspace_webhooks_update`, `workspace_webhooks_delete` |
| Workspace webhook deliveries | `GET /v1/workspace/webhooks/{id}/deliveries[/{deliveryId}]` | `workspace_webhooks_deliveries_list`, `workspace_webhooks_deliveries_get` |
| Panic revoke (number / workspace / everything) | Dashboard only | — |
| Account keys (Profile → API) | Dashboard only | — |
| Privacy & retention, Number settings | [`PATCH /v1/numbers/{id}`](https://docs.pilotstatus.com.br/api/numbers/settings) | `numbers_settings_update` |

Authentication and headers (`x-api-key`, `x-whatsapp-number-id`, `x-workspace-id`) are covered in [Authentication](https://docs.pilotstatus.com.br/api/authentication.md).


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