# api ## Pages - [Zacx Public API](https://zacx.io/api/index.md) — The Zacx Public API lets you send WhatsApp Business API messages, look up and update contacts, tag and assign them, and pull reports and wallet credits for your workspace. **Authentication.** Every request carries your workspace API key as a bearer token: `Authorization: Bearer `. Find or generate the key in the Zacx dashboard under **Settings → API**. **Phone numbers.** Always include the country code, for example `919999999999` for an Indian number. Endpoints that accept a leading `+` say so. **Responses.** Successful calls return `"status": "success"` with the result under `data` or a human-readable `message`. Failures return `"status": "error"` with a stable `code` you can branch on and a `message` for logs. - [Get chat active window status](https://zacx.io/api/chat/active/index.md) — Tells you whether the 24-hour customer service window is open for a contact on a given WhatsApp API number. Free-form and interactive messages are only delivered while the window is `active`. Identify the contact by `phoneNumber` or `email`. If you send both, `phoneNumber` takes precedence. - [Add tags to a contact](https://zacx.io/api/contact/add-tags/index.md) — Adds one or more existing workspace tags to a contact. If the contact does not exist yet it is created. Tags must already exist in the workspace; create them from the dashboard first. - [Assign users to a contact](https://zacx.io/api/contact/assign-users/index.md) — Assigns one or more team members to a contact, identified by their login phone numbers. If the contact does not exist yet it is created. - [Get a contact](https://zacx.io/api/contact/get/index.md) — Looks up one contact by phone number or email. Send the phone number with its country code and without the leading `+`. - [Remove tags from a contact](https://zacx.io/api/contact/remove-tags/index.md) — Removes one or more tags from an existing contact. - [Unassign users from a contact](https://zacx.io/api/contact/unassign-users/index.md) — Removes one or more team members from an existing contact. - [Create or update a contact](https://zacx.io/api/contact/upsert/index.md) — Creates the contact if it does not exist, otherwise updates it. The match is made on `phoneNumber` first, then `email`. `customFields` are addressed by `customFieldId`; get the ids from **List custom fields**. `assignedUsers` takes the login phone numbers of your team members. - [List custom fields](https://zacx.io/api/custom-fields/list/index.md) — Returns every custom field (CRM column) in the workspace, with the ids you need for **Create or update a contact**. - [Send a message](https://zacx.io/api/message/send/index.md) — Sends one WhatsApp message to one recipient. The `type` field selects the message kind and decides which other fields apply: | `type` | When to use | Chat window required | |---|---|---| | `template` | Approved WhatsApp templates. Works at any time. | No | | `text`, `image`, `document`, `audio`, `location` | Free-form messages inside an open conversation. | Yes | | `interactive` | Reply buttons or a list menu inside an open conversation. | Yes | Media URLs (`url`) must be publicly accessible. For templates, only pass the `header` object when the template has a header, only pass `body` when the template has body variables, and only pass `buttons` when a button carries a variable (for example a dynamic **Visit website** URL). - [Get message status](https://zacx.io/api/message/status/index.md) — Returns the current delivery status of a message you sent through the API. The input is the WhatsApp message id (`wamid`) returned by **Send a message**. - [AudioMessage](https://zacx.io/api/schemas/AudioMessage/index.md) — An audio clip from a public URL. Requires an active chat window. - [Contact](https://zacx.io/api/schemas/Contact/index.md) - [ContactTagsRequest](https://zacx.io/api/schemas/ContactTagsRequest/index.md) - [ContactUpsertRequest](https://zacx.io/api/schemas/ContactUpsertRequest/index.md) — At least one of `phoneNumber` or `email` is required to identify the contact. - [ContactUpsertResult](https://zacx.io/api/schemas/ContactUpsertResult/index.md) - [ContactUsersRequest](https://zacx.io/api/schemas/ContactUsersRequest/index.md) - [CustomField](https://zacx.io/api/schemas/CustomField/index.md) - [CustomFieldValue](https://zacx.io/api/schemas/CustomFieldValue/index.md) - [DeliveryStats](https://zacx.io/api/schemas/DeliveryStats/index.md) - [DocumentMessage](https://zacx.io/api/schemas/DocumentMessage/index.md) — A file from a public URL. Requires an active chat window. - [Error](https://zacx.io/api/schemas/Error/index.md) - [ImageMessage](https://zacx.io/api/schemas/ImageMessage/index.md) — An image from a public URL, with an optional caption. Requires an active chat window. - [InteractiveButtons](https://zacx.io/api/schemas/InteractiveButtons/index.md) - [InteractiveList](https://zacx.io/api/schemas/InteractiveList/index.md) - [InteractiveMessage](https://zacx.io/api/schemas/InteractiveMessage/index.md) — Reply buttons or a list menu. Requires an active chat window. - [LocationMessage](https://zacx.io/api/schemas/LocationMessage/index.md) — A map pin. Requires an active chat window. - [MessageBase](https://zacx.io/api/schemas/MessageBase/index.md) - [MessageResult](https://zacx.io/api/schemas/MessageResult/index.md) - [MessagesReport](https://zacx.io/api/schemas/MessagesReport/index.md) - [MessageStatus](https://zacx.io/api/schemas/MessageStatus/index.md) — Delivery state of a message, in the order WhatsApp reports them. - [Money](https://zacx.io/api/schemas/Money/index.md) - [Recipient](https://zacx.io/api/schemas/Recipient/index.md) - [SendMessageRequest](https://zacx.io/api/schemas/SendMessageRequest/index.md) - [TemplateMessage](https://zacx.io/api/schemas/TemplateMessage/index.md) — An approved WhatsApp template. Can be sent at any time, no active chat window needed. - [TemplatePayload](https://zacx.io/api/schemas/TemplatePayload/index.md) - [TextMessage](https://zacx.io/api/schemas/TextMessage/index.md) — Plain text. Requires an active chat window. - [User](https://zacx.io/api/schemas/User/index.md) - [ValidationError](https://zacx.io/api/schemas/ValidationError/index.md) - [Chats](https://zacx.io/api/tags/Chats/index.md) — Conversation state for a contact. - [Contacts](https://zacx.io/api/tags/Contacts/index.md) — Read and update contacts, their tags, and their assigned users. - [Custom Fields](https://zacx.io/api/tags/Custom-Fields/index.md) — The custom columns configured in your CRM. - [Messages](https://zacx.io/api/tags/Messages/index.md) — Send template, free-form, and interactive messages over the WhatsApp Business API, and check delivery status. **Free-form and interactive messages are only delivered inside an active chat window**: the contact must have messaged your WhatsApp API number in the last 24 hours. Call [Get chat active window status](/api/chat/active) first to avoid re-engagement errors. Template messages have no such limit. - [Reports](https://zacx.io/api/tags/Reports/index.md) — Message delivery and cost reports. More reports are coming soon. - [Tags](https://zacx.io/api/tags/Tags/index.md) — Tags available in your workspace. - [Users](https://zacx.io/api/tags/Users/index.md) — Team members in your workspace. - [Wallet](https://zacx.io/api/tags/Wallet/index.md) — Workspace wallet credits. - [List users](https://zacx.io/api/users/list/index.md) — Returns every team member in the workspace. - [Get messages report](https://zacx.io/api/workspace/reports/index.md) — Returns sent, delivered, read, failed, and replied counts plus cost for a date range, in aggregate and per WhatsApp API number. Pass `template_name` to scope the report to one template. `from` and `to` accept either a plain date (`YYYY-MM-DD`) for daily reports or a UTC timestamp (`YYYY-MM-DDTHH:MM:SSZ`) for hourly ranges. - [List tags](https://zacx.io/api/workspace/tags/index.md) — Returns every tag in the workspace. - [Get wallet credits](https://zacx.io/api/workspace/wallet-balance/index.md) — Returns the current wallet balance of the workspace.