Auto Appy / DevelopersBack to API reference

WhatsApp lookup cookbook

Use an application API key in Authorization: Bearer YOUR_API_KEY. Pass the central organisation UUID in X-AutoAppy-Workspace. Writes require a read/write key. Never embed a key in frontend source.

First call GET /api/auth/me. The response data.local_workspace_id is the local workspace ID; it is different from the central organisation ID. Use it in workspace paths and X-Workspace-ID.

Account → number → contact

Use GET /workspaces/{workspace}/whatsapp-accounts, then GET /workspaces/{workspace}/whatsapp-accounts/{account}/phone-numbers. Both return data arrays; select each resource's id. Account labels use business_name; number labels use phone_number or display_phone_number.

GET /workspaces/{workspace}/whatsapp-accounts/{account}/phone-numbers/{phone}/contacts?search=Raj&per_page=50 searches contacts for that number. search is optional text, page starts at 1 and per_page is 1–100. The response is a paginated resource collection with data, links and meta. Contact id selects update/get operations; name, phone_number and email are readable contact fields. Only authorised contacts are returned. No matches is data: [].


curl --get 'https://whatsappapi.autoappy.com/workspaces/WORKSPACE/whatsapp-accounts/ACCOUNT/phone-numbers/PHONE/contacts' \

 -H 'Authorization: Bearer YOUR_API_KEY' -H 'X-AutoAppy-Workspace: CENTRAL_ORG' \

 --data-urlencode 'search=Raj' --data-urlencode 'per_page=50'

Sending examples

POST /sendAMessage requires the local workspace_id, workspace_whatsapp_phone_number_id, recipient phone_no, type and payload. A successful response includes data; acceptance does not prove delivery. Use a read/write key, connected number and authorised conversation. Provider window/template rules still apply.

Location payload: {"latitude":18.5912,"longitude":73.7389,"name":"Office"}. Values are decimal degrees; latitude −90…90, longitude −180…180.

Button payload:


{"type":"button","body":{"text":"How can we help?"},"action":{"buttons":[{"type":"reply","reply":{"id":"sales","title":"Sales"}}]}}

List payload:


{"type":"list","body":{"text":"Choose a department"},"action":{"button":"Departments","sections":[{"rows":[{"id":"sales","title":"Sales"},{"id":"support","title":"Support"}]}]}}

For either, the outer message type is interactive.

Template payload:


{"name":"approved_template_name","language":{"code":"en_US"},"components":[{"type":"body","parameters":[{"type":"text","text":"Raj"}]}]}

Use the exact approved name, language and variable count. The workflow Language code input is plain text; Template components is a JSON array. An array is syntactically validated, but must also match Meta's approved template schema.

Media payload: {"link":"https://example.com/brochure.pdf","filename":"brochure.pdf"} with type document. The link must return a public file, not an HTML sharing page. The workflow adapter converts public Google Drive file links to download links and preserves resourcekey. Private files, quota blocks or confirmation pages still cannot be fetched by Meta. The workflow result viewer supports opening/previewing returned media links.

Errors: 401 key expired; 403 wrong app/read-only key or denied contact; 404 unknown/disconnected resource; 422 bad input; provider errors may be returned as a failed message/API error. Inspect the message before retrying a send.

Public documentation URL: https://whatsapps.autoappy.com/api/

General errors and pagination

All example IDs are placeholders. Look them up using your own authorised connection. 401 requires renewed authentication; 403 requires checking application, read/write permissions and workspace; 404 means unavailable resource; 422 contains invalid-field details; 429 requires respecting Retry-After. Dropdowns display the current API page; Map Data accepts an exact identifier from a later page or previous action. Lists never broaden permissions to fill choices.