Authentication

Create an API key in the app and send it with every request.

Every request to the REST API is authenticated with an API key. A key belongs to one workspace and can do everything the API allows in that workspace: send messages, save contacts, start sequences and list templates. Keys have no scopes and no expiry.

Create a key

  1. Sign in to Wabee as an owner or admin of the workspace. Agents can't see or create keys.
  2. Go to Settings → Integrations & API.
  3. In the API card, type a name for the key (for example Website or Shopify sync) and click Create key.
  4. Copy the key from the Your new API key dialog.

The full key is shown once. Wabee stores only a SHA-256 hash of it, so nobody (including support) can show it to you again. If you lose a key, create a new one.

Keys look like wabee_ followed by 32 letters and digits. The key list shows each key's name, its first 12 characters (for example wabee_7hQk2p…) and when it was last used, so you can tell keys apart.

Send the key

Send the key in the Authorization header as a bearer token:

curl https://api.wabee.chat/v1/templates \
  -H "Authorization: Bearer YOUR_API_KEY"

The API also accepts the key in an X-API-Key header. Use one or the other:

curl https://api.wabee.chat/v1/templates \
  -H "X-API-Key: YOUR_API_KEY"

If both headers are present, the Authorization: Bearer header wins.

A missing key returns 401 with Missing API key. Send it as: Authorization: Bearer <key>. A key that doesn't exist (or was deleted) returns 401 with Invalid API key. If the workspace has been suspended, every request returns 403 with This workspace is suspended. If the workspace's plan doesn't include the API, every request returns 403 with The API needs the Starter plan or higher. See Settings → Plan. See Errors.

Keep keys secret

A key can send WhatsApp messages from your number, and those messages are billed to your Meta account. Treat it like a password.

  • Call the API from your server only. The API doesn't send CORS headers, so calls from a browser are blocked anyway. Never put a key in front-end JavaScript, a mobile app, or anything a customer can download.
  • Store keys in environment variables or a secrets manager, not in source control.
  • Create one key per system (website, CRM, internal script). If one leaks, you can delete it without breaking the others.
  • Check last used in the key list. A key you don't recognise being used is a reason to delete it.

Rotate or revoke a key

There is no "regenerate" button. To rotate a key:

  1. Create a new key in Settings → Integrations & API.
  2. Deploy the new key to the system that uses it.
  3. Confirm the new key shows a recent last used date.
  4. Delete the old key with the trash icon next to it.

Deleting a key takes effect immediately: the next request with it returns 401 Invalid API key. Key creation and deletion are recorded in Settings → Activity.

The last used date is updated at most once a minute per key, so don't rely on it for exact timings.

Plan requirements

API access is part of the Starter, Growth and Pro plans, and of the 14-day free trial (which runs on Growth). The Free plan doesn't include it. See Limits & plans for details.

Next steps

  • API reference lists every endpoint with examples.
  • Errors explains the error format and status codes.