Authentication
Two ways in, for two different callers. Keys are for your servers. Tokens are for people.
API keys — for your systems
Send the key in a header. Not a query parameter: those end up in access logs, browser history and error reports, and a credential in a log file is a credential that leaks quietly.
X-API-Key: engage_sk_...A key belongs to exactly one workspace. Every request it makes is scoped to that workspace, and it cannot read or write anything in another.
What a key can reach
An allowlist, and short on purpose:
/v1/events and everything under it
/v1/customers and everything under itA valid key sent to any other path is refused with 403 forbidden. Connecting a WhatsApp number, editing workflows, reading conversations and replying to customers are all things a signed-in person does in the dashboard.
The reasoning is worth stating, because the restriction will feel arbitrary the first time you hit it: a key lives in a server, in an environment variable, in a deployment log, in a CI configuration. Compared to a password behind a login it is a low-trust credential, and the surface it reaches should match. A leaked key can tell us an order was created. It cannot read what your customers said.
Rotating a key
Issue the new one first, deploy it, then revoke the old one. Revocation takes effect immediately — there is no grace period, so doing it in the other order means every call fails until the deploy lands.
Keys are stored as SHA-256 hashes, not bcrypt. That is a deliberate choice and not a weaker one for this purpose: bcrypt salts every row, so a hash cannot be looked up, and verifying a key would mean comparing against every key in the system on every request. A key is high-entropy random data rather than a human-chosen password, so the slow hashing that protects passwords buys nothing here.
Rotate immediately if a key reaches a log
The dashboard shows each key's prefix and when it was last used. A key with a lastUsedAt you cannot account for is a key to revoke now and investigate afterwards.
Access tokens — for people
New signups can sign in immediately and explore the dashboard. Signup returnsemailVerificationRequired: false, not session tokens; use login to obtain a session. Connecting WhatsApp or Instagram requires email verification. An unverified owner receives403 email_unverified on connection and credential-reconnect requests. A correct password can sign in before verification; an incorrect password still receives 401.
POST /v1/auth/email/verify
{ "token": "the-token-from-the-email-link" }
POST /v1/auth/email/verification-requests
{ "email": "you@example.com" }Confirmation returns 204, then you sign in normally. Resend returns the same 202 response for unknown, verified and pending addresses. A new link invalidates the previous one; sending is limited to once per minute and requests are rate limited. Existing accounts retain access. Invitations keep their email-link and password acceptance flow.
Signed-in owners can request one email with both a six-digit code and a link. The code lasts 10 minutes and allows five attempts per issuance. The link lasts 24 hours. Both are single-use; either completes verification. Code attempts are bound to the signed-in user, never an email or user ID supplied by the caller. Signup does not automatically send this email.
GET /v1/users/me/email-verification
PUT /v1/users/me/email-verification/email
{ "email": "correct@example.com", "currentPassword": "<current password>" }
POST /v1/users/me/email-verification/requests
{ "channel": "whatsapp" }
POST /v1/users/me/email-verification/code
{ "code": "123456" }
POST /v1/users/me/email-verification/link
{ "token": "<verification link token>" }Before verification, owners can correct a mistyped sign-in email with their current password. The same account and workspace are retained. Already verified addresses cannot use this correction endpoint. An address already in use is refused. Old verification proofs and password-reset links are invalidated. Then request a fresh verification email for the corrected address.
The PUT endpoint and three POST endpoints require an owner session. Link verification must use the same signed-in owner account that received the email; another account cannot consume the link.
The dashboard signs in with POST /v1/auth/login and gets a short-lived access token plus a refresh token. Tokens carry the workspace, so switching workspace means refreshing rather than re-authenticating.
Refresh tokens rotate. Each one works exactly once, and using it invalidates it. This matters if you ever build a client of your own against these endpoints: several requests renewing at the same moment will all present the same token, one will succeed, and the rest will be told it is invalid — which is true, and which will sign the user out of a perfectly healthy session. Renew once and have the other callers wait.
Do not use these endpoints for machine access
Sign-in is rate limited per account and per address, and it is designed for a human at a keyboard. A server that logs in with a stored password on every deploy will eventually be locked out by exactly the protection that is there to stop somebody guessing. Use a key.
Next
Customers →
How people are identified, and the phone-format mistake that quietly creates duplicates.