### Response example for getting a list of users Source: https://wazzup24.com/help/api-en/working-with-the-user-entity The API returns an array of user objects, each containing an 'id' and 'name'. ```json [ { "id": "2e0df379-0e3c-470f-9b36-06b9e34c3bdb", // user id "name": "User Name" // user name } ] ``` -------------------------------- ### Simulation of client integration installation (Wauth test) Source: https://wazzup24.com/help/api-en/wauth Simulates the installation of an integration by a client, used for testing the Wauth flow. ```APIDOC ## POST /v3/wauth ### Description Simulates the installation of the integration by the client for testing purposes. ### Method POST ### Endpoint https://api.wazzup24.com/v3/wauth ### Parameters #### Request Body - **type** (String) - Required - `crmCode` specified by the integrator at the moment of POST /v3/marketplace call. - **domain** (String) - Optional - It is needed if the `authRedirectUri` parameter is left empty. In the `domain` parameter, add the full link to the CRM account: with protocol and domain. For example, https://accountcrm.com/. We will redirect to this address to confirm authorization. Just like when your client specifies a unique link when connecting. ``` -------------------------------- ### WABA Template Response Example Source: https://wazzup24.com/help/api-en/whatsapp-business-api-templates This is an example of a successful response when retrieving WABA templates. It includes details such as template GUID, account ID, name, category, language, components, and WABA information. ```json HTTP/1.1 200 OK [ { "templateGuid": "8d255e5d-aefd-44dc-8131-c3ad6c3ab28c", "accountId": 70789196, "title": "Template name", "channels": ["e9a268e4-44af-41cd-9b63-2524a4ad653e"], "order": 0, "category": "MARKETING", "language": "ru", "components": [ { "text": "Hi, !", "type": "HEADER", "format": "TEXT", "example": { "header_text": ["header-example-1"] } }, { "text": "We have some news", "type": "BODY", "example": { "body_text": [["body-example-1"]] } } ], "waba": { "wabaId": "194388939529290", "wabaName": "Wazzup LLC" }, "name": "Template name", "namespace": "c8ae5f90_307a_ca4c_b8f6_d1e2a2573574", "publishedAt": null, "isTrickyTemplate": false, "trickyTemplatesPriority": null, "createdAt": "2023-12-31T23:55:42.504Z", "updatedAt": "2023-12-31T23:55:08.857Z", "componentsDefaults": {}, "tags": null, "templateCode": "@template: fe03cddf-dec1-4c19-aede-e16190abca46 { [[headerVar1]]; [[bodyVar1]] }" } ] ``` -------------------------------- ### Request example for getting a list of users Source: https://wazzup24.com/help/api-en/working-with-the-user-entity Use this curl command to authenticate and request a list of active Wazzup users. Ensure your Authorization header contains a valid bearer token. ```curl curl --location --request GET 'https://api.wazzup24.com/v3/users' \ --header 'Authorization: Bearer c8cf90444442348we909520d454368d27' ``` -------------------------------- ### Simulate Client Integration Installation (Wauth Test) Source: https://wazzup24.com/help/api-en/wauth This endpoint simulates the installation of an integration by a client. It requires a 'type' parameter and optionally a 'domain' if authRedirectUri is empty. ```json { "type": "crmCode specified by the integrator at the moment of POST /v3/marketplace call", "domain": "It is needed if the authRedirectUri parameter is left empty, because each client has a unique link. In the domain parameter add the full link to the CRM account: with protocol and domain. For example, https://accountcrm.com/ We will redirect to this address to confirm authorization. Just like when your client specifies a unique link when connecting" } ``` -------------------------------- ### Full Integration Example Source: https://wazzup24.com/help/api-en/unanswered-counter This example demonstrates connecting to the notification service, handling connection events, and updating an HTML element with the unanswered counter. Ensure socket.io library version 4.1.3 is included. ```html
// apiKey of integration obtained from the Wazzup personal account const apiKey = '420dadbdd4570844bf3b22629е71'; // id of the sales rep from your CRM const userId = 'user1'; // Options for connecting to the notification service const connectOptions = { path: '/ws-counters/', transports: ['websocket', 'polling'] }; // Getting the url to connect to the notification service fetch(`https://integrations.wazzup24.com/counters/ws_host/api_v3/${apiKey}`) .then((response) => response.json()) .then((data) => { const { host } = data; // Connecting with socket.io const client = io(`https://${host}`, connectOptions); // Listening to the event 'connect' client.on('connect', () => { // Completing the connection: broadcasting the event 'counterConnecting', // in which we send the customer data client.emit('counterConnecting', { type: 'api_v3', apiKey, userId }); }); // Connection confirmation client.on('counterConnected', () => console.log('Connected to Wazzup notifications!')); // Updating the unanswered counter client.on('counterUpdate', (data) => { const { counter } = data; document.getElementById('counter').innerHTML = counter; }) }) .catch((error) => { console.log('Connection error', error); }); ``` -------------------------------- ### Get a list of deals from Wazzup Source: https://wazzup24.com/help/api-en/working-with-a-list-of-deals Send a GET request to retrieve deals. You can fetch up to 100 records per request. Use the 'offset' parameter for pagination if needed. ```bash curl --location --request GET 'https://api.wazzup24.com/v3/deals' \ --header 'Authorization: Bearer c8cf90474023482f909520d45f368d27' ``` -------------------------------- ### PATCH Marketplace Request Example Source: https://wazzup24.com/help/api-en/wauth Example of how to update marketplace information using a PATCH request. Ensure to include the correct Authorization header and Content-Type. ```bash curl --location --request PATCH 'https://api.wazzup24.com/v3/marketplace' \ --header 'Authorization: Bearer 4a0b541a61244aa9a281fba4816da48d' \ --header 'Content-Type: application/json' \ --data-raw '{ "crmName": "The Cool CRM", "logo": { "name": "the-cool-crm.svg", "content": "YmFzZTY0LWVuY29kZWQtbG9nby1maWxlLWNvbnRlbnQK" } }' ``` -------------------------------- ### Successful Response Example Source: https://wazzup24.com/help/api-en/sending-messages This is an example of a successful API response when sending a message. ```http HTTP/1.1 201 OK { "messageId": "f66c53a6-957a-46b2-b41b-5a2ef4844bcb", "chatId": "79999999999" } ``` -------------------------------- ### Channel List Response Example Source: https://wazzup24.com/help/api-en/working-with-channels This is an example of a successful response when retrieving the channel list. It includes essential details like channel ID, transport type, plain ID, and current state. ```json [ { "channelId": string, "transport": "whatsapp", "plainId": "79865784457", "state": "active" } ] ``` -------------------------------- ### Instagram Post Object Example Source: https://wazzup24.com/help/api-en/webhooks Example of the object structure received for an Instagram post via webhook. ```json { id: '2430659146657243411_41370968890', src: 'https://www.instagram.com/p/CG7b52ejyET', sha1: 'dc8c036b4a0122bb238fc38dcb0391c125e916f2', likes: 0, author: 'wztestdlv', comments: 22, timestamp: 1603977171000, updatedAt: 1608905897958, authorName: '', authorId: '798633247', description: 'Beauty', previewSha1: '3a55c2920912de4b6a66d24568470dd4ad367c34', imageSrc: 'https://store.dev-wazzup24.com/dc8c036b4a0122bb238fc38dcb0391c125e916f2', previewSrc: 'https://store.dev-wazzup24.com/3a55c2920912de4b6a66d24568470dd4ad367c34' } ``` -------------------------------- ### Example cURL Request for Chat Window API Source: https://wazzup24.com/help/api-en/chat-window-iframe This example demonstrates how to make a POST request to the iframe API with user, scope, filter, and activeChat details. It includes the necessary Authorization and Content-Type headers. ```bash curl --location --request POST 'https://api.wazzup24.com/v3/iframe' \ --header 'Authorization: Bearer c8cf90554027882f912520f454468d27' \ --header 'Content-Type: application/json' \ --data-raw '{ "user": { "id": "222555", "name": "User Name" }, "scope": "card", "filter": [ { "chatType": "whatsapp", "chatId": "79998887766" } ], "activeChat": { "chatType": "whatsapp", "chatId": "79998887766" } }' ``` -------------------------------- ### WhatsApp Sticker Webhook Example Source: https://wazzup24.com/help/api-en/webhooks Example payload for a WhatsApp sticker received via webhook. Stickers are sent as type 'image' with a .was file link. ```json { "messages": [ { "messageId": "6a2087e8-e0f4-9999-b968-9d9999933c81", "dateTime": "2025-05-06T14:16:00.002Z", "channelId": "b96a353b-9999-4cac-8413-ba99999f981", "chatType": "whatsapp", "chatId": "79999999999", "type": "image", "isEcho": false, "contact": { "name": "79999999999", "avatarUri": "https://store.wazzup24.com/0e999997ae07d2083c687253b8baed9999a26fa"; }, "contentUri": "https://store.wazzup24.com/e51159999e0046d628b3924161d411e5812d2546/?filename=f9ebe1b1-3ed5-4ec2-97fb-03f0c25e413f.was";, "status": "inbound" } ] } ``` -------------------------------- ### Get information on an individual deal Source: https://wazzup24.com/help/api-en/working-with-a-list-of-deals Retrieve details for a specific deal by making a GET request to the deals endpoint, including the deal's ID in the URL. ```bash GET https://api.wazzup24.com/v3/deals/{deal id} ``` -------------------------------- ### Sales Funnel Creation Request Example Source: https://wazzup24.com/help/api-en/loading-sales-funnels Example of a POST request to the /v3/pipelines endpoint to create or update sales funnels. The body should be a JSON array of funnel objects, each with an ID, name, and an array of stages. ```javascript fetch("https://api.wazzup24.com/v3/pipelines", { method: "POST", headers: { "Content-Type": "application/json", "Authorization": "Bearer {apiKey}", }, body: [ { id: "string-id", name: "Signed up" stages: [ { id: "1" name: "Test period" }, ... ] }, ... ] }); ``` -------------------------------- ### Webhook Response Example Source: https://wazzup24.com/help/api-en/webhooks A successful webhook subscription or update typically returns a simple 'ok' confirmation. ```json { ok } ``` -------------------------------- ### Webhook Configuration Response Source: https://wazzup24.com/help/api-en/webhooks This is an example of the response when checking the current webhook configuration. It shows the registered URI and the active subscriptions. ```json HTTP/1.1 200 OK { "webhooksUri": "https://example.com/webhooks", { "subscriptions": { { "messagesAndStatuses": { "true", { "contactsAndDealsCreation": "true" } } } } ``` ``` -------------------------------- ### Connect to Unanswered Counter Service Source: https://wazzup24.com/help/api-en/unanswered-counter Example of connecting to the WebSocket service and emitting the connection event. ```APIDOC ## Connect to Unanswered Counter Service ### Description This section details how to connect to the WebSocket service using socket.io and emit the necessary event to establish the counter connection. ### Method WebSocket Event Emission ### Event `counterConnecting` ### Payload ```json { "type": "api_v3", "apiKey": "YOUR_API_KEY", "userId": "YOUR_USER_ID" } ``` ### Parameters - **type** (string) - Required - Constant value: `"api_v3"`. - **apiKey** (string) - Required - Your integration API key. - **userId** (string) - Required - Your User ID in the CRM. ### Connection Example (JavaScript) ```javascript // Assuming you have obtained the wsHost from the GET /counters/ws_host/api_v3/:apiKey endpoint const wsHost = 'ws-counters2.wazzup24.com'; const connectOptions = { path: '/ws-counters/', transports: ['websocket', 'polling'] }; const client = io(`https://${wsHost}`, connectOptions); client.on('connect', () => { client.emit('counterConnecting', { type: 'api_v3', apiKey: 'YOUR_API_KEY', userId: 'YOUR_USER_ID' }); }); client.on('counterConnected', () => { console.log('Connected to Wazzup notifications!'); }); client.on('counterUpdate', (data) => { const { counter } = data; // Update your UI with the counter value console.log('Unanswered counter:', counter); }); ``` ``` -------------------------------- ### Get WABA Templates List Source: https://wazzup24.com/help/api-en/whatsapp-business-api-templates Send a GET request to this endpoint to retrieve a list of WABA templates created in your Wazzup account. You can use 'limit' and 'offset' parameters to paginate the results. ```http GET https://api.wazzup24.com/v3/templates/whatsapp ``` -------------------------------- ### Sales Funnel List Response Example Source: https://wazzup24.com/help/api-en/loading-sales-funnels Example of a successful HTTP response (200 OK) when retrieving a list of sales funnels. The response is a JSON array containing funnel objects, each with an ID, name, and stages. ```json HTTP/1.1 200 OK [ { id: "string-id", name: "Signed up" stages: [ { id: "1" name: "Test period" }, ... ] }, ... ] ``` -------------------------------- ### Check Webhook Configuration Source: https://wazzup24.com/help/api-en/webhooks Use this GET request to retrieve the currently configured webhook URI and subscription settings. ```http GET https://api.wazzup24.com/v3/webhooks ``` -------------------------------- ### Get List of Loaded Sales Funnels Source: https://wazzup24.com/help/api-en/loading-sales-funnels Call this GET endpoint to retrieve a list of all sales funnels currently loaded in the system. The response will be a JSON array of funnel objects. ```http GET https://api.wazzup24.com/v3/pipelines ``` -------------------------------- ### Retrieve WABA Templates with cURL Source: https://wazzup24.com/help/api-en/whatsapp-business-api-templates Example using cURL to fetch the list of WABA templates. Ensure your 'Authorization' header contains a valid Bearer token. ```curl curl --location --request GET 'https://api.wazzup24.com/v3/templates/whatsapp' \ --header 'Authorization: Bearer f6433fb8f4c648fasssf0e9f43a334c1b' \ --data-raw '' ``` -------------------------------- ### Getting information on an individual deal Source: https://wazzup24.com/help/api-en/working-with-a-list-of-deals Retrieve detailed information for a specific deal by providing its ID in the URL. ```APIDOC ## GET /v3/deals/{deal id} ### Description Retrieves detailed information for a specific deal using its ID. ### Method GET ### Endpoint https://api.wazzup24.com/v3/deals/{deal id} ### Parameters #### Path Parameters - **deal id** (String) - Required - The ID of the deal to retrieve. ### Response #### Success Response (200) - **id** (Number) - Deal ID. Max 100 characters. - **responsibleUserId** (String) - ID of the responsible user. Max 100 characters. - **name** (String) - Name of the deal. Max 200 characters. - **uri** (String) - Link to the deal in the CRM. Max 200 characters. - **contacts** (Object) - An array with the IDs of contacts associated with the deal. Contact IDs can be strings. - **closed** (Boolean) - Flag marking closed deals. ### Response Example ```json { "id": "1", "responsibleUserId": "id007", "name": "Daily Deal Test", "closed": false, "contacts": ["111-2e0df379-0e3c-470f-9b36"], "uri": "https://link-to-deal-in-crm.com" } ``` ``` -------------------------------- ### Response example for retrieving single user data Source: https://wazzup24.com/help/api-en/working-with-the-user-entity A single user's data is returned as a JSON object containing their ID, name, and phone number. ```json { "id": "2e0df379-0e3c-470f-9b36-06b9e34c3bdb", // user id "name": "User Name", // user name "phone": "79332345432" // user phone } ``` -------------------------------- ### WebSocket Host Response Example Source: https://wazzup24.com/help/api-en/unanswered-counter The response to the WebSocket host URL request will be a JSON object containing the host address. ```json { "host": "ws-counters2.wazzup24.com" } ``` -------------------------------- ### Get Channel List Source: https://wazzup24.com/help/api-en/working-with-channels Use this endpoint to retrieve a list of all channels connected to your Wazzup account. Ensure your request includes a valid Authorization header. ```bash curl --location --request GET 'https://api.wazzup24.com/v3/channels' \ --header 'Authorization: Bearer c8cf90444023482f909520d454368d27' ``` -------------------------------- ### WAuth Connection Response Source: https://wazzup24.com/help/api-en/wauth Example of a successful HTTP 200 OK response from the Wazzup v3/connect endpoint, containing a data field with the generated API key. ```http HTTP/1.1 200 OK { "data": "1365e2e9119c4d889ca467cc4a9e6a48" } ``` -------------------------------- ### WAuth Setup - Step 1: POST v3/marketplace Source: https://wazzup24.com/help/api-en/wauth This endpoint is used to pass initial field values for setting up an integration. These parameters are used when a client selects a CRM in the Wazzup marketplace and clicks 'Connect'. ```APIDOC ## POST v3/marketplace ### Description Initiates the WAuth setup by passing integration details. ### Method POST ### Endpoint /v3/marketplace ### Parameters #### Request Body - **crmCode** (String) - Required - A unique string identifier for the CRM. - **authRedirectUri** (String) - Optional - The URI to redirect the user to for authorization confirmation. If empty, the user will be prompted to provide it. - **secret** (String) - Required - A secret key used for server-to-server requests during integration confirmation. ``` -------------------------------- ### Upload a list of deals to Wazzup Source: https://wazzup24.com/help/api-en/working-with-a-list-of-deals Send a POST request to upload deals. Deals are matched by ID; new deals are added, existing ones are updated. A maximum of 100 deals can be uploaded per query. ```bash curl --location --request POST 'https://api.wazzup24.com/v3/deals' \ --header 'Authorization: Basic c8cf90444023482f909520d454368d27' \ --header 'Content-Type: application/json' \ --data-raw '[ { "id": "1", "responsibleUserId": "id007", "name": "Daily Deal Test", "closed": false, "contacts": ["111-2e0df379-0e3c-470f-9b36"], "link": "https://link-to-deal-in-crm.com"; } ]' ``` -------------------------------- ### Example: Delete Message using cURL Source: https://wazzup24.com/help/api-en/sending-messages This example demonstrates how to delete a message using cURL, including the endpoint and authorization header. ```curl curl --location --request DELETE 'https://api.wazzup24.com/v3/message/6f1b3c67-3008-488b-9abc-12fcac6de134' \ --header 'Authorization: Bearer {apiKey|sidecarApiKey}' ``` -------------------------------- ### Request example for adding users Source: https://wazzup24.com/help/api-en/working-with-the-user-entity This curl command demonstrates how to send a POST request with a JSON payload containing user data for adding or updating users. It includes authentication and content type headers. ```curl curl --location --request POST 'https://api.wazzup24.com/v3/users' \ --header 'Authorization: Bearer c8cf90444023482f909520d454368d27' \ --header 'Content-Type: application/json' \ --data-raw '[ { "id": "2e0df379-0e3c-470f-9b36-06b9e34c3bdb", "name": "Alex Salesman", "phone": "79263334567" }, { "id": "111-2e0df379-0e3c-470f-9b36", "name": "Kate Supportics", "phone": "79261234567" } ]' ``` -------------------------------- ### WhatsApp Poll Webhook Example Source: https://wazzup24.com/help/api-en/webhooks Example payload for a WhatsApp poll received via webhook. Polls are sent as type 'text' with the poll content in text format. ```json { "messages": [ { "messageId": "caa9999-cce3-424c-86cd-05f99995073", "dateTime": "2025-05-06T14:18:00.001Z", "channelId": "b96a999e-06f5-4cac-8413-ba999993f981", "chatType": "whatsapp", "chatId": "79999999999", "type": "text", "isEcho": false, "contact": { "name": "79999999999", "avatarUri": "https://store.wazzup24.com/0e82ead97ae07d9999c687253b8baed2365a26fa"; }, "text": "Тестовый\n• Вариант1\n• Вариант2", "status": "inbound" } ] } ``` -------------------------------- ### WZ_CREATE_ENTITY Event Example Source: https://wazzup24.com/help/api-en/chat-window-iframe This event is triggered when a user clicks to create a new deal. It contains details about the chat and integration. Ensure options.useDealsEvents is set to true when generating the iframe link. ```json { type: 'WZ_CREATE_ENTITY', data: { chatType: whatsapp, chatId: 79998887766, channelId: c16tc1c-9f20-4rda-46jd-q92ty4j6s36888, userId: test_id, integrationId: 608df5ye-45hj-j6k7-l77k-qe5t88j4h1222 } } ``` -------------------------------- ### Get WebSocket Host URL Source: https://wazzup24.com/help/api-en/unanswered-counter Call this GET endpoint to obtain the WebSocket host URL for connecting to the counter service. Replace :apiKey with your integration's API key. ```bash GET https://integrations.wazzup24.com/counters/ws_host/api_v3/:apiKey ``` -------------------------------- ### WZ_OPEN_ENTITY Event Example Source: https://wazzup24.com/help/api-en/chat-window-iframe This event fires when a user attempts to open an entity (deal, contact, etc.) from the iFrame. It includes entity-specific data. Enable this by setting options.useDealsEvents to true. ```json { type: 'WZ_OPEN_ENTITY', data: { chatType: whatsapp, chatId: 79998887766, channelId: c16tc1c-9f20-4rda-46jd-q92ty4j6s36888, userId: test_id, integrationId: 608df5ye-45hj-j6k7-l77k-qe5t88j4h1222, entity: { closed: false, id: clientId3, link: #, name: TestDeal, responsibleUserName: TestUser } } } ``` -------------------------------- ### Get Contact List Source: https://wazzup24.com/help/api-en/working-with-contacts Call this GET endpoint to retrieve a list of contacts. You can fetch up to 100 records per query, sorted by ID in ascending order. Use the 'offset' parameter for pagination. ```http GET https://api.wazzup24.com/v3/contacts?offset= ``` -------------------------------- ### Obtaining the list of deals Source: https://wazzup24.com/help/api-en/working-with-a-list-of-deals Retrieve a list of deals by sending a GET request. Up to 100 records can be fetched in a single request. An optional offset parameter can be used for pagination. ```APIDOC ## GET /v3/deals ### Description Retrieves a list of deals. Supports pagination via the `offset` query parameter. Up to 100 records can be returned per request. ### Method GET ### Endpoint https://api.wazzup24.com/v3/deals ### Query Parameters - **offset** (String) - Optional - Offset for pagination. ### Response #### Success Response (200) - **count** (Number) - Number of deals in the response. - **data** (Object) - Array with deal data. - **data.id** (String) - Deal ID. Max 100 characters. - **data.responsibleUserId** (String) - ID of the responsible user. Max 100 characters. - **data.name** (String) - Deal name. Max 200 characters. - **data.contacts** (Object) - Array of contact IDs associated with the deal. Max 10 contacts. - **data.uri** (String) - Link to the deal in the CRM. Max 200 characters. ### Response Example ```json { "count": 1, "data": [ { "id": "1", "responsibleUserId": "id007", "name": "Daily Deal Test", "contacts": ["111-2e0df379-0e3c-470f-9b36"], "uri": "https://link-to-deal-in-crm.com" } ] } ``` ``` -------------------------------- ### Get Unanswered Counter Source: https://wazzup24.com/help/api-en/unanswered-counter An alternative method to get the counter of unanswered requests if the basic method doesn't work. This endpoint retrieves the number of unanswered messages, their type (red for assigned chats, grey for controlled chats), and the last message timestamp. ```APIDOC ## GET /v3/unanswered/{user_id} ### Description Retrieves the counter of unanswered messages for a specific user. ### Method GET ### Endpoint https://api.wazzup24.com/v3/unanswered/{user_id} ### Parameters #### Path Parameters - **user_id** (string) - Required - The user ID for which to retrieve the unanswered counter. ### Response #### Success Response (200) - **counterV2** (number) - The number of unanswered messages. - **type** (string) - The type of unanswered messages: 'red' for chats the employee is responsible for, 'grey' for chats they control. - **lastMsgDateTime** (string) - The time of the last incoming message in ISO 8601 format. ### Response Example ```json { "counterV2": 7, "type": "red", "lastMsgDateTime": "2023-05-25T12:30:46.000Z" } ``` ``` -------------------------------- ### Get Channel List Source: https://wazzup24.com/help/api-en/working-with-channels Retrieves a list of all channels that have been added to Wazzup for communication. ```APIDOC ## GET /v3/channels ### Description Retrieves a list of channels connected to Wazzup. ### Method GET ### Endpoint /v3/channels ### Parameters #### Query Parameters None #### Request Body None ### Request Example ```bash curl --location --request GET 'https://api.wazzup24.com/v3/channels' \ --header 'Authorization: Bearer c8cf90444023482f909520d454368d27' ``` ### Response #### Success Response (200) Returns an array of channel objects. - **channelId** (String) - Channel Id (uuidv4) - **transport** (String) - Channel type. Available values: * whatsapp — WhatsApp channel, * wapi — WABA channel, * instagram — Instagram channel, * tgapi — Telegram channel, * telegram — Telegram Bot channel, * vk — VK channel, * avito — Avito channel. - **plainId** (String) - Phone number, username or ID in the messenger - **state** (String) - Channel status: * active— channel is active, * init — channel is starting, * disabled — the channel is turned off: it was removed from subscription or deleted with messages saved, * phoneUnavailable — no connection to the phone, * qr — QR code must be scanned, * openElsewhere — the channel is authorized in another Wazzup account, * notEnoughMoney — the channel is not paid, * foreignphone — channel QR was scanned by another phone number, * unauthorized — not authorized, * waitForPassword — channel is waiting for a password for two-factor authentication, * onModeration — the WABA channel is in moderation, * rejected — the WABA channel is rejected. #### Response Example ```json [ { "channelId": "string", "transport": "whatsapp", "plainId": "79865784457", "state": "active" } ] ``` ``` -------------------------------- ### Enable Webhooks Source: https://wazzup24.com/help/api-en/webhooks Subscribe to webhooks by sending a PATCH request to the /webhooks endpoint with your desired subscription settings. ```APIDOC ## PATCH /v3/webhooks ### Description Subscribe to webhooks by providing the URI where you want to receive notifications and specifying which events you want to subscribe to. ### Method PATCH ### Endpoint https://api.wazzup24.com/v3/webhooks ### Parameters #### Request Body - **webhooksUri** (String) - Required - Address to receive webhooks. No more than 200 characters. - **subscriptions** (Object) - Required - Webhook settings. - **subscriptions.messagesAndStatuses** (Boolean) - Required - Webhook on new messages and webhook on outgoing status changes. Specify "true" to enable, "false" otherwise. - **subscriptions.contactsAndDealsCreation** (Boolean) - Required - Webhook about creating a new contact or deal. Specify "true" to enable, "false" otherwise. - **subscriptions.channelsUpdates** (Boolean) - Required - Webhook about changing the status of the channel. Specify "true" to enable, "false" otherwise. - **subscriptions.templateStatus** (Boolean) - Required - Webhook about the change in moderation status of the WABA template. Specify "true" to enable, "false" otherwise. ### Request Example ```json { "webhooksUri": "https://example.com/webhooks", "subscriptions": { "messagesAndStatuses": true, "contactsAndDealsCreation": true } } ``` ### Response #### Success Response (200) - **ok** (Object) - Indicates successful operation. #### Response Example ```json { "ok": {} } ``` #### Errors - **400 Bad Request** - `{"error": "uriNotValid", "description": "Provided URI is not valid URI"}` - If the URI is incorrect. - **400 Bad Request** - `{"error": "testPostNotPassed", "description": "URI does not return 200 OK on test request", "data": {"${response_code}"}}` - If the test request to the URI fails. ``` -------------------------------- ### Get Contact Information Source: https://wazzup24.com/help/api-en/working-with-contacts Retrieves detailed information about a specific contact uploaded from a CRM to Wazzup. ```APIDOC ## GET /v3/contacts/{contact id} ### Description Retrieves information about a single contact. ### Method GET ### Endpoint /v3/contacts/{contact id} ### Parameters #### Path Parameters - **contact id** (String) - Required - The unique identifier of the contact. ### Response #### Success Response (200) - **id** (String) - Contact Id in the CRM system. No more than 100 characters. - **responsibleUserId** (String) - Id of the responsible user. No more than 100 characters. - **name** (String) - Contact name. No more than 200 characters. - **contactData** (Object) - An array of objects with contact data that contains chatType and chatId. - **uri** (String) - A link to the contact in the CRM. Not more than 200 characters. If specified, in the "Deals" dropdown, the user will see a button leading to the contact's page in the CRM. ### Response Example ```json { "id": "111-2e0df379-0e3c-470f-9b36", "responsibleUserId": "user-123", "name": "John Doe", "contactData": [ { "chatType": "whatsapp", "chatId": "+1234567890" } ], "uri": "https://crm.example.com/contacts/111-2e0df379-0e3c-470f-9b36" } ``` ``` -------------------------------- ### Getting a List of Loaded Funnels Source: https://wazzup24.com/help/api-en/loading-sales-funnels Retrieves a list of all sales funnels that have been loaded into the Wazzup system. ```APIDOC ## GET /v3/pipelines ### Description Retrieves a list of all loaded sales funnels, including their stages. ### Method GET ### Endpoint https://api.wazzup24.com/v3/pipelines ### Response #### Success Response (200) - **Array of funnel objects**: Each object contains `id`, `name`, and an array of `stages` (each with `id` and `name`). ### Response Example ```json [ { "id": "string-id", "name": "Signed up", "stages": [ { "id": "1", "name": "Test period" }, ... ] }, ... ] ``` ``` -------------------------------- ### Uploading a list of deals Source: https://wazzup24.com/help/api-en/working-with-a-list-of-deals Send a POST request to upload a list of deals from CRM to Wazzup. Deals are matched by ID; new deals are added, existing ones are updated. A maximum of 100 deals can be uploaded per query. ```APIDOC ## POST /v3/deals ### Description Uploads a list of deals to Wazzup. Deals are matched by ID for creation or update. Supports up to 100 deals per request. ### Method POST ### Endpoint https://api.wazzup24.com/v3/deals ### Parameters #### Request Body - **id** (Number) - Required - Deal id. Max 100 characters. - **responsibleUserId** (String) - Required - ID of the responsible user. - **name** (String) - Required - Name of the deal. Max 200 characters. - **uri** (String) - Optional - Link to the deal in the CRM. Max 200 characters. - **contacts** (Object) - Required - An array with the IDs of contacts associated with the deal. Contact IDs can be strings. - **closed** (Boolean) - Required - Flag marking closed deals. ### Request Example ```json [ { "id": "1", "responsibleUserId": "id007", "name": "Daily Deal Test", "closed": false, "contacts": ["111-2e0df379-0e3c-470f-9b36"], "link": "https://link-to-deal-in-crm.com" } ] ``` ```