Skip to main content

API Reference

The WhautoChat REST API lets your own systems send messages on every channel and manage everything around them: contacts, tags, segments, broadcasts, WhatsApp templates and webhooks. Create contacts from a web form, send a WhatsApp template when an order ships, tag people from your CRM, or start a broadcast without opening the app.

Try it in Postman

Download the Postman collection, import it, then set host and x-api-key in the "WhautoChat Rest API" environment.

Base URL​

https://api.whauto.chat/v1

Self-hosted installs use https://<your-server>/rest/v1. The exact host for your account is shown in the app under Integrations > REST API as Your API Host. Every path in this reference starts with /v1/.

API keys​

Open Integrations and click Connect (or Edit Setup) on the REST API card.

  1. Click New API Key

    API Keys page with the New API Key button

  2. Enter a name (optional), for example "Website signup form", so you know what to delete later.

  3. Click Generate, then Copy, and store the key in your system's secret store, not in source code.

    Generate New API Key dialog with a name entered

  4. Click Close

The table lists each key with its Created At date and Last Activity. Click the delete icon to revoke a key: anything using it stops working immediately, so generate the new key first when rotating.

Authentication​

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

curl "https://api.whauto.chat/v1/account-info" \
-H "x-api-key: $WHAUTOCHAT_API_KEY"

A missing, invalid or deleted key returns 401 with the body { "message": "Unauthorized" }.

Requests and responses​

  • Send JSON bodies with Content-Type: application/json.
  • IDs are opaque strings such as jD6Wq8zCf9. Don't parse them.
  • Phone numbers are international format with the country code, for example +12025550188. A leading + is optional.
  • Most resources belong to a workspace. Pass it in the body as "workspace": { "id": "..." } or in the query as ?workspaceId=. List your workspaces with GET /v1/workspaces.
  • Lists return a plain JSON array. Single records return the object itself.
  • Updates use PUT and replace the whole record, so send every field you want to keep.
  • Errors return { "error": "message" } with a standard HTTP status.

Pagination​

List endpoints take ?page= (default 1) and ?limit= (default 10, max 100). When a page has fewer than limit items, you're on the last page. Message history uses the same parameters.

Errors​

StatusMeaning
400A required field is missing or invalid. error says which.
401Missing, invalid or deleted API key.
404The record does not exist or belongs to another account.
405The method is not supported on that resource, for example creating a workspace. Do it in the app instead.
500Something went wrong on our side. Retry, and contact support if it continues.

Each endpoint lists the exact errors it returns.

Endpoints​

Click any endpoint to open its reference.

Webhooks​

To receive messages, contact changes and delivery updates as they happen, see Webhooks for the events and payloads, and Webhooks API to manage endpoints from code.

Need help?

Email us at [email protected] and we will get you sorted.