Developer docs menu

Developer docs

Authentication and API keys

Every request carries an x-api-key header. Keys belong to one WHAASS account and only see that account's data.

Send your key in the x-api-key header on every request:

curl https://waas-api.hitoritech.com/api/v1/external/me \
  -H "x-api-key: whaass_ak_<id>_<secret>"

Dashboard logins (JWTs) are not accepted on /api/v1/external. Only API keys work.

Creating and revoking keys

Create keys in app.whaass.com under Settings → Integrations → API keys. The full key is shown once, when you create it. Delete a key on the same page and it stops working straight away.

Use one key per integration, so you can revoke one without breaking the others. Each key also gets its own rate limit.

Who can use the API

Three things must be true, or the request is refused with 403:

Requirement What you see if it's missing
API access is switched on for the account External API access is not enabled for this account
The plan includes API access (Pro) code: "PLAN_LIMIT" with upgradeTo naming the plan you need
The account is active, not restricted code: "PLAN_RESTRICTED"

To switch on API access, use Request API access in the docs sidebar.

Keeping keys safe

  • Keep keys on your server. Never put one in a browser, mobile app or public repository: anyone with the key can read the account's chats and send messages from its number.
  • If a key leaks, delete it and create a new one.
  • After 10 failed authentications from one IP in 15 minutes, that IP gets 429 for the rest of the window.