### List Communities Request Example Source: https://github.com/z-api/z-api-docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/communities/list-communities.md This example demonstrates how to make a GET request to retrieve a list of communities. It includes the base URL and placeholders for your instance and token. ```http GET https://api.z-api.io/instances/YOUR_INSTANCE/token/YOUR_TOKEN/communities ``` -------------------------------- ### Get SIP Information (No Token Configured) Source: https://github.com/z-api/z-api-docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/calls/sip-info.md This example illustrates the response when no SIP token has been configured for your instance. It provides the SIP server host, user identifier, and indicates that the service is not active. ```json { "host": "sip.z-api.io", "user": "3C67AB641C8AA0412F6A2242B4E23AC7", "active": false } ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/z-api/z-api-docs/blob/main/README.md Installs the necessary packages for the project. Run this command in your project directory. ```bash $ npm install ``` -------------------------------- ### Get Queue Messages Example Source: https://github.com/z-api/z-api-docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/queue/get-queue.md This example demonstrates how to retrieve all messages currently in the queue waiting to be processed. It shows the structure of the response, including message details like ID, delay, content, and recipient information. ```json [ { "_id": "39BB1684570F00E91090F6BBC7EE7646", "DelayMessage": -1, "Message": "Queue message 1", "IsTrial": false, "InstanceId": "3A5D07856DC26A1C9E2E08E691E63271", "Phone": "5511999999999", "ZaapId": "39BB1684570F00E91090F6BBC7EE7646", "DelayTyping": 0, "MessageId": "7AD29EAA5EF34C301F0B", "Created": 1624977905648 }, { "_id": "39BB1684570F00E91090F6BBC7EE7646", "DelayMessage": -1, "Message": "Queue message 2", "IsTrial": false, "InstanceId": "3A5D07856DC26A1C9E2E08E691E63271", "Phone": "5511999999999", "ZaapId": "39BB1684570F00E91090F6BBC7EE7646", "DelayTyping": 5, "MessageId": "7AD29EAA5EF34C301F0B", "Created": 1624977906907 } ] ``` -------------------------------- ### Get Contacts URL Example Source: https://github.com/z-api/z-api-docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/contacts/get-contacts.md This is an example of the URL used to retrieve contacts, demonstrating the pagination parameters 'page' and 'pageSize'. ```HTTP GET https://api.z-api.io/instances/YOUR_INSTANCE/token/YOUR_TOKEN/contacts?page=1&pageSize=20 ``` -------------------------------- ### Example URL for Fetching Groups Source: https://github.com/z-api/z-api-docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/group/get-groups.md This example demonstrates how to construct the URL for fetching groups with pagination parameters. ```http GET https://api.z-api.io/instances/YOUR_INSTANCE/token/YOUR_TOKEN/groups?page=1&pageSize=10 ``` -------------------------------- ### List Collection Products Request Example Source: https://github.com/z-api/z-api-docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/business/list-collection-products.md Example URL demonstrating how to request a list of products from a collection, including optional pagination. ```HTTP GET https://api.z-api.io/instances/{{instanceId}}/token/{{instanceToken}}/catalogs/collection-products/{{catalog-owner-phone}}?collectionId=12312312312&nextCursor=CURSOR_VALUE ``` -------------------------------- ### Get Light Group Metadata Example Source: https://github.com/z-api/z-api-docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/group/light-metadata-group.md This JSON example demonstrates the structure of the response when retrieving light group metadata. It includes group details and participant information, but omits the group invite link. ```json { "phone": "120363019502650977-group", "description": "Z-API Group", "owner": "5511999999999", "subject": "My group on Z-API", "creation": 1588721491000, "invitationLink": null, "invitationLinkError": null, "communityId": null, "adminOnlyMessage": false, "adminOnlySettings": false, "requireAdminApproval": false, "isGroupAnnouncement": false, "participants": [ { "phone": "5511888888888", "isAdmin": false, "isSuperAdmin": false }, { "phone": "5511777777777", "isAdmin": true, "isSuperAdmin": false, "short": "ZAPIs", "name": "ZAPIs Boys" } ], "subjectTime": 1617805323000, "subjectOwner": "554497050785" } ``` -------------------------------- ### Get SIP Information (Token Configured) Source: https://github.com/z-api/z-api-docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/calls/sip-info.md Use this example to understand the response structure when a SIP token is already set up for your instance. It includes details like the SIP server host, user identifier, a masked token, and an active status. ```json { "host": "sip.z-api.io", "user": "3C67AB641C8AA0412F6A2242B4E23AC7", "token": "BZ9***", "active": true } ``` -------------------------------- ### Start Local Development Server Source: https://github.com/z-api/z-api-docs/blob/main/README.md Starts a local development server for live preview of changes. The server restarts automatically when files are modified. ```bash $ npm start ``` -------------------------------- ### Example URL for Listing Categories Source: https://github.com/z-api/z-api-docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/business/available-categories.md This is an example URL demonstrating how to call the API to list available business categories, including an optional search query. ```bash GET https://api.z-api.io/instances/YOUR_INSTANCE/token/YOUR_TOKEN/business/available-categories?query=technology ``` -------------------------------- ### Get Contact Metadata Example Source: https://github.com/z-api/z-api-docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/contacts/get-metadata-contact.md This JSON example shows the structure of the response when retrieving metadata for a contact. Note that the imgUrl is only valid for 48 hours. ```json { "name": "Contact's first and last name", "phone": "551199999999", "notify": "Contact's name on WhatsApp", "short": "Contact's name", "imgUrl": "Contact's photo URL ", "about": "Contact's about status" } ``` -------------------------------- ### Successful Response for Get Products V2 Source: https://github.com/z-api/z-api-docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/business/get-products-phone-v2.md This is an example of a successful response (200 OK) containing product details. It includes cart status, product list with availability, IDs, descriptions, pricing, and images. ```json { "cartEnabled": true, "products": [ { "availability": "in stock", "id": "99999999999999999", "retailerId": null, "description": "mouse description", "price": "100000", "salePrice": "90000", "currency": "BRL", "name": "Mouse", "quantity": null, "images": ["https://"] } ] } ``` -------------------------------- ### Get Product by ID Response Example Source: https://github.com/z-api/z-api-docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/business/get-product-id.md This JSON object represents a successful response when retrieving a product's details. It includes attributes like availability, price, description, and images. ```json { "cartEnabled": true, "catalogId": "99999999999999999", "product": { "availability": "in stock", "id": "99999999999999", "retailerId": null, "description": "A product description", "price": "20000", "salePrice": "18000", "currency": "BRL", "name": "My first product", "images": ["https://"] } } ``` -------------------------------- ### Example URL for Accepting Group Invite Source: https://github.com/z-api/z-api-docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/group/accept-group-invite.md This is an example of the full URL used to accept a group invitation, including a sample invitation URL. ```http GET https://api.z-api.io/instances/YOUR_INSTANCE/token/YOUR_TOKEN/accept-invite-group?url=https://chat.whatsapp.com/bh8XyNrIUj84YZoy5xcaa112 ``` -------------------------------- ### List Collection Products Response Example Source: https://github.com/z-api/z-api-docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/business/list-collection-products.md Example JSON response when successfully listing products from a collection. Includes product details and pagination token. ```JSON { "nextCursor": null, "products": [ { "id": "6988917394481455", "name": "Product Name", "description": "Product Description", "url": "http://site.com/product", "price": "10000", "currency": "BRL", "isHidden": false, "availability": "in stock", "retailerId": "123", "images": [ "https://cdn.greatsoftwares.com.br/files/pages/10603-92bb9420b363835d05d41b96a45d8f4e.png" ], "quantity": "99" } ] } ``` -------------------------------- ### Get Chat Metadata Example Source: https://github.com/z-api/z-api-docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/chats/get-metadata-chat.md This example demonstrates the structure of a successful response when retrieving chat metadata. It includes details like phone number, unread message count, last message time, mute status, spam marking, profile thumbnail URL, group information, and optional notes for WhatsApp Business. ```json { "phone": "5511999999999", "unread": "0", "lastMessageTime": "1619461666", "isMuted": "0", "isMarkedSpam": "false", "profileThumbnail": "https://pps.whatsapp.net/v/t61.24694-24/170931400_212202650511993_3423338295209291992_n.jpg?ccb=11-4&oh=4b96b3bf7114122667f80d021b194f2c&oe=60C179E2", "messagesUnread": 0, "isGroupAnnouncement": false, "isGroup": false, "about": "Profile about", "notes": { "id": "KlesU6f4f/Qd5d6VuAbvOMi31rg/F92owVe/xDYad1C=", "content": "note text", "createdAt": 1655953774000, "lastUpdateAt": 1655953774000 } } ``` -------------------------------- ### Start Local Development Server with English Locale Source: https://github.com/z-api/z-api-docs/blob/main/README.md Starts the local development server with the locale set to English. This is useful for ensuring consistent language display during development. ```bash $ npm run start -- --locale en ``` -------------------------------- ### Accept Newsletter Admin Invite Request Example Source: https://github.com/z-api/z-api-docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/newsletter/accept-newsletter-admin-invite.md Example POST request to accept a newsletter admin invitation. Replace YOUR_INSTANCE and YOUR_TOKEN with your actual credentials and provide the newsletter ID. ```bash POST https://api.z-api.io/instances/YOUR_INSTANCE/token/YOUR_TOKEN/newsletter/accept-admin-invite/120363166555745933@newsletter ``` -------------------------------- ### List Disallowed Contacts URL Example Source: https://github.com/z-api/z-api-docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/privacy/get-disallowed-contacts.md This is an example of the URL used to request the list of disallowed contacts. Ensure you replace `{{instanceId}}` and `{{instanceToken}}` with your actual instance credentials. ```bash GET https://api.z-api.io/instances/{{instanceId}}/token/{{instanceToken}}/disallowed-contacts?type=lastSeen ``` -------------------------------- ### Queue Response Example Source: https://github.com/z-api/z-api-docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/queue/post-queue.md This is an example of a successful response from the queue endpoint. It includes a list of messages, the cursor for the next page (pagingState), and a flag indicating if more messages are available. ```json { "messages": [ { "DelayMessage": -1, "Message": "Test message", "InstanceId": "3E98XXXXXXXXXXXXXXXXXXXF5DDF", "CreatedAt": "2026-03-31T14:40:31.776+00:00", "ZaapId": "019D44XXXXXXXXXXXXXXXXX68DA6", "DelayTyping": 0, "Created": 1774968031776, "Beta": false, "IsTrial": false, "Phone": "120XXXXXXXXXXX305-group", "_id": "019D44XXXXXXXXXXXXXXXXX68DA6", "MessageId": "ECFXXXXXXXXXXXXXX39" } ], "pagingState": "eyJi...", "hasMore": true } ``` -------------------------------- ### Add Admin Request Body Examples Source: https://github.com/z-api/z-api-docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/group/add-admin.md Use these JSON examples to promote group members to admin. The 'groupId' format has changed over time; ensure you use the current format for your group. ```json { "groupId": "5511999999999-1623281429", "phones": ["5544999999999", "5544888888888"] } ``` ```json { "groupId": "120363019502650977-group", "phones": ["5544999999999", "5544888888888"] } ``` -------------------------------- ### JSON Example: Template Localization Return Source: https://github.com/z-api/z-api-docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/webhooks/on-message-received.md This example demonstrates a received message that is a template with localized content, including header information. ```json { "isStatusReply": false, "chatLid": "199016268742711@lid", "connectedPhone": "554499999999", "waitingMessage": false, "isEdit": false, "isGroup": false, "isNewsletter": false, "instanceId": "3C67AB641C8AA0412F6A2242B4E23AC7", "messageId": "27BBF23E0185D363D9", "phone": "554499999999", "fromMe": false, "momment": 1708456969808, "status": "RECEIVED", "chatName": "name", "senderPhoto": null, "senderName": "554499999999", "photo": null, "broadcast": false, "participantLid": null, "forwarded": false, "type": "ReceivedCallback", "fromApi": false, "hydratedTemplate": { "header": { "location": { "longitude": -46.6388, "latitude": -23.5489, "name": "somewhere", "address": "somewhere", "url": "" } }, "message": "message text", "footer": "message footer", "title": "message title", "templateId": "1143940003434066", "hydratedButtons": [] } } ``` -------------------------------- ### Send Order Status Update Example Source: https://github.com/z-api/z-api-docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/message/update-order-status.md This example demonstrates how to send an order status update. It is typically used to inform the system about changes in an order's lifecycle. ```json { "token": "YOUR_TOKEN", "message": [ { "to": "5511999999999@s.whatsapp.net", "type": "text", "text": "Your order #12345 has been shipped." } ] } ``` -------------------------------- ### JSON Example: Button with Image Return Source: https://github.com/z-api/z-api-docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/webhooks/on-message-received.md This example shows a received message that includes a buttons message with an image, featuring multiple buttons with display text. ```json { "isStatusReply": false, "chatLid": "81896604192873@lid", "connectedPhone": "554499999999", "waitingMessage": false, "isEdit": false, "isGroup": false, "isNewsletter": false, "instanceId": "3C67AB641C8AA0412F6A2242B4E23AC7", "messageId": "9D968A5FA2880508C4", "phone": "554499999999", "fromMe": false, "momment": 1708455444850, "status": "RECEIVED", "chatName": "name", "senderPhoto": null, "senderName": "554499999999", "photo": null, "broadcast": false, "participantLid": null, "forwarded": false, "type": "ReceivedCallback", "fromApi": false, "buttonsMessage": { "imageUrl": "Image URL", "videoUrl": null, "message": "Message text", "buttons": [ { "buttonId": "1", "type": 1, "buttonText": { "displayText": "Button text 1" } }, { "buttonId": "2", "type": 1, "buttonText": { "displayText": "Button text 2" } } ] } } ``` -------------------------------- ### Payment Made Return Example Source: https://github.com/z-api/z-api-docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/webhooks/on-message-received.md Provides an example of a webhook payload indicating a payment request. This structure details the payment amount, currency, expiration, and status, essential for tracking financial transactions. ```json { "waitingMessage": false, "isGroup": false, "instanceId": "A20DA9C0183A2D35A260F53F5D2B9244", "messageId": "A20DA9C0183A2D35A260F53F5D2B9244", "phone": "5544999999999", "fromMe": false, "momment": 1632229683000, "status": "RECEIVED", "chatName": "name", "senderPhoto": "https://", "senderName": "name", "participantPhone": null, "participantLid": null, "photo": "https://", "broadcast": false, "type": "ReceivedCallback", "requestPayment": { "value": 1, "currencyCode": "BRL", "expiration": 1632834482000, "requestPhone": "5544999999999", "paymentInfo": { "receiverPhone": "5544999999999", "value": 1, "currencyCode": "BRL", "status": "WAITING", "transactionStatus": "COLLECT_SUCCESS" } }, "instanceId": "instance.id" } ``` -------------------------------- ### Group Metadata Example (Old Format) Source: https://github.com/z-api/z-api-docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/group/metadata-group.md Example JSON response for group metadata using the older WhatsApp group ID format. ```json { "phone": "5511999999999-1623281429", "owner": "5511999999999", "subject": "My group on WhatsApp", "creation": 1588721491000, "participants": [ { "phone": "5511888888888", "isAdmin": false, "isSuperAdmin": false }, { "phone": "5511777777777", "isAdmin": true, "isSuperAdmin": false, "short": "ZAPIs", "name": "ZAPIs Boys" } ], "subjectTime": 1617805323000, "subjectOwner": "554497050785" } ``` -------------------------------- ### JSON Example: Template OTP Button Return Source: https://github.com/z-api/z-api-docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/webhooks/on-message-received.md This example shows a template message with an OTP (One-Time Password) button, including a display text and a URL for the button. ```json { "isStatusReply": false, "chatLid": "81896604192873@lid", "connectedPhone": "554499999999", "waitingMessage": false, "isEdit": false, "isGroup": false, "isNewsletter": false, "instanceId": "3C67AB641C8AA0412F6A2242B4E23AC7", "messageId": "9D968A5FA2880508C4", "phone": "554499999999", "fromMe": false, "momment": 1708455444850, "status": "RECEIVED", "chatName": "name", "senderPhoto": null, "senderName": "554499999999", "photo": null, "broadcast": false, "participantLid": null, "forwarded": false, "type": "ReceivedCallback", "fromApi": false, "hydratedTemplate": { "header": {}, "message": "Message text", "footer": "", "title": "", "templateId": "", "hydratedButtons": [ { "urlButton": { "displayText": "Copy code", "url": "https://www.whatsapp.com/otp/code/?otp_type=COPY_CODE&code=otp123" }, "index": 0 } ] } } ``` -------------------------------- ### List Communities Response Example Source: https://github.com/z-api/z-api-docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/communities/list-communities.md This is an example of a successful response (200 OK) when listing communities. It shows the structure of the returned JSON array, with each object containing the community's name and ID. ```json [ { "name": "my first community", "id": "98372465382764532938" } ] ``` -------------------------------- ### Delete Queue Request Example Source: https://github.com/z-api/z-api-docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/queue/delete-queue.md This example demonstrates how to send a DELETE request to clear the message queue. Ensure you replace placeholders with your actual instance and token. ```http DELETE https://api.z-api.io/instances/YOUR_INSTANCE/token/YOUR_TOKEN/queue ``` -------------------------------- ### Group Metadata Example (New Format) Source: https://github.com/z-api/z-api-docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/group/metadata-group.md Example JSON response for group metadata using the newer WhatsApp group ID format, including additional fields like description and invitation link. ```json { "phone": "120363019502650977-group", "description": "Z-API group", "owner": "5511999999999", "subject": "My group in Z-API", "creation": 1588721491000, "invitationLink": "https://chat.whatsapp.com/40Aasd6af1", "invitationLinkError": null, "communityId": null, "adminOnlyMessage": false, "adminOnlySettings": false, "requireAdminApproval": false, "isGroupAnnouncement": false, "participants": [ { "phone": "5511888888888", "isAdmin": false, "isSuperAdmin": false }, { "phone": "5511777777777", "isAdmin": true, "isSuperAdmin": false, "short": "ZAPIs", "name": "ZAPIs Boys" } ], "subjectTime": 1617805323000, "subjectOwner": "554497050785" } ``` -------------------------------- ### Example JSON for Get Message Chat Source: https://github.com/z-api/z-api-docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/chats/get-message-chats.md This is an example JSON payload for the get message chat endpoint. It demonstrates the expected structure for retrieving chat messages. ```json { "id": "11011111111", "fromMe": false, "isMedia": false, "author": "5511999999999@c.us", "time": 1620161111, "message": "Hello", "token": "a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1", "pushName": "Name", "isGroup": false } ``` -------------------------------- ### Create Instance Source: https://github.com/z-api/z-api-docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/partner/create-instance.md Method used to create an instance linked to your account. Instances can be used as a trial for 2 days before subscription. ```APIDOC ## POST /instances/integrator/on-demand ### Description Method used to create an instance linked to your account. You have 2 days to use it as a trial before needing to subscribe. ### Method POST ### Endpoint https://api.z-api.io/instances/integrator/on-demand ### Parameters #### Request Body - **name** (string) - Required - Name of instance to be created - **sessionName** (string) - Optional - Attribute to change the session name on WhatsApp (on connected devices) - **deliveryCallbackUrl** (string) - Optional - Webhook endpoint for delivered messages - delivery - **receivedCallbackUrl** (string) - Optional - Webhook endpoint for received messages - receive - **receivedAndDeliveryCallbackUrl** (string) - Optional - Webhook endpoint for received and sent messages - receive - **presenceChatCallbackUrl** (string) - Optional - Webhook endpoint for chat status updates - presenceChat - **disconnectedCallbackUrl** (string) - Optional - Webhook endpoint for disconnection or communication loss - disconnected - **connectedCallbackUrl** (string) - Optional - Webhook endpoint for connection events - connected - **messageStatusCallbackUrl** (string) - Optional - Webhook endpoint for message status updates - messageStatus - **callRejectAuto** (boolean) - Optional - Automatically reject incoming calls - "true" or "false" - **callRejectMessage** (string) - Optional - Message sent after automatically rejecting a call - **autoReadMessage** (boolean) - Optional - Automatically mark messages as read - "true" or "false" - **autoReadStatus** (boolean) - Optional - Automatically mark status as read - "true" or "false" - **isDevice** (boolean) - Optional - Defines whether the instance is mobile or web; if "true", it will be mobile - **businessDevice** (boolean) - Optional - Choose between WhatsApp Business or regular WhatsApp - **disableEnqueueWhenDisconnected** (boolean) - Optional - Enable/disable message queueing when creating the instance ### Request Example { "name": "Instancia Z-API - 9292812", "sessionName": "Testes testes", "deliveryCallbackUrl": "https://mywebhook.com/delivery", "receivedCallbackUrl": "https://mywebhook.com/receive", "receivedAndDeliveryCallbackUrl": "https://mywebhook.com/receivedanddelivery", "disconnectedCallbackUrl": "https://mywebhook.com/disconnected", "connectedCallbackUrl": "https://mywebhook.com/receive", "presenceChatCallbackUrl": "https://mywebhook.com/presencechat", "messageStatusCallbackUrl": "https://mywebhook.com/status", "callRejectAuto": false, "callRejectMessage": "Test message for rejected calls", "autoReadMessage": false, "autoReadStatus": false, "isDevice": false, "businessDevice": false, "disableEnqueueWhenDisconnected": true } ### Response #### Success Response (200) - **id** (string) - Created instance ID - **token** (string) - TOKEN of the created instance - **due** (timestamp) - Instance expiration date #### Response Example { "id": "8823XWIE982KII99012K2L" "token": "8900LS009W0011OOOPPIPIP00912OOLCKAOOOE009919" "due": "329000002121" } #### Error Responses - **405 Method Not Allowed**: Ensure you are using the POST method. - **415 Unsupported Media Type**: Ensure the "Content-Type" header is set, typically to "application/json". ``` -------------------------------- ### Get Products API Response Example Source: https://github.com/z-api/z-api-docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/business/get-products.md This JSON structure represents a successful response when retrieving products from a WhatsApp Business catalog. It includes details about cart status and a list of products with their attributes. ```json { "cartEnabled": true, "products": [ { "availability": "in stock", "id": "999999999999999", "retailerId": null, "description": "mouse description", "price": "100000", "salePrice": "90000", "currency": "BRL", "name": "Mouse", "quantity": null, "images": ["https://"] } ] } ``` -------------------------------- ### Get Account Email Response Example Source: https://github.com/z-api/z-api-docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/mobile/get-account-email.md This JSON object shows a successful response when retrieving account email details. It indicates if the request was successful, if an email is configured, the email address itself, and its verification status. ```json { "success": true, "hasEmail": true, "email": "example@email.com", "verified": true } ``` -------------------------------- ### Product Return Example Source: https://github.com/z-api/z-api-docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/webhooks/on-message-received.md This JSON payload details a received product message. It includes information about the sender, message, and a 'product' object with details like price, description, and image. ```json { "waitingMessage": false, "isGroup": false, "instanceId": "A20DA9C0183A2D35A260F53F5D2B9244", "messageId": "A20DA9C0183A2D35A260F53F5D2B9244", "phone": "5544999999999", "fromMe": false, "momment": 1632233527000, "status": "RECEIVED", "senderPhoto": "https://", "senderName": "5544999999999", "participantPhone": null, "participantLid": null, "photo": "https://", "broadcast": false, "type": "ReceivedCallback", "product": { "productImage": "https://", "businessOwnerJid": "5544999999999", "currencyCode": "BRL", "productId": "99999999999999999999", "description": "", "productImageCount": 1, "price": 1, "url": "", "retailerId": "", "firstImageId": "", "title": "name" }, "instanceId": "instance.id" } ``` -------------------------------- ### Get Tags Colors API Response Example Source: https://github.com/z-api/z-api-docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/business/get-tags-colors.md This JSON object displays the available tag colors. The keys are color indices, and the values are hexadecimal color codes. Colors might vary between Android and iPhone platforms. ```json { "0": "#FF9485", "1": "#64C4FF", "2": "#FFD429" } ``` -------------------------------- ### Get Contacts Response Example Source: https://github.com/z-api/z-api-docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/contacts/get-contacts.md This JSON structure represents a successful response when retrieving contacts. It includes details like the contact's name, short name, WhatsApp display name, vCard name, and phone number. ```JSON [ { "name": "Nome e sobrenome do contato 1", "short": "Nome do contato 1", "notify": "Nome no WhatsApp 1", "vname": "Nome no vcard", "phone": "559999999999" } ] ``` -------------------------------- ### Template Document Return Example Source: https://github.com/z-api/z-api-docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/webhooks/on-message-received.md Demonstrates the structure of a received message that is a templated document, including header and button information. ```json { "isStatusReply": false, "chatLid": "81896604192873@lid", "connectedPhone": "554499999999", "waitingMessage": false, "isEdit": false, "isGroup": false, "isNewsletter": false, "instanceId": "3C67AB641C8AA0412F6A2242B4E23AC7", "messageId": "9D968A5FA2880508C4", "phone": "554499999999", "fromMe": false, "momment": 1708455444850, "status": "RECEIVED", "chatName": "name", "senderPhoto": null, "senderName": "554499999999", "photo": null, "broadcast": false, "participantLid": null, "forwarded": false, "type": "ReceivedCallback", "fromApi": false, "hydratedTemplate": { "header": { "document": { "caption": null, "documentUrl": "https://example.pdf", "mimeType": "application/pdf", "title": "", "pageCount": 0, "fileName": "" } }, "message": "message text", "footer": "message footer", "title": "message title", "templateId": "811492407484976", "hydratedButtons": [] } } ``` -------------------------------- ### Get Newsletter Metadata Example Source: https://github.com/z-api/z-api-docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/newsletter/newsletter-metadata.md This JSON object represents the metadata of a newsletter, including its ID, creation time, state, name, description, subscriber count, invite link, verification status, picture URLs, and view metadata (mute status and user role). ```json { "id": "999999999999999999@newsletter", "creationTime": "1695643504", "state": "ACTIVE", "name": "Z-API", "description": "Official Z-API Newsletter", "subscribersCount": "123", "inviteLink": "https://www.whatsapp.com/channel/0029Va5Xk71a", "verification": "VERIFIED", "picture": "https://mmg.whatsapp.net/v/t61.24694-24/383686038_859672472421500_990610487096734362_n.jpg?ccb=11-4&oh=01_AdS-Wk3RSfXmtEqDA4-LTFaZQILXZSprywV8EwNoZPOaGw&oe=651EF162&_nc_sid=000000&_nc_cat=111", "preview": "https://mmg.whatsapp.net/v/t61.24694-24/383686038_859672472421500_990610487096734362_n.jpg?stp=dst-jpg_s192x192&ccb=11-4&oh=01_AdRltWYOZftf0cnm-GNw5RRGoxQ53nJR9zzxxot_N7JQCw&oe=651EF162&_nc_sid=000000&_nc_cat=111", "viewMetadata": { "mute": "OFF", "role": "OWNER" } } ``` -------------------------------- ### Get Chats Response Example Source: https://github.com/z-api/z-api-docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/chats/get-chats.md This JSON object demonstrates the structure of a successful response when retrieving chats. It includes details for each chat such as name, phone number, unread message count, last message time, mute status, spam marking, profile thumbnail, group status, and optional notes for business accounts. ```json [ { "name": "Z-API SUPORTE", "phone": "5511999999999", "unread": "0", "lastMessageTime": "1622991687", "isMuted": "0", "isMarkedSpam": "false", "profileThumbnail": null, "messagesUnread": 0, "isGroupAnnouncement": false, "isGroup": false }, { "name": "Z-api - Team", "phone": "5511999999999", "unread": "0", "lastMessageTime": "1622990503", "isMuted": "0", "isMarkedSpam": "false", "profileThumbnail": "https://pps.whatsapp.net/v/t61.24694-24/170931400_212202650511993_3423338295209291992_n.jpg?ccb=11-4&oh=4b96b3bf7114122667f80d021b194f2c&oe=60C179E2", "messagesUnread": 0, "isGroupAnnouncement": false, "isGroup": false, "notes": { "id": "KlesU6f4f/Qd5d6VuAbvOMi31rg/F92owVe/xDYad1C=", "content": "note text", "createdAt": 1655953774000, "lastUpdateAt": 1655953774000 } } ] ``` -------------------------------- ### Request Body Example Source: https://github.com/z-api/z-api-docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/mobile/confirm-security-code.md This is an example of the JSON request body required to confirm the two-step verification PIN code. ```json { "code": "123456" } ``` -------------------------------- ### Cancel Instance Request Example Source: https://github.com/z-api/z-api-docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/partner/unsubscribe-instance.md This example demonstrates how to cancel an instance using the Z-API. Ensure you have the correct instance ID and token. ```json { "id": "your_instance_id", "token": "your_instance_token" } ``` -------------------------------- ### Button with Video Return Example Source: https://github.com/z-api/z-api-docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/webhooks/on-message-received.md Demonstrates a webhook payload for a message containing buttons with a video URL. This is useful for interactive messages where a video is presented alongside selectable options. ```json { "isStatusReply": false, "chatLid": "81896604192873@lid", "connectedPhone": "554499999999", "waitingMessage": false, "isEdit": false, "isGroup": false, "isNewsletter": false, "instanceId": "3C67AB641C8AA0412F6A2242B4E23AC7", "messageId": "9D968A5FA2880508C4", "phone": "554499999999", "fromMe": false, "momment": 1708455444850, "status": "RECEIVED", "chatName": "name", "senderPhoto": null, "senderName": "554499999999", "photo": null, "broadcast": false, "participantLid": null, "forwarded": false, "type": "ReceivedCallback", "fromApi": false, "buttonsMessage": { "imageUrl": null, "videoUrl": "Video URL", "message": "Message text", "buttons": [ { "buttonId": "1", "type": 1, "buttonText": { "displayText": "Button text 1" } }, { "buttonId": "2", "type": 1, "buttonText": { "displayText": "Button text 2" } } ] } } ``` -------------------------------- ### List Instances Response Example Source: https://github.com/z-api/z-api-docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/partner/list-instances.md This JSON structure represents a successful response when listing instances. It includes pagination details and an array of instance objects. ```json { "total": 1, "totalPage": 1, "pageSize": 1, "page": 1, "content": [ { "token": "", "tenant": "", "created": "", "due": 1648565999675, "paymentStatus": "", "deliveryCallbackUrl": "", "receivedCallbackUrl": "", "disconnectedCallbackUrl": "", "messageStatusCallbackUrl": "", "receivedAndDeliveryCallbackUrl": "", "presenceChatCallbackUrl": "", "connectedCallbackUrl": "", "receivedStatusCallbackUrl": "", "phoneConnected": false, "whatsappConnected": false, "middleware": "web", "name": "", "id": "" } ] } ``` -------------------------------- ### Leave Group Request Body Examples Source: https://github.com/z-api/z-api-docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/group/leave-group.md Provides examples of the request body for the leave-group method, demonstrating both the old and new formats for groupId. ```json { "groupId": "5511999999999-1623281429" } ``` ```json { "groupId": "120363019502650977-group" } ``` -------------------------------- ### Create Group Response (Old Way) Source: https://github.com/z-api/z-api-docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/group/create-group.md This is an example of a successful response when creating a group using the older method. It provides the group ID and an invitation link. ```json { "phone": "5511999999999-1623281429", "invitationLink": "https://chat.whatsapp.com/DCaqftVlS6dHWtlvfd3hUa" } ``` -------------------------------- ### Send Carousel Message Example Source: https://github.com/z-api/z-api-docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/message/send-message-carousel.md This example demonstrates how to send a carousel message. Ensure the 'Content-Type' header is set to 'application/json' when sending JSON payloads. ```json { "type": "carousel", "elements": [ { "title": "Product 1", "subtitle": "Description of product 1", "image_url": "https://example.com/image1.jpg", "buttons": [ { "type": "postback", "title": "View Details", "payload": "product_1_details" } ] }, { "title": "Product 2", "subtitle": "Description of product 2", "image_url": "https://example.com/image2.jpg", "buttons": [ { "type": "postback", "title": "View Details", "payload": "product_2_details" } ] } ] } ```