# 99 Digital WhatsApp API — complete documentation Generated: 2026-11-29T20:03:58.741Z Canonical documentation: https://docs.99digital.co.il/whatsapp-api Documentation index: https://docs.99digital.co.il/whatsapp-api/llms.txt > This file is generated from every public page of the WhatsApp API documentation during the production build. Do not edit it manually. --- # WhatsApp API Source: https://docs.99digital.co.il/whatsapp-api Markdown: https://docs.99digital.co.il/markdown/whatsapp-api.md Section: WhatsApp API Send WhatsApp messages, files, interactive messages and templates from your own systems, manage your business profile, and receive messages and delivery events by webhook. ## Base URL ```text https://api.99digital.co.il/whatsapp/v2 ``` ## Authentication Every request carries your API key in the `apiKey` header: ```http apiKey: ``` --- # Postman Collection Source: https://docs.99digital.co.il/whatsapp-api/postman-collection Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/postman-collection.md Section: WhatsApp API [Click here to download the WhatsApp API Postman Collection](https://api.99digital.co.il/whatsapp-postman). The Postman collection is always updated with every change to the API, so make sure you always download the latest version. To use it, select **Import** in Postman and choose the downloaded file, then fill in `apiKey` and `from` in the collection's **Variables** tab. --- # Send Message Source: https://docs.99digital.co.il/whatsapp-api/send-message Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/send-message.md Section: WhatsApp API `POST https://api.99digital.co.il/whatsapp/v2/sendMessage` Send a normal text message to a client who wrote to you within the last 24 hours. :::info You can use the "Send Message" API in one case only: you reply to a message that the client sent, within 24 hours since the client sent their last message. ::: :::info If you send a message to a new client, or try to send a message to an old client (old client means that more than 24 hours have passed since their last message), you must use the [Send Template Message](https://docs.99digital.co.il/whatsapp-api/templates/send-a-template) API instead. Sending a contact is not available for a template message, therefore sending a contact message can only be done when replying to a client. If you sent a template message to the client, the client did not reply yet, and you want to send another message to them, you must use the template message again. ::: ## Explanation Sending a message means sending a normal text message to your clients. ## Remarks - You can only send a message to private people, not groups. - The billing is per "conversation". A conversation means a 24-hour session between you and the client (this 24-hour conversation session is unrelated to the 24-hour timer for template messages). - You can send unlimited messages within the 24-hour session time of a conversation. - The 24-hour conversation session starts when you send a message to the client. - Every time the client replies, the template message session resets, which means that you don't have to use a template message during this 24-hour template message session. ## Settings | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/sendMessage` | | Method | JSON via POST | | Key | Value | | --- | --- | | apiKey | Your API key for the service | ## Body | Parameter | Description / Example | Mandatory | | --- | --- | --- | | from | Your WhatsApp account. International number without `+`. For example: `972771234567` | yes | | to | The number you want to send the message to, in international format, digits only. For example: `972501234567` (a local number such as `0501234567` is rejected with reason 4).
or
The user id you want to send the message to. For example: `IL.1605856887361213` — for a client who hides their number behind a WhatsApp [username](https://docs.99digital.co.il/whatsapp-api/information/username); it arrives as `from_id` in your webhook. | yes | | body | Your message goes here (up to 4096 characters).
`\n` for a new line
`*text*` for bold
`_text_` for italic
`~text~` for strikethrough
`` ```text``` `` for monospace | yes | | replyTo | In case you want to reply to a message that the end user has sent (quoted message), here you can provide the unique ID of that message. To quote one of your own messages, provide the `unique` you received when you sent it. | no | | showRequest | You can get back in the response an object with all the request you sent (without the `apiKey`).
Default is off (`0`).
`1` - enable | no | ## Response ```json { "status": "OK", "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "body": "your message", "timestamp": 1600115719, "from": "972771234567", "to": "972501234567", "templateTimeLeft": 1200, "conversationTimeLeft": 0, "reason": 1 } ``` ## Response-Explain | Parameter | Description | | --- | --- | | status | `OK` or `FAIL`.
**Note:** OK status doesn't mean the message arrived to the end user. It only means that the system received your request. You should listen to [webhooks](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) to see the status of your message. | | unique | Unique ID for any message. The webhooks about this message carry the same ID. | | body | The text you sent | | timestamp | Time stamp of the message (Unix time, in seconds) | | from | Your WhatsApp account | | to | The number or the user id that the message was sent to | | templateTimeLeft | Amount of minutes left since the client's last message. If passed, you must use a template message. This value resets every time the client sends you a message. | | conversationTimeLeft | No longer in use: the conversation time left is part of the webhook instead. Until it is removed in a future update, it is always `0`. | | originalRequest | Original request object, if you enabled this in `showRequest` when sending the request. Empty fields are left out. | | reason | The status explanation — see the table below. | | reason | Description | | --- | --- | | 1 | Not FAIL. The status is OK. | | 2 | `from` is missing, or JSON syntax error | | 3 | Wrong apiKey, or the "from" number is not registered with us | | 4 | `to` is either empty or wrong number format | | 5 | `body` can't be empty | | 6 | WhatsApp error - try again | | 7 | You are trying to send a message but it has been more than 24 hours since the client's last message. Please use 'Send Template' instead. | | 8 | You are trying to send a message for the first time to a contact. Please use 'Send Template' message instead. | | 9 | Rate limit error, try again | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | Your WhatsApp account. International number without `+`. Example: `972771234567`. | | `to` | string | Yes | The number you want to send the message to, in international format, digits only (a local number such as `0501234567` is rejected with reason 4) — or the user id you want to send the message to, for a client who hides their number behind a WhatsApp username (it arrives as `from_id` in your webhook). Example: `972501234567`. | | `body` | string | Yes | Your message goes here. Use `\n` for a new line, `*text*` for bold, `_text_` for italic, `~text~` for strikethrough and `` ```text``` `` for monospace. Max length: 4096. Example: `Hi! Thanks for writing to us. How can we help today?`. | | `replyTo` | string | No | In case you want to reply to a message that the end user has sent (quoted message), here you can provide the unique ID of that message. To quote one of your own messages, provide the `unique` you received when you sent it. Example: `92E004B950CCEA3C386FCFA2AAF8558A`. | | `showRequest` | integer | No | You can get back in the response an object with all the request you sent (without the `apiKey`). One of: `0` — Off; `1` — Enable — the response includes `originalRequest`. Default: `0`. | ### Example: Text A plain text message. ```json { "from": "972771234567", "to": "972501234567", "body": "Hi! Thanks for writing to us. How can we help today?" } ``` ### Example: Formatting New lines and WhatsApp formatting — `*bold*`, `_italic_` and `~strikethrough~`. ```json { "from": "972771234567", "to": "972501234567", "body": "*Order #4711 confirmed*\n\nPickup: _today until 18:00_\nAddress: Herzl 1, Tel Aviv\n~Delivery fee 20 NIS~ Free delivery this week!" } ``` ### Example: Reply to client Quote the client's message: `replyTo` is the unique ID of their message, from your webhook. The client sees it quoted above your reply. ```json { "from": "972771234567", "to": "972501234567", "body": "Yes, that item is in stock.", "replyTo": "92E004B950CCEA3C386FCFA2AAF8558A" } ``` ### Example: Quote own message Quote one of your own messages: `replyTo` is the `unique` you received when you sent it. ```json { "from": "972771234567", "to": "972501234567", "body": "Small correction to the message above: pickup is until 19:00.", "replyTo": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ" } ``` ### Example: To user id For a client who hides their number behind a WhatsApp username: send to the user id from your webhook. ```json { "from": "972771234567", "to": "IL.1605856887361213", "body": "Hi! We received your message and will get back to you shortly." } ``` ### Example: showRequest Get the request back in the response, as `originalRequest`. ```json { "from": "972771234567", "to": "972501234567", "body": "Hi! Thanks for writing to us. How can we help today?", "showRequest": 1 } ``` ## Responses ### 200 — The request was processed. Both a successful and a failed request answer with HTTP 200 — check `status`, and `reason` when it is FAIL. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) OK status doesn't mean the message arrived to the end user, it only means that the system received your request. You should listen to [webhooks](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) to see the status of your message. Always `OK`. | | `unique` | string | (one of: OK) Unique ID for any message. The webhooks about this message carry the same ID. Example: `19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ`. | | `body` | string | (one of: OK) The text you sent. | | `timestamp` | integer | (one of: OK) Time stamp of the message (Unix time, in seconds). Example: `1600115719`. | | `from` | string | (one of: OK) Your WhatsApp account. Example: `972771234567`. | | `to` | string | (one of: OK) The number or the user id that the message was sent to. Example: `972501234567`. | | `templateTimeLeft` | integer | (one of: OK) Amount of minutes left since the client's last message. If passed, you must use a template message. This value resets every time the client sends you a message. Example: `1200`. | | `conversationTimeLeft` | integer | (one of: OK) **Deprecated.** This value is no longer in use: the conversation time left is part of the webhook instead. Until it is removed in a future update, it is always 0. Example: `0`. | | `originalRequest` | object | (one of: OK) Original request object, if you enabled this in `showRequest` when sending the request. Empty fields are left out. | | `originalRequest.from` | string | (one of: OK) The `from` you sent — your WhatsApp account. | | `originalRequest.to` | string | (one of: OK) The `to` you sent — the number or user id of the client. | | `originalRequest.body` | string | (one of: OK) The `body` you sent — the message text. | | `originalRequest.replyTo` | string | (one of: OK) The `replyTo` you sent — the unique ID of the quoted message. Left out when you did not quote a message. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `status` | string | (one of: FAIL) FAIL — the request was not carried out. `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `2` — 'from' is missing, or JSON syntax error; `3` — Wrong apiKey, or the "from" number is not registered with us; `4` — 'to' is either empty or wrong number format; `5` — 'body' can't be empty; `6` — WhatsApp error — try again; `7` — You are trying to send a message but it has been more than 24 hours since the client's last message. Please use 'Send Template' instead; `8` — You are trying to send a message for the first time to a contact. Please use 'Send Template' message instead; `9` — Rate limit error, try again. | #### Example: OK The system received your request. ```json { "status": "OK", "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "body": "Hi! Thanks for writing to us. How can we help today?", "timestamp": 1600115719, "from": "972771234567", "to": "972501234567", "templateTimeLeft": 1200, "conversationTimeLeft": 0, "reason": 1 } ``` #### Example: OK + showRequest With `showRequest` set to 1, the response includes `originalRequest`. ```json { "status": "OK", "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "body": "Hi! Thanks for writing to us. How can we help today?", "timestamp": 1600115719, "from": "972771234567", "to": "972501234567", "templateTimeLeft": 1200, "conversationTimeLeft": 0, "originalRequest": { "from": "972771234567", "to": "972501234567", "body": "Hi! Thanks for writing to us. How can we help today?" }, "reason": 1 } ``` #### Example: Reason 3 Wrong apiKey, or the "from" number is not registered with us. ```json { "status": "FAIL", "reason": 3 } ``` #### Example: Reason 4 'to' is either empty or wrong number format. ```json { "status": "FAIL", "reason": 4 } ``` #### Example: Reason 5 'body' can't be empty. ```json { "status": "FAIL", "reason": 5 } ``` #### Example: Reason 7 More than 24 hours have passed since the client's last message. Use 'Send Template' instead. ```json { "status": "FAIL", "reason": 7 } ``` --- # Send File Source: https://docs.99digital.co.il/whatsapp-api/send-file Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/send-file.md Section: WhatsApp API `POST https://api.99digital.co.il/whatsapp/v2/sendFile` Send an image, a video, an audio file or a document to your client, from a link to the file. :::info You can use the "Send File" API in one case only: you reply to a message that the client sent, within 24 hours since the client sent their last message. ::: :::info If you send a message to a new client, or try to send a message to an old client (old client means that more than 24 hours have passed since their last message), you must use the [Send a Template](https://docs.99digital.co.il/whatsapp-api/templates/send-a-template) API instead. Sending a contact is not available as a template message, therefore a contact can only be sent when replying to a client. If you sent a template message to the client, the client did not reply yet, and you want to send them another message, you must use a template message again. ::: ## Files you can send | Media Type | Supported Format | Maximum file size | | --- | --- | --- | | image | png, jpg, jpeg | 5 MB | | video | mp4, avi, 3gpp | 16 MB | | audio | mp3, ogg (PTT only), amr, aac | 16 MB | | document | pdf, doc, docx, xls, xlsx, ppt, pptx, zip, txt, rar | 100 MB | The media type is taken from the file extension in the link (for a link without one, from the file's content type). Any other file — a gif, for example — is sent as a document. ## More Remarks - You can only send a file to private people, not groups. - The billing is per "conversation". A conversation means a 24-hour session between you and the client (this 24-hour conversation session is unrelated to the 24-hour timer for template messages). - You can send unlimited messages within the 24-hour session of a conversation. - The 24-hour conversation session starts when *you* send a message to the client. ## Settings | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/sendFile` | | Method | JSON via POST | | Key | Value | | --- | --- | | apiKey | Your API key for the service | ## Body | Parameter | Description / Example | Mandatory | | --- | --- | --- | | from | Your WhatsApp account. International number without `+`. For example: `972771234567` | yes | | to | The number you want to send the file to, in international format, digits only. For example: `972501234567` (a local number such as `0501234567` is rejected with reason 4). Or: the user id you want to send the file to, for a client who hides their number behind a WhatsApp username (it arrives as `from_id` in your webhook). For example: `IL.1605856887361213` | yes | | body | An https link to the file. For example: `https://pubs.usgs.gov/dds/dds-057/ReadMe.pdf`. WhatsApp downloads the file from this link, so it must be open to the internet (or see `localStorage`). | yes | | caption | The caption text that will be sent with the file. Audio files are sent without a caption. | no | | fileName | For the document media type, you can specify the file name that will be used. If not provided, the file name is taken from the `body` URL. Don't add the file extension: it is added from the link. For example: `yourFile` | no | | replyTo | In case you want to reply to a message that the end user has sent (quoted message), here you can provide the unique ID of that message. To quote one of your own messages, provide the `unique` you received when you sent it. | no | | showRequest | You can get back in the response an object with all the request you sent (without the `apiKey`). Default is off (`0`). `1` — enable. | no | | localStorage | Whenever you provide a `body` URL, we deliver this URL to WhatsApp, and WhatsApp downloads the file from it in order to deliver it with your message. If for any reason your file link is not accessible to WhatsApp or not open to the internet, you can ask us to fetch the file instead, so that WhatsApp does not use your own link: we download the file and upload it to WhatsApp directly. We don't keep a copy of the file on our servers. Default value is `0` (disable). Enable — `1`. **Please note that using this feature may delay the response from our server, due to the operation described above.** It does not apply to audio files, and if the upload fails, your link is used. | no | ## Response ```json { "status": "OK", "unique": "65dfd4r4dref34rdfxd34r", "body": "Your link", "caption": "The text you sent", "timestamp": 1600115719, "from": "972771234567", "to": "972501234567", "templateTimeLeft": 400, "conversationTimeLeft": 0, "reason": 1 } ``` ## Response-Explain | Parameter | Description | | --- | --- | | status | OK or FAIL. **Note:** OK status doesn't mean the message arrived to the end user, it only means that the system received your request. You should listen to [webhooks](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) to see the status of your message. | | unique | Unique ID for any message. The webhooks about this message carry the same ID. | | body | The link you sent. | | caption | The caption you sent (empty when you sent none). | | timestamp | Time stamp of the message (Unix time, in seconds). | | from | Your WhatsApp account. | | to | The number or the user id that the message was sent to. | | templateTimeLeft | Amount of minutes left since the client's last message. If passed, you must use a template message. This value resets every time the client sends you a message. | | conversationTimeLeft | **Deprecated.** This value is no longer in use: the conversation time left is now part of the webhook instead. This parameter will be removed in a future update; until then, it is always `0`. | | originalRequest | Original request object, if you enabled this in `showRequest` when sending the request. Empty fields are left out. | | reason | Description | | --- | --- | | 1 | Not FAIL, the status is OK. | | 2 | `from` is missing, or JSON syntax error. | | 3 | Wrong apiKey, or the `from` number is not registered with us. | | 4 | `to` is either empty or wrong number format. | | 5 | `body` is empty or not a valid link. | | 6 | Your WhatsApp number is not set up for sending files. Please contact support. | | 7 | You are trying to send a file but it has been more than 24 hours since the client's last message. Please use 'Send Template' instead. | | 8 | You are trying to send a file for the first time to a contact. Please use 'Send Template' message instead. | | 10 | Not in use anymore. | | 11 | Rate limit error, try again. | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | Your WhatsApp account. International number without `+`. Example: `972771234567`. | | `to` | string | Yes | The number you want to send the file to, in international format, digits only (a local number such as `0501234567` is rejected with reason 4) — or the user id you want to send the file to, for a client who hides their number behind a WhatsApp username (it arrives as `from_id` in your webhook). Example: `972501234567`. | | `body` | string (uri) | Yes | An https link to the file. WhatsApp downloads the file from this link, so it must be open to the internet — or see `localStorage`. Example: `https://pubs.usgs.gov/dds/dds-057/ReadMe.pdf`. | | `caption` | string | No | The caption text that will be sent with the file. Audio files are sent without a caption. Example: `Here is the photo you asked for 📸`. | | `fileName` | string | No | For a document, you can specify the file name the client sees. If not provided, the file name is taken from the `body` link. Don't add the file extension: it is added from the link. Example: `yourFile`. | | `replyTo` | string | No | In case you want to reply to a message that the end user has sent (quoted message), here you can provide the unique ID of that message. To quote one of your own messages, provide the `unique` you received when you sent it. Example: `92E004B950CCEA3C386FCFA2AAF8558A`. | | `showRequest` | integer | No | You can get back in the response an object with all the request you sent (without the `apiKey`). One of: `0` — Off; `1` — Enable — the response includes `originalRequest`. Default: `0`. | | `localStorage` | integer | No | We deliver your `body` link to WhatsApp, and WhatsApp downloads the file from it in order to deliver it with your message. If your link is not accessible to WhatsApp or not open to the internet, enable this: we download the file ourselves and upload it to WhatsApp, so WhatsApp doesn't need your link. Please note that using this feature may delay the response from our server. We don't keep a copy of the file: it is passed on to WhatsApp and not stored on our servers. It does not apply to audio files, and if the upload fails, your link is used. One of: `0` — Off — WhatsApp downloads the file from your link; `1` — Enable — we upload the file to WhatsApp for you. Default: `0`. | ### Example: Image An image with a caption. ```json { "from": "972771234567", "to": "972501234567", "body": "https://storage.99digital.online/samples/hello.png", "caption": "Here is the photo you asked for 📸" } ``` ### Example: Video A video with a caption. ```json { "from": "972771234567", "to": "972501234567", "body": "https://storage.99digital.online/samples/meditation.mp4", "caption": "A short demo of the product" } ``` ### Example: Audio An audio file or a voice note. Audio is sent without a caption. ```json { "from": "972771234567", "to": "972501234567", "body": "https://www.example.com/files/voice-note.mp3" } ``` ### Example: Document A PDF with the file name the client sees. The extension is added from the link. ```json { "from": "972771234567", "to": "972501234567", "body": "https://storage.99digital.online/samples/headerSample.pdf", "fileName": "Invoice 4711", "caption": "Your invoice for August is attached." } ``` ### Example: Any other file An Excel, Word or any other file is sent as a document. ```json { "from": "972771234567", "to": "972501234567", "body": "https://www.example.com/files/price-list.xlsx", "fileName": "Price list September 2026" } ``` ### Example: localStorage We upload the file to WhatsApp for you, for a link that WhatsApp can't reach. ```json { "from": "972771234567", "to": "972501234567", "body": "https://storage.99digital.online/samples/hello.png", "caption": "Here is the photo you asked for 📸", "localStorage": 1 } ``` ### Example: Reply to client Quote the client's message: `replyTo` is the unique ID of their message, from your webhook. ```json { "from": "972771234567", "to": "972501234567", "body": "https://storage.99digital.online/samples/hello.png", "caption": "This one?", "replyTo": "92E004B950CCEA3C386FCFA2AAF8558A" } ``` ## Responses ### 200 — The request was processed. Both a successful and a failed request answer with HTTP 200 — check `status`, and `reason` when it is FAIL. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) OK status doesn't mean the message arrived to the end user, it only means that the system received your request. You should listen to [webhooks](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) to see the status of your message. Always `OK`. | | `unique` | string | (one of: OK) Unique ID for any message. The webhooks about this message carry the same ID. Example: `19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ`. | | `body` | string | (one of: OK) The link you sent. | | `caption` | string | (one of: OK) The caption you sent (empty when you sent none). | | `timestamp` | integer | (one of: OK) Time stamp of the message (Unix time, in seconds). Example: `1600115719`. | | `from` | string | (one of: OK) Your WhatsApp account. Example: `972771234567`. | | `to` | string | (one of: OK) The number or the user id that the message was sent to. Example: `972501234567`. | | `templateTimeLeft` | integer | (one of: OK) Amount of minutes left since the client's last message. If passed, you must use a template message. This value resets every time the client sends you a message. Example: `1200`. | | `conversationTimeLeft` | integer | (one of: OK) **Deprecated.** This value is no longer in use: the conversation time left is part of the webhook instead. Until it is removed in a future update, it is always 0. Example: `0`. | | `originalRequest` | object | (one of: OK) Original request object, if you enabled this in `showRequest` when sending the request. Empty fields are left out. | | `originalRequest.from` | string | (one of: OK) The `from` you sent — your WhatsApp account. | | `originalRequest.to` | string | (one of: OK) The `to` you sent — the number or user id of the client. | | `originalRequest.body` | string | (one of: OK) The `body` you sent — the link to the file. | | `originalRequest.caption` | string | (one of: OK) The `caption` you sent. Left out when you sent no caption. | | `originalRequest.replyTo` | string | (one of: OK) The `replyTo` you sent — the unique ID of the quoted message. Left out when you did not quote a message. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `status` | string | (one of: FAIL) FAIL — the request was not carried out. `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `2` — 'from' is missing, or JSON syntax error; `3` — Wrong apiKey, or the "from" number is not registered with us; `4` — 'to' is either empty or wrong number format; `5` — 'body' is empty or not a valid link; `6` — Your WhatsApp number is not set up for sending files. Please contact support; `7` — You are trying to send a file but it has been more than 24 hours since the client's last message. Please use 'Send Template' instead; `8` — You are trying to send a file for the first time to a contact. Please use 'Send Template' message instead; `11` — Rate limit error, try again. | #### Example: OK The system received your request. ```json { "status": "OK", "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "body": "https://storage.99digital.online/samples/hello.png", "caption": "Here is the photo you asked for 📸", "timestamp": 1600115719, "from": "972771234567", "to": "972501234567", "templateTimeLeft": 1200, "conversationTimeLeft": 0, "reason": 1 } ``` #### Example: Reason 5 'body' is empty or not a valid link. ```json { "status": "FAIL", "reason": 5 } ``` #### Example: Reason 7 More than 24 hours have passed since the client's last message. Use 'Send Template' instead. ```json { "status": "FAIL", "reason": 7 } ``` --- # Send Location Source: https://docs.99digital.co.il/whatsapp-api/send-location Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/send-location.md Section: WhatsApp API `POST https://api.99digital.co.il/whatsapp/v2/sendLocation` Send a location pin to your client, by latitude and longitude, with an optional name or address. :::info You can use the "Send Location" API in one case only: you reply to a message that the client sent, within 24 hours since the client sent their last message. ::: :::info If you send a message to a new client, or try to send a message to an old client (old client means that more than 24 hours have passed since their last message), you must use the [Send a Template](https://docs.99digital.co.il/whatsapp-api/templates/send-a-template) API instead. Sending a contact is not available as a template message, therefore a contact can only be sent when replying to a client. If you sent a template message to the client, the client did not reply yet, and you want to send them another message, you must use a template message again. ::: ## More Remarks - You can only send a location to private people, not groups. - The billing is per "conversation". A conversation means a 24-hour session between you and the client (this 24-hour conversation session is unrelated to the 24-hour timer for template messages). - You can send unlimited messages within the 24-hour session of a conversation. - The 24-hour conversation session starts when *you* send a message to the client. ## Settings | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/sendLocation` | | Method | JSON via POST | | Key | Value | | --- | --- | | apiKey | Your API key for the service | ## Body | Parameter | Description / Example | Mandatory | | --- | --- | --- | | from | Your WhatsApp account. International number without `+`. For example: `972771234567` | yes | | to | The number you want to send the location to, in international format, digits only. For example: `972501234567` (a local number such as `0501234567` is rejected with reason 4). Or: the user id you want to send the location to, for a client who hides their number behind a WhatsApp username (it arrives as `from_id` in your webhook). For example: `IL.1605856887361213` | yes | | lat | Latitude of the location. For example: `"37.422"` | yes | | lng | Longitude of the location. For example: `"-122.084"` | yes | | caption | The text that will be shown next to the location of the lat/lng. Usually this is the address or the place name. For example: `"Big Ben, London"` | no | | replyTo | In case you want to reply to a message that the end user has sent (quoted message), here you can provide the unique ID of that message. To quote one of your own messages, provide the `unique` you received when you sent it. | no | | showRequest | You can get back in the response an object with all the request you sent (without the `apiKey`). Default is off (`0`). `1` — enable. | no | ## Response ```json { "status": "OK", "unique": "65dfd4r4dref34rdfxd34r", "lat": "37.422", "lng": "-122.084", "caption": "Big Ben, London", "timestamp": 1600115719, "from": "972771234567", "to": "972501234567", "templateTimeLeft": 400, "conversationTimeLeft": 0, "reason": 1 } ``` ## Response-Explain | Parameter | Description | | --- | --- | | status | OK or FAIL. **Note:** OK status doesn't mean the message arrived to the end user, it only means that the system received your request. You should listen to [webhooks](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) to see the status of your message. | | unique | Unique ID for any message. The webhooks about this message carry the same ID. | | lat | The latitude, as you sent it. | | lng | The longitude, as you sent it. | | caption | The caption you sent (empty when you sent none). | | timestamp | Time stamp of the message (Unix time, in seconds). | | from | Your WhatsApp account. | | to | The number or the user id that the message was sent to. | | templateTimeLeft | Amount of minutes left since the client's last message. If passed, you must use a template message. This value resets every time the client sends you a message. | | conversationTimeLeft | **Deprecated.** This value is no longer in use: the conversation time left is now part of the webhook instead. This parameter will be removed in a future update; until then, it is always `0`. | | originalRequest | Original request object, if you enabled this in `showRequest` when sending the request. Empty fields are left out. | | reason | Description | | --- | --- | | 1 | Not FAIL, the status is OK. | | 2 | `from` is missing, or JSON syntax error. | | 3 | Wrong apiKey, or the `from` number is not registered with us. | | 4 | `to` is either empty or wrong number format. | | 5 | `lat` or `lng` is missing. | | 6 | WhatsApp error — try again. | | 7 | You are trying to send a message but it has been more than 24 hours since the client's last message. Please use 'Send Template' instead. | | 8 | You are trying to send a message for the first time to a contact. Please use 'Send Template' message instead. | | 9 | Rate limit error, try again. | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | Your WhatsApp account. International number without `+`. Example: `972771234567`. | | `to` | string | Yes | The number you want to send the location to, in international format, digits only (a local number such as `0501234567` is rejected with reason 4) — or the user id you want to send the location to, for a client who hides their number behind a WhatsApp username (it arrives as `from_id` in your webhook). Example: `972501234567`. | | `lat` | string | Yes | Latitude of the location. Example: `37.422`. | | `lng` | string | Yes | Longitude of the location. Example: `-122.084`. | | `caption` | string | No | The text shown next to the location pin — usually the place name or the address. Example: `Big Ben, London`. | | `replyTo` | string | No | In case you want to reply to a message that the end user has sent (quoted message), here you can provide the unique ID of that message. To quote one of your own messages, provide the `unique` you received when you sent it. Example: `92E004B950CCEA3C386FCFA2AAF8558A`. | | `showRequest` | integer | No | You can get back in the response an object with all the request you sent (without the `apiKey`). One of: `0` — Off; `1` — Enable — the response includes `originalRequest`. Default: `0`. | ### Example: Location A location pin with the place name. ```json { "from": "972771234567", "to": "972501234567", "lat": "32.0853", "lng": "34.7818", "caption": "Our store - Azrieli Center, Tel Aviv" } ``` ### Example: Without caption Only the pin. ```json { "from": "972771234567", "to": "972501234567", "lat": "51.5007", "lng": "-0.1246" } ``` ## Responses ### 200 — The request was processed. Both a successful and a failed request answer with HTTP 200 — check `status`, and `reason` when it is FAIL. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) OK status doesn't mean the message arrived to the end user, it only means that the system received your request. You should listen to [webhooks](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) to see the status of your message. Always `OK`. | | `unique` | string | (one of: OK) Unique ID for any message. The webhooks about this message carry the same ID. Example: `19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ`. | | `lat` | string | (one of: OK) The latitude, as you sent it. | | `lng` | string | (one of: OK) The longitude, as you sent it. | | `caption` | string | (one of: OK) The caption you sent (empty when you sent none). | | `timestamp` | integer | (one of: OK) Time stamp of the message (Unix time, in seconds). Example: `1600115719`. | | `from` | string | (one of: OK) Your WhatsApp account. Example: `972771234567`. | | `to` | string | (one of: OK) The number or the user id that the message was sent to. Example: `972501234567`. | | `templateTimeLeft` | integer | (one of: OK) Amount of minutes left since the client's last message. If passed, you must use a template message. This value resets every time the client sends you a message. Example: `1200`. | | `conversationTimeLeft` | integer | (one of: OK) **Deprecated.** This value is no longer in use: the conversation time left is part of the webhook instead. Until it is removed in a future update, it is always 0. Example: `0`. | | `originalRequest` | object | (one of: OK) Original request object, if you enabled this in `showRequest` when sending the request. Empty fields are left out. | | `originalRequest.from` | string | (one of: OK) The `from` you sent — your WhatsApp account. | | `originalRequest.to` | string | (one of: OK) The `to` you sent — the number or user id of the client. | | `originalRequest.lat` | string | (one of: OK) The `lat` you sent — the latitude of the location. | | `originalRequest.lng` | string | (one of: OK) The `lng` you sent — the longitude of the location. | | `originalRequest.caption` | string | (one of: OK) The `caption` you sent — the place name or address. Left out when you sent no caption. | | `originalRequest.replyTo` | string | (one of: OK) The `replyTo` you sent — the unique ID of the quoted message. Left out when you did not quote a message. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `status` | string | (one of: FAIL) FAIL — the request was not carried out. `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `2` — 'from' is missing, or JSON syntax error; `3` — Wrong apiKey, or the "from" number is not registered with us; `4` — 'to' is either empty or wrong number format; `5` — 'lat' or 'lng' is missing; `6` — WhatsApp error — try again; `7` — You are trying to send a message but it has been more than 24 hours since the client's last message. Please use 'Send Template' instead; `8` — You are trying to send a message for the first time to a contact. Please use 'Send Template' message instead; `9` — Rate limit error, try again. | #### Example: OK The system received your request. ```json { "status": "OK", "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "lat": "32.0853", "lng": "34.7818", "caption": "Our store - Azrieli Center, Tel Aviv", "timestamp": 1600115719, "from": "972771234567", "to": "972501234567", "templateTimeLeft": 1200, "conversationTimeLeft": 0, "reason": 1 } ``` #### Example: Reason 5 'lat' or 'lng' is missing. ```json { "status": "FAIL", "reason": 5 } ``` #### Example: Reason 7 More than 24 hours have passed since the client's last message. Use 'Send Template' instead. ```json { "status": "FAIL", "reason": 7 } ``` --- # Request Location Source: https://docs.99digital.co.il/whatsapp-api/request-location Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/request-location.md Section: WhatsApp API `POST https://api.99digital.co.il/whatsapp/v2/requestLocation` Send your client a message with a button that asks them to share their location. :::info You can use the "Request Location" API in one case only: you reply to a message that the client sent, within 24 hours since the client sent their last message. ::: :::info If you send a message to a new client, or try to send a message to an old client (old client means that more than 24 hours have passed since their last message), you must use the [Send a Template](https://docs.99digital.co.il/whatsapp-api/templates/send-a-template) API instead. Sending a contact is not available as a template message, therefore a contact can only be sent when replying to a client. If you sent a template message to the client, the client did not reply yet, and you want to send them another message, you must use a template message again. ::: ## Explanation - Requesting a location means you send a message to your client which asks them to share their location. - After the client clicks the location button and shares their location, the location data will be sent as the `location` type inside the [webhook](https://docs.99digital.co.il/whatsapp-api/webhook/incoming-messages) (Incoming Messages). ## Remarks - You can use the "Request Location" API in one case only: for a reply to a message that the client sent, within 24 hours since the client sent their last message. If you send a message to a new client, or try to send a message to an old client (old client means that 24 hours since the client's last message have passed), you must use the "Send Template Message" API instead. If you sent a template message to the client, the client did not reply yet, and you want to send them another message, you must use a template message again. - You can only send a message to private people, not groups. - The billing is per "conversation". A conversation means a 24-hour session between you and the client (this 24-hour conversation session is unrelated to the 24-hour timer for template messages). - You can send unlimited messages within the 24-hour session of a conversation. - The 24-hour conversation session starts when *you* send a message to the client. - Every time the client replies, the template message session resets, which means that you don't have to use a template message during this 24-hour template message session. ## Settings | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/requestLocation` | | Method | JSON via POST | | Key | Value | | --- | --- | | apiKey | Your API key for the service | ## Body | Parameter | Description / Example | Mandatory | | --- | --- | --- | | from | Your WhatsApp account. International number without `+`. For example: `972771234567` | yes | | to | The number you want to send the message to, in international format, digits only. For example: `972501234567` (a local number such as `0501234567` is rejected with reason 4). Or: the user id you want to send the message to, for a client who hides their number behind a WhatsApp username (it arrives as `from_id` in your webhook). For example: `IL.1605856887361213` | yes | | body | Your message goes here — the text shown above the location button. Use `\n` for a new line, `*text*` for bold, `_text_` for italic and `~text~` for strikethrough. | yes | | replyTo | In case you want to reply to a message that the end user has sent (quoted message), here you can provide the unique ID of that message. To quote one of your own messages, provide the `unique` you received when you sent it. | no | | showRequest | You can get back in the response an object with all the request you sent (without the `apiKey`). Default is off (`0`). `1` — enable. | no | ## Response ```json { "status": "OK", "unique": "d1e113e0-a8e3-4c8f-8958-rx83zj39", "body": "Please click to provide your location", "timestamp": 1705225312, "from": "972771234567", "to": "972501234567", "templateTimeLeft": 1372, "conversationTimeLeft": 0, "reason": 1 } ``` ## Response-Explain | Parameter | Description | | --- | --- | | status | OK or FAIL. **Note:** OK status doesn't mean the message arrived to the end user, it only means that the system received your request. You should listen to [webhooks](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) to see the status of your message. | | unique | Unique ID for any message. The webhooks about this message carry the same ID. | | body | The text you sent. | | timestamp | Time stamp of the message (Unix time, in seconds). | | from | Your WhatsApp account. | | to | The number or the user id that the message was sent to. | | templateTimeLeft | Amount of minutes left since the client's last message. If passed, you must use a template message. This value resets every time the client sends you a message. | | conversationTimeLeft | **Deprecated.** This value is no longer in use: the conversation time left is now part of the webhook instead. This parameter will be removed in a future update; until then, it is always `0`. | | originalRequest | Original request object, if you enabled this in `showRequest` when sending the request. Empty fields are left out. | | reason | Description | | --- | --- | | 1 | Not FAIL, the status is OK. | | 2 | `from` is missing, or JSON syntax error. | | 3 | Wrong apiKey, or the `from` number is not registered with us. | | 4 | `to` is either empty or wrong number format. | | 5 | `body` is empty or wrong. | | 6 | WhatsApp error — try again. | | 7 | You are trying to send a message but it has been more than 24 hours since the client's last message. Please use 'Send Template' instead. | | 8 | You are trying to send a message for the first time to a contact. Please use 'Send Template' message instead. | | 9 | Rate limit error, try again. | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | Your WhatsApp account. International number without `+`. Example: `972771234567`. | | `to` | string | Yes | The number you want to send the message to, in international format, digits only (a local number such as `0501234567` is rejected with reason 4) — or the user id you want to send the message to, for a client who hides their number behind a WhatsApp username (it arrives as `from_id` in your webhook). Example: `972501234567`. | | `body` | string | Yes | The message shown above the location button. Use `\n` for a new line, `*text*` for bold, `_text_` for italic and `~text~` for strikethrough. Example: `Please click to provide your location`. | | `replyTo` | string | No | In case you want to reply to a message that the end user has sent (quoted message), here you can provide the unique ID of that message. To quote one of your own messages, provide the `unique` you received when you sent it. Example: `92E004B950CCEA3C386FCFA2AAF8558A`. | | `showRequest` | integer | No | You can get back in the response an object with all the request you sent (without the `apiKey`). One of: `0` — Off; `1` — Enable — the response includes `originalRequest`. Default: `0`. | ### Example: Request location The client gets your message with a button to share their location. ```json { "from": "972771234567", "to": "972501234567", "body": "Where should we deliver? Tap the button to share your location." } ``` ### Example: Reply to client Quote the client's message: `replyTo` is the unique ID of their message, from your webhook. ```json { "from": "972771234567", "to": "972501234567", "body": "Sure! *Tap the button* to share your location and we'll send the nearest branch.", "replyTo": "92E004B950CCEA3C386FCFA2AAF8558A" } ``` ## Responses ### 200 — The request was processed. Both a successful and a failed request answer with HTTP 200 — check `status`, and `reason` when it is FAIL. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) OK status doesn't mean the message arrived to the end user, it only means that the system received your request. You should listen to [webhooks](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) to see the status of your message. Always `OK`. | | `unique` | string | (one of: OK) Unique ID for any message. The webhooks about this message carry the same ID. Example: `19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ`. | | `body` | string | (one of: OK) The text you sent. | | `timestamp` | integer | (one of: OK) Time stamp of the message (Unix time, in seconds). Example: `1600115719`. | | `from` | string | (one of: OK) Your WhatsApp account. Example: `972771234567`. | | `to` | string | (one of: OK) The number or the user id that the message was sent to. Example: `972501234567`. | | `templateTimeLeft` | integer | (one of: OK) Amount of minutes left since the client's last message. If passed, you must use a template message. This value resets every time the client sends you a message. Example: `1200`. | | `conversationTimeLeft` | integer | (one of: OK) **Deprecated.** This value is no longer in use: the conversation time left is part of the webhook instead. Until it is removed in a future update, it is always 0. Example: `0`. | | `originalRequest` | object | (one of: OK) Original request object, if you enabled this in `showRequest` when sending the request. Empty fields are left out. | | `originalRequest.from` | string | (one of: OK) The `from` you sent — your WhatsApp account. | | `originalRequest.to` | string | (one of: OK) The `to` you sent — the number or user id of the client. | | `originalRequest.body` | string | (one of: OK) The `body` you sent — the message shown above the location button. | | `originalRequest.replyTo` | string | (one of: OK) The `replyTo` you sent — the unique ID of the quoted message. Left out when you did not quote a message. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `status` | string | (one of: FAIL) FAIL — the request was not carried out. `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `2` — 'from' is missing, or JSON syntax error; `3` — Wrong apiKey, or the "from" number is not registered with us; `4` — 'to' is either empty or wrong number format; `5` — 'body' is empty or wrong; `6` — WhatsApp error — try again; `7` — You are trying to send a message but it has been more than 24 hours since the client's last message. Please use 'Send Template' instead; `8` — You are trying to send a message for the first time to a contact. Please use 'Send Template' message instead; `9` — Rate limit error, try again. | #### Example: OK The system received your request. ```json { "status": "OK", "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "body": "Where should we deliver? Tap the button to share your location.", "timestamp": 1600115719, "from": "972771234567", "to": "972501234567", "templateTimeLeft": 1200, "conversationTimeLeft": 0, "reason": 1 } ``` #### Example: Reason 5 'body' is empty or wrong. ```json { "status": "FAIL", "reason": 5 } ``` #### Example: Reason 7 More than 24 hours have passed since the client's last message. Use 'Send Template' instead. ```json { "status": "FAIL", "reason": 7 } ``` --- # Send Buttons Source: https://docs.99digital.co.il/whatsapp-api/send-buttons Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/send-buttons.md Section: WhatsApp API `POST https://api.99digital.co.il/whatsapp/v2/sendButtons` Send a message with up to 3 reply buttons, or one external button that opens a website, starts a phone call or opens an email. :::info You can use the "Send Buttons" API in one case only: you reply to a message that the client sent, within 24 hours since the client sent their last message. ::: :::info If you send a message to a new client, or try to send a message to an old client (old client means that more than 24 hours have passed since their last message), you must use the [Send Template Message](https://docs.99digital.co.il/whatsapp-api/templates/send-a-template) API instead. Sending a contact is not available for a template message, therefore sending a contact message can only be done when replying to a client. If you sent a template message to the client, the client did not reply yet, and you want to send another message to them, you must use the template message again. ::: ## Explanation The Send Buttons API allows you to send a message that includes up to 3 buttons OR an external button: website / phone / email. ## Remarks - You can use the "Send Buttons" API in one case only: to reply to a message that the client sent, within 24 hours since the client sent their last message. If you send a message to a new client, or try to send a message to an old client (old client means that 24 hours have passed since the client's last message), you must use the "Send Template Message" API instead. If you sent a template message to the client, the client did not reply yet, and you want to send another message to them, you must use the template message again. - You can only send a message to private people, not groups. - The billing is per "conversation". A conversation means a 24-hour session between you and the client (this 24-hour conversation session is unrelated to the 24-hour timer for template messages). - You can send unlimited messages within the 24-hour session time of a conversation. - The 24-hour conversation session starts when you send a message to the client. - Every time the client replies, the template message session resets, which means that you don't have to use a template message during this 24-hour template message session. - **When the end user clicks on the button, you will get it in the webhook as type "button", and the content of the button will be inside "body".** - **External button means that instead of the normal 3 buttons, you can initiate an action to open a website, a phone call or an email. If `buttonExternal` is in use, `button1` will be the text for the button, while `button2` and `button3` will be ignored.** ## Settings | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/sendButtons` | | Method | JSON via POST | | Key | Value | | --- | --- | | apiKey | Your API key for the service | ## Body | Parameter | Description / Example | Mandatory | | --- | --- | --- | | from | Your WhatsApp account. International number without `+`. For example: `972771234567` | yes | | to | The number you want to send the message to, in international format, digits only. For example: `972501234567` (a local number such as `0501234567` is rejected with reason 4).
or
The user id you want to send the message to. For example: `IL.1605856887361213` — for a client who hides their number behind a WhatsApp [username](https://docs.99digital.co.il/whatsapp-api/information/username); it arrives as `from_id` in your webhook. | yes | | header | Header allows you to choose extra content as media:
`1` - none
`2` - image
`3` - video
`4` - document | yes | | headerURL | If you choose image / video / document as a header, here you must provide an https URL of the file to be sent with the buttons:
image - jpg / png (up to 5 MB)
video - mp4 (up to 16 MB)
document - pdf (up to 100 MB) | Only if `header` is 2 / 3 / 4 | | body | Your message goes here.
`\n` for a new line
`*text*` for bold
`_text_` for italic
`~text~` for strikethrough | yes | | footer | You can provide a footer text that will be at the bottom of the message.
`\n` for a new line
`*text*` for bold
`_text_` for italic
`~text~` for strikethrough
Maximum 60 characters. | no | | fileName | When the header is a document (`header` = 4), you can specify the file name that will arrive. If not provided, the file name is taken from the `headerURL`.
The file extension is not required here: it is added from the link.
Example: `yourFile` | no | | button1 | The text of button 1. Maximum 20 characters. With `buttonExternal`, this is the text of the external button (no emoji). | yes | | button2 | The text of button 2. Maximum 20 characters. | no | | button3 | The text of button 3. Maximum 20 characters. | no | | button1_id | The id of `button1`.
You can set a unique id that will be returned on the webhook. Letters, digits, `_` and `-`.
Maximum 256 characters. Example: `my_button_1` | no
If not set, the default is `1` | | button2_id | The id of `button2`.
You can set a unique id that will be returned on the webhook. Letters, digits, `_` and `-`.
Maximum 256 characters. Example: `my_button_2` | no
If not set, the default is `2` | | button3_id | The id of `button3`.
You can set a unique id that will be returned on the webhook. Letters, digits, `_` and `-`.
Maximum 256 characters. Example: `my_button_3` | no
If not set, the default is `3` | | buttonExternal | In case you want `button1` to be an external button, here is the place you put the value — see the table below. `button1` is the text for the button; `button2` and `button3` are ignored. | no | | replyTo | In case you want to reply to a message that the end user has sent (quoted message), here you can provide the unique ID of that message. To quote one of your own messages, provide the `unique` you received when you sent it. | no | | showRequest | You can get back in the response an object with all the request you sent (without the `apiKey`).
Default is off (`0`).
`1` - enable | no | | localStorage | Whenever you provide `headerURL`, we deliver this URL to WhatsApp. They download the link in order to deliver it with your message.
If for any reason your file link is not accessible by WhatsApp and open to the internet, you can ask us to download the file and upload it to WhatsApp ourselves, so WhatsApp does not need your own link. If the upload fails, your link is used.
Default value is `0` (disable)
`1` - enable
**Please note** that using this feature may delay the response from our server, due to the operation described above.
`localStorage` does not work when `buttonExternal` is provided: your link is used instead. | no | `buttonExternal` values: | Input | Example | What will happen? | | --- | --- | --- | | phone number (numbers only) | `972501234567` | The system will create a button that will initiate a phone call | | link (must start with `http` or `https`) | `https://www.google.com` | The system will create a button that will open the website | | email address | `john@example.com` | The system will create a button that will open the default email app to send an email | | anything else | `abcdefg` | Will be rejected with error code 14 | ## Response ```json { "status": "OK", "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "header": 1, "body": "your body", "footer": "your footer", "button1": "button 1 text", "button2": "button 2 text", "button3": "button 3 text", "buttonExternal": "", "timestamp": 1600115719, "from": "972771234567", "to": "972501234567", "templateTimeLeft": 400, "conversationTimeLeft": 0, "reason": 1 } ``` ## Response-Explain | Parameter | Description | | --- | --- | | status | `OK` or `FAIL`.
**Note:** OK status doesn't mean the message arrived to the end user. It only means that the system received your request. You should listen to [webhooks](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) to see the status of your message. | | unique | Unique ID for any message. The webhooks about this message carry the same ID. | | header | Your header selection (1 / 2 / 3 / 4) | | body | The text you sent | | footer | Footer text (empty when you sent none) | | button1 | Text for button 1 | | button2 | Text for button 2 (empty when unused) | | button3 | Text for button 3 (empty when unused) | | buttonExternal | The external button value you sent (empty when unused) | | timestamp | Time stamp of the message (Unix time, in seconds) | | from | Your WhatsApp account | | to | The number or the user id that the message was sent to | | templateTimeLeft | Amount of minutes left since the client's last message. If passed, you must use a template message. This value resets every time the client sends you a message. | | conversationTimeLeft | No longer in use: the conversation time left is part of the webhook instead. Until it is removed in a future update, it is always `0`. | | originalRequest | Original request object, if you enabled this in `showRequest` when sending the request. Empty fields are left out. | | reason | The status explanation — see the table below. | | reason | Description | | --- | --- | | 1 | Not FAIL. The status is OK. | | 2 | `from` is missing, or JSON syntax error | | 3 | Wrong apiKey, or the "from" number is not registered with us | | 4 | `to` is either empty or wrong number format | | 5 | `body` can't be empty | | 6 | Your WhatsApp number is not set up for sending. Please contact support. | | 7 | You are trying to send a message but it has been more than 24 hours since the client's last message. Please use Send Template instead. | | 8 | You are trying to send a message for the first time to a contact. Please use Send Template Message instead. | | 9 | `header` is mandatory (and must be 1, 2, 3 or 4) | | 10 | `footer` is too long | | 11 | `button1` is missing or too long | | 12 | `button2` or `button3` is too long | | 13 | `headerURL` is mandatory for a media `header` | | 14 | `buttonExternal` has invalid input | | 15 | Rate limit error, try again | | 16 | `button1_id`, `button2_id` or `button3_id` is invalid, wrong, not unique or exceeded the maximum length. | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | Your WhatsApp account. International number without `+`. Example: `972771234567`. | | `to` | string | Yes | The number you want to send the message to, in international format, digits only (a local number such as `0501234567` is rejected with reason 4) — or the user id you want to send the message to, for a client who hides their number behind a WhatsApp username (it arrives as `from_id` in your webhook). Example: `972501234567`. | | `header` | integer | Yes | Header allows you to choose extra content as media, shown above the message. One of: `1` — None; `2` — Image; `3` — Video; `4` — Document. Example: `1`. | | `headerURL` | string (uri) | No | Required when `header` is 2, 3 or 4: an https link to the file to be sent with the buttons. Image — jpg / png (up to 5 MB); video — mp4 (up to 16 MB); document — pdf (up to 100 MB). Example: `https://storage.99digital.online/samples/hello.png`. | | `body` | string | Yes | Your message goes here. Use `\n` for a new line, `*text*` for bold, `_text_` for italic and `~text~` for strikethrough. Example: `How can we help you today?`. | | `footer` | string | No | You can provide a footer text that will be at the bottom of the message. Use `\n` for a new line, `*text*` for bold, `_text_` for italic and `~text~` for strikethrough. Maximum 60 characters. Max length: 60. Example: `Reply anytime, we are here 08:00-20:00`. | | `fileName` | string | No | When the header is a document (`header` = 4), you can specify the file name the client sees. If not provided, the file name is taken from the `headerURL`. The file extension is not required here: it is added from the link. Example: `yourFile`. | | `button1` | string | Yes | The text of button 1. Maximum 20 characters. With `buttonExternal`, this is the text of the external button (no emoji). Max length: 20. Example: `Track my order`. | | `button2` | string | No | The text of button 2. Maximum 20 characters. Max length: 20. Example: `Talk to an agent`. | | `button3` | string | No | The text of button 3. Maximum 20 characters. Max length: 20. Example: `Opening hours`. | | `button1_id` | string | No | The id of `button1`. You can set a unique id that will be returned on the webhook. Letters, digits, `_` and `-`, maximum 256 characters. If not set, the default is `1`. Default: `1`. Max length: 256. Example: `my_button_1`. | | `button2_id` | string | No | The id of `button2`. You can set a unique id that will be returned on the webhook. Letters, digits, `_` and `-`, maximum 256 characters. If not set, the default is `2`. Default: `2`. Max length: 256. Example: `my_button_2`. | | `button3_id` | string | No | The id of `button3`. You can set a unique id that will be returned on the webhook. Letters, digits, `_` and `-`, maximum 256 characters. If not set, the default is `3`. Default: `3`. Max length: 256. Example: `my_button_3`. | | `buttonExternal` | string | No | In case you want `button1` to be an external button, here is the place you put the value. `button1` is the text for the button; `button2` and `button3` are ignored. - A phone number, digits only (`972501234567`) — a button that starts a phone call. - A link starting with `http` or `https` (`https://www.google.com`) — a button that opens the website. - An email address (`john@example.com`) — a button that opens the email app to send an email. Anything else is rejected with reason 14. Example: `https://www.google.com`. | | `replyTo` | string | No | In case you want to reply to a message that the end user has sent (quoted message), here you can provide the unique ID of that message. To quote one of your own messages, provide the `unique` you received when you sent it. Example: `92E004B950CCEA3C386FCFA2AAF8558A`. | | `showRequest` | integer | No | You can get back in the response an object with all the request you sent (without the `apiKey`). One of: `0` — Off; `1` — Enable — the response includes `originalRequest`. Default: `0`. | | `localStorage` | integer | No | Whenever you provide `headerURL`, we deliver this URL to WhatsApp. They download the link in order to deliver it with your message. If for any reason your file link is not accessible by WhatsApp and open to the internet, you can ask us to download the file and upload it to WhatsApp ourselves, so WhatsApp does not need your own link. If the upload fails, your link is used. Please note that using this feature may delay the response from our server, due to the operation described above. `localStorage` does not work when `buttonExternal` is provided: your link is used instead. One of: `0` — Off — WhatsApp downloads the file from your link; `1` — Enable — we upload the file to WhatsApp for you. Default: `0`. | ### Example: Reply buttons Three buttons with your own ids. The id of the button the client clicks comes back in the webhook. ```json { "from": "972771234567", "to": "972501234567", "header": 1, "body": "How can we help you today?", "footer": "Reply anytime, we are here 08:00-20:00", "button1": "Track my order", "button1_id": "TRACK_ORDER", "button2": "Talk to an agent", "button2_id": "AGENT", "button3": "Opening hours", "button3_id": "HOURS" } ``` ### Example: Image header An image above the message, with two buttons. ```json { "from": "972771234567", "to": "972501234567", "header": 2, "headerURL": "https://storage.99digital.online/samples/hello.png", "body": "The item you asked about is back in stock.", "button1": "Reserve it", "button1_id": "RESERVE", "button2": "Show me more", "button2_id": "MORE" } ``` ### Example: Video header A video above the message. ```json { "from": "972771234567", "to": "972501234567", "header": 3, "headerURL": "https://storage.99digital.online/samples/meditation.mp4", "body": "Here is how to set up your new device. Did it work?", "button1": "Yes, all good", "button1_id": "OK", "button2": "I need help", "button2_id": "HELP" } ``` ### Example: Document header A PDF above the message, with the file name the client sees. ```json { "from": "972771234567", "to": "972501234567", "header": 4, "headerURL": "https://storage.99digital.online/samples/headerSample.pdf", "fileName": "Quote 2026-0917", "body": "Here is your quote. Would you like to approve it?", "footer": "Prices include VAT", "button1": "Approve quote", "button1_id": "APPROVE", "button2": "Request changes", "button2_id": "CHANGES" } ``` ### Example: Website button One external button that opens a website. `button1` is its text. ```json { "from": "972771234567", "to": "972501234567", "header": 2, "headerURL": "https://storage.99digital.online/samples/hello.png", "body": "Your personal offer is ready.", "button1": "Open my offer", "buttonExternal": "https://www.example.com/offer/4711" } ``` ### Example: Call button One external button that starts a phone call. ```json { "from": "972771234567", "to": "972501234567", "header": 1, "body": "Prefer to talk? Our team is available until 20:00.", "button1": "Call us", "buttonExternal": "97231234567" } ``` ### Example: Email button One external button that opens the email app. ```json { "from": "972771234567", "to": "972501234567", "header": 1, "body": "Questions about your invoice? Write to our billing team.", "button1": "Email billing", "buttonExternal": "billing@example.com" } ``` ### Example: localStorage We upload the header image to WhatsApp for you, for a link that WhatsApp can't reach. ```json { "from": "972771234567", "to": "972501234567", "header": 2, "headerURL": "https://storage.99digital.online/samples/hello.png", "body": "Is this the item you meant?", "button1": "Yes", "button1_id": "YES", "button2": "No", "button2_id": "NO", "localStorage": 1 } ``` ## Responses ### 200 — The request was processed. Both a successful and a failed request answer with HTTP 200 — check `status`, and `reason` when it is FAIL. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) OK status doesn't mean the message arrived to the end user, it only means that the system received your request. You should listen to [webhooks](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) to see the status of your message. Always `OK`. | | `unique` | string | (one of: OK) Unique ID for any message. The webhooks about this message carry the same ID. Example: `19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ`. | | `header` | integer | (one of: OK) Your header selection (1/2/3/4). Example: `1`. | | `body` | string | (one of: OK) The text you sent. | | `footer` | string | (one of: OK) Footer text (empty when you sent none). | | `button1` | string | (one of: OK) Text for button 1. | | `button2` | string | (one of: OK) Text for button 2 (empty when unused). | | `button3` | string | (one of: OK) Text for button 3 (empty when unused). | | `buttonExternal` | string | (one of: OK) The external button value you sent (empty when unused). | | `timestamp` | integer | (one of: OK) Time stamp of the message (Unix time, in seconds). Example: `1600115719`. | | `from` | string | (one of: OK) Your WhatsApp account. Example: `972771234567`. | | `to` | string | (one of: OK) The number or the user id that the message was sent to. Example: `972501234567`. | | `templateTimeLeft` | integer | (one of: OK) Amount of minutes left since the client's last message. If passed, you must use a template message. This value resets every time the client sends you a message. Example: `1200`. | | `conversationTimeLeft` | integer | (one of: OK) **Deprecated.** This value is no longer in use: the conversation time left is part of the webhook instead. Until it is removed in a future update, it is always 0. Example: `0`. | | `originalRequest` | object | (one of: OK) Original request object, if you enabled this in `showRequest` when sending the request. Empty fields are left out. | | `originalRequest.from` | string | (one of: OK) The `from` you sent — your WhatsApp account. | | `originalRequest.to` | string | (one of: OK) The `to` you sent — the number or user id of the client. | | `originalRequest.header` | integer | (one of: OK) The `header` you sent — 1 none, 2 image, 3 video, 4 document. | | `originalRequest.headerURL` | string | (one of: OK) The `headerURL` you sent — the link to the header file. | | `originalRequest.body` | string | (one of: OK) The `body` you sent — the message text. | | `originalRequest.footer` | string | (one of: OK) The `footer` you sent — the footer text. | | `originalRequest.button1` | string | (one of: OK) The `button1` you sent — the text of button 1, or of the external button. | | `originalRequest.button2` | string | (one of: OK) The `button2` you sent — the text of button 2. | | `originalRequest.button3` | string | (one of: OK) The `button3` you sent — the text of button 3. | | `originalRequest.buttonExternal` | string | (one of: OK) The `buttonExternal` you sent — the phone number, link or email of the external button. | | `originalRequest.replyTo` | string | (one of: OK) The `replyTo` you sent — the unique ID of the quoted message. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `status` | string | (one of: FAIL) FAIL — the request was not carried out. `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `2` — 'from' is missing, or JSON syntax error; `3` — Wrong apiKey, or the "from" number is not registered with us; `4` — 'to' is either empty or wrong number format; `5` — 'body' can't be empty; `6` — Your WhatsApp number is not set up for sending. Please contact support; `7` — You are trying to send a message but it has been more than 24 hours since the client's last message. Please use 'Send Template' instead; `8` — You are trying to send a message for the first time to a contact. Please use 'Send Template' message instead; `9` — 'header' is missing or not 1, 2, 3 or 4; `10` — 'footer' is too long; `11` — 'button1' is missing or too long; `12` — 'button2' or 'button3' is too long; `13` — 'headerURL' is mandatory for a media 'header'; `14` — 'buttonExternal' has invalid input; `15` — Rate limit error, try again; `16` — 'button1_id', 'button2_id' or 'button3_id' is invalid, not unique or longer than the maximum length. | #### Example: OK The system received your request. ```json { "status": "OK", "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "header": 1, "body": "How can we help you today?", "footer": "Reply anytime, we are here 08:00-20:00", "button1": "Track my order", "button2": "Talk to an agent", "button3": "Opening hours", "buttonExternal": "", "timestamp": 1600115719, "from": "972771234567", "to": "972501234567", "templateTimeLeft": 1200, "conversationTimeLeft": 0, "reason": 1 } ``` #### Example: OK — external button With `buttonExternal`, the unused buttons come back empty. ```json { "status": "OK", "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "header": 1, "body": "Prefer to talk? Our team is available until 20:00.", "footer": "", "button1": "Call us", "button2": "", "button3": "", "buttonExternal": "97231234567", "timestamp": 1600115719, "from": "972771234567", "to": "972501234567", "templateTimeLeft": 1200, "conversationTimeLeft": 0, "reason": 1 } ``` #### Example: Reason 7 More than 24 hours have passed since the client's last message. Use 'Send Template' instead. ```json { "status": "FAIL", "reason": 7 } ``` #### Example: Reason 11 'button1' is missing or too long. ```json { "status": "FAIL", "reason": 11 } ``` #### Example: Reason 16 Two buttons have the same id. ```json { "status": "FAIL", "reason": 16 } ``` --- # Send List Source: https://docs.99digital.co.il/whatsapp-api/send-list Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/send-list.md Section: WhatsApp API `POST https://api.99digital.co.il/whatsapp/v2/sendList` Send a message with a list of up to 10 choices that the client opens with a button and picks from. :::info You can use the "Send List" API in one case only: you reply to a message that the client sent, within 24 hours since the client sent their last message. ::: :::info If you send a message to a new client, or try to send a message to an old client (old client means that more than 24 hours have passed since their last message), you must use the [Send Template Message](https://docs.99digital.co.il/whatsapp-api/templates/send-a-template) API instead. Sending a contact is not available for a template message, therefore sending a contact message can only be done when replying to a client. If you sent a template message to the client, the client did not reply yet, and you want to send another message to them, you must use the template message again. ::: ## Explanation The Send List API allows you to send a message that includes a list of up to 10 choices. ## Remarks - You can use the "Send List" API in one case only: to reply to a message that the client sent, within 24 hours since the client sent their last message. If you send a message to a new client, or try to send a message to an old client (old client means that 24 hours have passed since the client's last message), you must use the "Send Template Message" API instead. If you sent a template message to the client, the client did not reply yet, and you want to send another message to them, you must use the template message again. - You can only send a message to private people, not groups. - The billing is per "conversation". A conversation means a 24-hour session between you and the client (this 24-hour conversation session is unrelated to the 24-hour timer for template messages). - You can send unlimited messages within the 24-hour session time of a conversation. - The 24-hour conversation session starts when you send a message to the client. - Every time the client replies, the template message session resets, which means that you don't have to use a template message during this 24-hour template message session. - **When the end user clicks on any of the list options, you will get it in the webhook as type "list", and the content of the option will be inside "body".** ## Settings | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/sendList` | | Method | JSON via POST | | Key | Value | | --- | --- | | apiKey | Your API key for the service | ## Body Each list item has a number from 1 to 10 in its field names: `itemTitle1`, `itemDescription1` and `itemId1` describe the first item, `itemTitle2` and so on the second, up to `itemTitle10`. | Parameter | Description / Example | Mandatory | Max length | | --- | --- | --- | --- | | from | Your WhatsApp account. International number without `+`. For example: `972771234567` | yes | | | to | The number you want to send the message to, in international format, digits only. For example: `972501234567` (a local number such as `0501234567` is rejected with reason 4).
or
The user id you want to send the message to. For example: `IL.1605856887361213` — for a client who hides their number behind a WhatsApp [username](https://docs.99digital.co.il/whatsapp-api/information/username); it arrives as `from_id` in your webhook. | yes | | | header | The title of the list box. You can use emoji. | no | 60 | | body | The body text of the list box. It is usually used to describe what this list is about.
`\n` for a new line
`*text*` for bold
`_text_` for italic
`~text~` for strikethrough | yes | 1024 | | footer | Some footer message, shown at the bottom of the list box | no | 60 | | buttonText | The text of the button that will appear on the list box. You can use emoji. | yes | 20 | | itemTitle1-10 | List of items: minimum is 1, maximum is 10. | At least 1 item is mandatory (`itemTitle1`) | 24 | | itemDescription1-10 | Extra description for the item. It will show below the title. | no | 72 | | itemId1-10 | You can provide an id for each item you provide in the list. This id will be returned in the webhook.
For example:
`itemId1` = `"id_for_sales"`
`itemId2` = `"id_for_support"`
It must be unique for each item. Letters, digits, `_` and `-`. `itemID1` (capital D) works too. | no
If not provided, 1-10 will be set | 200 | | replyTo | In case you want to reply to a message that the end user has sent (quoted message), here you can provide the unique ID of that message. To quote one of your own messages, provide the `unique` you received when you sent it. | no | | | showRequest | You can get back in the response an object with all the request you sent (without the `apiKey`).
Default is off (`0`).
`1` - enable | no | 1 | ## Sample request ```json { "from": "972771234567", "to": "972501234567", "header": "This is header", "body": "this is body", "footer": "Footer goes here", "buttonText": "Click to open", "itemTitle1": "Customer service", "itemDescription1": "Choose me for customer service", "itemTitle2": "Sales", "itemDescription2": "Sales enquiries? click here", "itemTitle3": "Support" } ``` ## Sample screenshot of the message ![A WhatsApp list message: header, body, footer and the "Click to open" button](https://storage.99digital.online/docs/list1.jpg) ## Sample screenshot after the "Click to open" ![The list opened, showing the items with their titles and descriptions](https://storage.99digital.online/docs/list2.png) ## Response ```json { "status": "OK", "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "header": "your header", "body": "your body", "footer": "your footer", "timestamp": 1600115719, "from": "972771234567", "to": "972501234567", "templateTimeLeft": 400, "conversationTimeLeft": 0, "reason": 1 } ``` ## Response-Explain | Parameter | Description | | --- | --- | | status | `OK` or `FAIL`.
**Note:** OK status doesn't mean the message arrived to the end user. It only means that the system received your request. You should listen to [webhooks](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) to see the status of your message. | | unique | Unique ID for any message. The webhooks about this message carry the same ID. | | header | Your header text (empty when you sent none) | | body | The text you sent | | footer | Footer text (empty when you sent none) | | timestamp | Time stamp of the message (Unix time, in seconds) | | from | Your WhatsApp account | | to | The number or the user id that the message was sent to | | templateTimeLeft | Amount of minutes left since the client's last message. If passed, you must use a template message. This value resets every time the client sends you a message. | | conversationTimeLeft | No longer in use: the conversation time left is part of the webhook instead. Until it is removed in a future update, it is always `0`. | | originalRequest | Original request object, if you enabled this in `showRequest` when sending the request: `from`, `to`, `header`, `footer`, `buttonText`, `replyTo` and the item titles and descriptions. Empty fields are left out. | | reason | The status explanation — see the table below. | | reason | Description | | --- | --- | | 1 | Not FAIL. The status is OK. | | 2 | `from` is missing, or JSON syntax error | | 3 | Wrong apiKey, or the "from" number is not registered with us | | 4 | `to` is either empty or wrong number format | | 5 | `body` can't be empty | | 6 | Your WhatsApp number is not set up for sending. Please contact support. | | 7 | You are trying to send a message but it has been more than 24 hours since the client's last message. Please use Send Template instead. | | 8 | You are trying to send a message for the first time to a contact. Please use Send Template Message instead. | | 9 | `header` is too long | | 10 | `footer` is too long | | 11 | `buttonText` is mandatory and can be up to 20 characters | | 12 | `itemTitle1` is mandatory, and can be up to 24 characters | | 13 | One (or more) of your `itemTitle` is more than 24 characters | | 14 | One (or more) of your `itemDescription` is more than 72 characters | | 15 | Rate limit error, try again | | 16 | `itemId1-10` is not valid, not unique, exceeded the maximum length, or was given for an item without a title | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | Your WhatsApp account. International number without `+`. Example: `972771234567`. | | `to` | string | Yes | The number you want to send the message to, in international format, digits only (a local number such as `0501234567` is rejected with reason 4) — or the user id you want to send the message to, for a client who hides their number behind a WhatsApp username (it arrives as `from_id` in your webhook). Example: `972501234567`. | | `header` | string | No | The title of the list box. You can use emoji. Max length: 60. Example: `This is header`. | | `body` | string | Yes | The body text of the list box, usually used to describe what this list is about. Use `\n` for a new line, `*text*` for bold, `_text_` for italic and `~text~` for strikethrough. Max length: 1024. Example: `this is body`. | | `footer` | string | No | Some footer message, shown at the bottom of the list box. Max length: 60. Example: `Footer goes here`. | | `buttonText` | string | Yes | The text of the button that will appear on the list box. You can use emoji. Max length: 20. Example: `Click to open`. | | `itemTitle1` | string | Yes | The title of item 1. The list has items: minimum is 1, maximum is 10 — items 2 to 10 are `itemTitle2` … `itemTitle10`. At least 1 item is mandatory. Max length: 24. Example: `Customer service`. | | `itemDescription1` | string | No | Extra description for item 1, shown below its title. Items 2 to 10: `itemDescription2` … `itemDescription10`. Max length: 72. Example: `Choose me for customer service`. | | `itemId1` | string | No | An id for item 1, returned in the webhook when the client chooses it — for example `id_for_sales`. It must be unique for each item; letters, digits, `_` and `-`. If not provided, the item number (1-10) is used. Items 2 to 10: `itemId2` … `itemId10`. `itemID1` (capital D) works too. Max length: 200. Example: `id_for_sales`. | | `replyTo` | string | No | In case you want to reply to a message that the end user has sent (quoted message), here you can provide the unique ID of that message. To quote one of your own messages, provide the `unique` you received when you sent it. Example: `92E004B950CCEA3C386FCFA2AAF8558A`. | | `showRequest` | integer | No | You can get back in the response an object with the request you sent (without the `apiKey`). One of: `0` — Off; `1` — Enable — the response includes `originalRequest`. Default: `0`. | ### Example: List with ids Three items with descriptions and your own ids. The id of the item the client chooses comes back in the webhook. ```json { "from": "972771234567", "to": "972501234567", "header": "Customer service", "body": "Please choose a department and we will connect you.", "footer": "Available Sun-Thu 08:00-18:00", "buttonText": "Choose department", "itemTitle1": "Sales", "itemDescription1": "Quotes, orders and pricing", "itemId1": "SALES", "itemTitle2": "Support", "itemDescription2": "Help with an existing product", "itemId2": "SUPPORT", "itemTitle3": "Billing", "itemDescription3": "Invoices and payments", "itemId3": "BILLING" } ``` ### Example: 10 items The maximum of 10 items, titles only. ```json { "from": "972771234567", "to": "972501234567", "body": "Which day suits you for the delivery?", "buttonText": "Pick a day", "itemTitle1": "Sunday", "itemId1": "DAY_SUN", "itemTitle2": "Monday", "itemId2": "DAY_MON", "itemTitle3": "Tuesday", "itemId3": "DAY_TUE", "itemTitle4": "Wednesday", "itemId4": "DAY_WED", "itemTitle5": "Thursday", "itemId5": "DAY_THU", "itemTitle6": "Friday", "itemId6": "DAY_FRI", "itemTitle7": "Next Sunday", "itemId7": "NEXT_SUN", "itemTitle8": "Next Monday", "itemId8": "NEXT_MON", "itemTitle9": "Next Tuesday", "itemId9": "NEXT_TUE", "itemTitle10": "Call me to arrange", "itemId10": "CALL_ME" } ``` ## Responses ### 200 — The request was processed. Both a successful and a failed request answer with HTTP 200 — check `status`, and `reason` when it is FAIL. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) OK status doesn't mean the message arrived to the end user, it only means that the system received your request. You should listen to [webhooks](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) to see the status of your message. Always `OK`. | | `unique` | string | (one of: OK) Unique ID for any message. The webhooks about this message carry the same ID. Example: `19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ`. | | `header` | string | (one of: OK) Your header text (empty when you sent none). | | `body` | string | (one of: OK) The text you sent. | | `footer` | string | (one of: OK) Footer text (empty when you sent none). | | `timestamp` | integer | (one of: OK) Time stamp of the message (Unix time, in seconds). Example: `1600115719`. | | `from` | string | (one of: OK) Your WhatsApp account. Example: `972771234567`. | | `to` | string | (one of: OK) The number or the user id that the message was sent to. Example: `972501234567`. | | `templateTimeLeft` | integer | (one of: OK) Amount of minutes left since the client's last message. If passed, you must use a template message. This value resets every time the client sends you a message. Example: `1200`. | | `conversationTimeLeft` | integer | (one of: OK) **Deprecated.** This value is no longer in use: the conversation time left is part of the webhook instead. Until it is removed in a future update, it is always 0. Example: `0`. | | `originalRequest` | object | (one of: OK) Original request object, if you enabled this in `showRequest` when sending the request: the fields below and the item titles and descriptions. Empty fields are left out. | | `originalRequest.from` | string | (one of: OK) The `from` you sent — your WhatsApp account. | | `originalRequest.to` | string | (one of: OK) The `to` you sent — the number or user id of the client. | | `originalRequest.header` | string | (one of: OK) The `header` you sent — the title of the list box. | | `originalRequest.footer` | string | (one of: OK) The `footer` you sent — the footer text. | | `originalRequest.buttonText` | string | (one of: OK) The `buttonText` you sent — the text of the button that opens the list. | | `originalRequest.replyTo` | string | (one of: OK) The `replyTo` you sent — the unique ID of the quoted message. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `status` | string | (one of: FAIL) FAIL — the request was not carried out. `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `2` — 'from' is missing, or JSON syntax error; `3` — Wrong apiKey, or the "from" number is not registered with us; `4` — 'to' is either empty or wrong number format; `5` — 'body' can't be empty; `6` — Your WhatsApp number is not set up for sending. Please contact support; `7` — You are trying to send a message but it has been more than 24 hours since the client's last message. Please use 'Send Template' instead; `8` — You are trying to send a message for the first time to a contact. Please use 'Send Template' message instead; `9` — 'header' is too long; `10` — 'footer' is too long; `11` — 'buttonText' is mandatory and can be up to 20 characters; `12` — 'itemTitle1' is mandatory and can be up to 24 characters; `13` — One (or more) of your item titles is more than 24 characters; `14` — One (or more) of your item descriptions is more than 72 characters; `15` — Rate limit error, try again; `16` — An item id is not valid, not unique, longer than 200 characters, or given for an item without a title. | #### Example: OK The system received your request. ```json { "status": "OK", "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "header": "Customer service", "body": "Please choose a department and we will connect you.", "footer": "Available Sun-Thu 08:00-18:00", "timestamp": 1600115719, "from": "972771234567", "to": "972501234567", "templateTimeLeft": 1200, "conversationTimeLeft": 0, "reason": 1 } ``` #### Example: Reason 7 More than 24 hours have passed since the client's last message. Use 'Send Template' instead. ```json { "status": "FAIL", "reason": 7 } ``` #### Example: Reason 11 'buttonText' is missing or longer than 20 characters. ```json { "status": "FAIL", "reason": 11 } ``` --- # Send Contact Source: https://docs.99digital.co.il/whatsapp-api/send-contact Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/send-contact.md Section: WhatsApp API `POST https://api.99digital.co.il/whatsapp/v2/sendContact` Send a contact card to your client, with a name, a phone number and optional details. :::info You can use the "Send Contact" API in one case only: you reply to a message that the client sent, within 24 hours since the client sent their last message. ::: :::info If you send a message to a new client, or try to send a message to an old client (old client means that more than 24 hours have passed since their last message), you must use the [Send a Template](https://docs.99digital.co.il/whatsapp-api/templates/send-a-template) API instead. Sending a contact is not available as a template message, therefore a contact can only be sent when replying to a client. If you sent a template message to the client, the client did not reply yet, and you want to send them another message, you must use a template message again. ::: ## More Remarks - You can only send a contact to private people, not groups. - The billing is per "conversation". A conversation means a 24-hour session between you and the client (this 24-hour conversation session is unrelated to the 24-hour timer for template messages). - You can send unlimited messages within the 24-hour session of a conversation. - The 24-hour conversation session starts when *you* send a message to the client. - Every time the client replies, the template message session resets, which means that you don't have to use a template message during this 24-hour template message session. ## Settings | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/sendContact` | | Method | JSON via POST | | Key | Value | | --- | --- | | apiKey | Your API key for the service | ## Body | Parameter | Description / Example | Mandatory | | --- | --- | --- | | from | Your WhatsApp account. International number without `+`. For example: `972771234567` | yes | | to | The number you want to send the contact to, in international format, digits only. For example: `972501234567` (a local number such as `0501234567` is rejected with reason 4). Or: the user id you want to send the contact to, for a client who hides their number behind a WhatsApp username (it arrives as `from_id` in your webhook). For example: `IL.1605856887361213` | yes | | contact_name | Contact name (first name or full name). | yes | | contact_phone | Contact phone number, in any format you like (`0501234567` or `972501234567`). We recommend the international number format (`972501234567`), so WhatsApp can link the card to the contact's WhatsApp account. | yes | | contact_email | Email address (`example@example.com`). | no | | contact_birthday | Birthday, in the format `YYYY-MM-DD`. | no | | address_street | Street address. | no | | address_city | City. | no | | address_country | Country. | no | | website | Any website URL. | no | | replyTo | In case you want to reply to a message that the end user has sent (quoted message), here you can provide the unique ID of that message. To quote one of your own messages, provide the `unique` you received when you sent it. | no | | showRequest | You can get back in the response an object with all the request you sent (without the `apiKey`). Default is off (`0`). `1` — enable. | no | ## Response ```json { "status": "OK", "unique": "65dfd4r4dref34rdfxd34r", "contact_name": "The contact name you sent", "contact_phone": "The contact phone you sent", "timestamp": 1600115719, "from": "972771234567", "to": "972501234567", "templateTimeLeft": 400, "conversationTimeLeft": 0, "reason": 1 } ``` ## Response-Explain | Parameter | Description | | --- | --- | | status | OK or FAIL. **Note:** OK status doesn't mean the message arrived to the end user, it only means that the system received your request. You should listen to [webhooks](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) to see the status of your message. | | unique | Unique ID for any message. The webhooks about this message carry the same ID. | | contact_name | The contact name you sent. | | contact_phone | The contact phone you sent. | | timestamp | Time stamp of the message (Unix time, in seconds). | | from | Your WhatsApp account. | | to | The number or the user id that the message was sent to. | | templateTimeLeft | Amount of minutes left since the client's last message. If passed, you must use a template message. This value resets every time the client sends you a message. | | conversationTimeLeft | **Deprecated.** This value is no longer in use: the conversation time left is now part of the webhook instead. This parameter will be removed in a future update; until then, it is always `0`. | | originalRequest | Original request object, if you enabled this in `showRequest` when sending the request. Empty fields are left out. | | reason | Description | | --- | --- | | 1 | Not FAIL, the status is OK. | | 2 | `from` is missing, or JSON syntax error. | | 3 | Wrong apiKey, or the `from` number is not registered with us. | | 4 | `to` is either empty or wrong number format. | | 5 | `contact_name` can't be empty. | | 6 | `contact_phone` can't be empty. | | 7 | You are trying to send a message but it has been more than 24 hours since the client's last message. Please use 'Send Template' instead. | | 8 | You are trying to send a message for the first time to a contact. Please use 'Send Template' message instead. | | 9 | WhatsApp error, please try again or contact support. | | 10 | Rate limit error, try again. | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | Your WhatsApp account. International number without `+`. Example: `972771234567`. | | `to` | string | Yes | The number you want to send the contact to, in international format, digits only (a local number such as `0501234567` is rejected with reason 4) — or the user id you want to send the contact to, for a client who hides their number behind a WhatsApp username (it arrives as `from_id` in your webhook). Example: `972501234567`. | | `contact_name` | string | Yes | Contact name (first name or full name). Example: `Dana Levi`. | | `contact_phone` | string | Yes | Contact phone number. Any format works (`0501234567` or `972501234567`), but we recommend the international format (`972501234567`), so WhatsApp can link the card to the contact's WhatsApp account. Example: `972521234567`. | | `contact_email` | string (email) | No | Email address. Example: `example@example.com`. | | `contact_birthday` | string (date) | No | Birthday, in the format `YYYY-MM-DD`. Example: `1990-05-14`. | | `address_street` | string | No | Street address. Example: `Herzl 1`. | | `address_city` | string | No | City. Example: `Tel Aviv`. | | `address_country` | string | No | Country. Example: `Israel`. | | `website` | string | No | Any website URL. Example: `https://www.example.com`. | | `replyTo` | string | No | In case you want to reply to a message that the end user has sent (quoted message), here you can provide the unique ID of that message. To quote one of your own messages, provide the `unique` you received when you sent it. Example: `92E004B950CCEA3C386FCFA2AAF8558A`. | | `showRequest` | integer | No | You can get back in the response an object with all the request you sent (without the `apiKey`). One of: `0` — Off; `1` — Enable — the response includes `originalRequest`. Default: `0`. | ### Example: Name and phone The minimum — a name and a phone number. ```json { "from": "972771234567", "to": "972501234567", "contact_name": "Dana Levi - Sales", "contact_phone": "972521234567" } ``` ### Example: Full card Every detail a contact card can hold. ```json { "from": "972771234567", "to": "972501234567", "contact_name": "Dana Levi - Sales", "contact_phone": "972521234567", "contact_email": "dana@example.com", "contact_birthday": "1990-05-14", "address_street": "Herzl 1", "address_city": "Tel Aviv", "address_country": "Israel", "website": "https://www.example.com" } ``` ## Responses ### 200 — The request was processed. Both a successful and a failed request answer with HTTP 200 — check `status`, and `reason` when it is FAIL. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) OK status doesn't mean the message arrived to the end user, it only means that the system received your request. You should listen to [webhooks](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) to see the status of your message. Always `OK`. | | `unique` | string | (one of: OK) Unique ID for any message. The webhooks about this message carry the same ID. Example: `19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ`. | | `contact_name` | string | (one of: OK) The contact name you sent. | | `contact_phone` | string | (one of: OK) The contact phone you sent. | | `timestamp` | integer | (one of: OK) Time stamp of the message (Unix time, in seconds). Example: `1600115719`. | | `from` | string | (one of: OK) Your WhatsApp account. Example: `972771234567`. | | `to` | string | (one of: OK) The number or the user id that the message was sent to. Example: `972501234567`. | | `templateTimeLeft` | integer | (one of: OK) Amount of minutes left since the client's last message. If passed, you must use a template message. This value resets every time the client sends you a message. Example: `1200`. | | `conversationTimeLeft` | integer | (one of: OK) **Deprecated.** This value is no longer in use: the conversation time left is part of the webhook instead. Until it is removed in a future update, it is always 0. Example: `0`. | | `originalRequest` | object | (one of: OK) Original request object, if you enabled this in `showRequest` when sending the request. Empty fields are left out. | | `originalRequest.from` | string | (one of: OK) The `from` you sent — your WhatsApp account. | | `originalRequest.to` | string | (one of: OK) The `to` you sent — the number or user id of the client. | | `originalRequest.contact_name` | string | (one of: OK) The `contact_name` you sent — the name on the contact card. | | `originalRequest.contact_phone` | string | (one of: OK) The `contact_phone` you sent — the phone number on the contact card. | | `originalRequest.contact_email` | string | (one of: OK) The `contact_email` you sent — the contact's email address. | | `originalRequest.contact_birthday` | string | (one of: OK) The `contact_birthday` you sent — the contact's birthday (`YYYY-MM-DD`). | | `originalRequest.address_street` | string | (one of: OK) The `address_street` you sent — the contact's street address. | | `originalRequest.address_city` | string | (one of: OK) The `address_city` you sent — the contact's city. | | `originalRequest.address_country` | string | (one of: OK) The `address_country` you sent — the contact's country. | | `originalRequest.website` | string | (one of: OK) The `website` you sent — the contact's website URL. | | `originalRequest.replyTo` | string | (one of: OK) The `replyTo` you sent — the unique ID of the quoted message. Left out when you did not quote a message. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `status` | string | (one of: FAIL) FAIL — the request was not carried out. `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `2` — 'from' is missing, or JSON syntax error; `3` — Wrong apiKey, or the "from" number is not registered with us; `4` — 'to' is either empty or wrong number format; `5` — 'contact_name' can't be empty; `6` — 'contact_phone' can't be empty; `7` — You are trying to send a message but it has been more than 24 hours since the client's last message. Please use 'Send Template' instead; `8` — You are trying to send a message for the first time to a contact. Please use 'Send Template' message instead; `9` — WhatsApp error, please try again or contact support; `10` — Rate limit error, try again. | #### Example: OK The system received your request. ```json { "status": "OK", "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "contact_name": "Dana Levi - Sales", "contact_phone": "972521234567", "timestamp": 1600115719, "from": "972771234567", "to": "972501234567", "templateTimeLeft": 1200, "conversationTimeLeft": 0, "reason": 1 } ``` #### Example: Reason 6 'contact_phone' can't be empty. ```json { "status": "FAIL", "reason": 6 } ``` #### Example: Reason 7 More than 24 hours have passed since the client's last message. Use 'Send Template' instead. ```json { "status": "FAIL", "reason": 7 } ``` --- # Send Reaction Source: https://docs.99digital.co.il/whatsapp-api/send-reaction Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/send-reaction.md Section: WhatsApp API `POST https://api.99digital.co.il/whatsapp/v2/sendReaction` React with an emoji to a message your client sent you, or remove your reaction. Reactions are emoji responses to an incoming message: ![A WhatsApp message with an emoji reaction under it](https://storage.99digital.online/docs/reaction.png) For every incoming message you get to your webhook, you can send a reaction emoji. ## More Remarks - You can only have one reaction per message. - The emoji can be any emoji you want. You can send a rendered emoji (🧐) or its escaped source code form, as in Java or JSON (`"\uD83D\uDE00"`). - You can send a reaction to the messages your client sent you: `unique` is the message's unique ID from your webhook. - You can send a reaction within 24 hours since the client's last message. ## Settings | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/sendReaction` | | Method | JSON via POST | | Key | Value | | --- | --- | | apiKey | Your API key for the service | ## Body | Parameter | Description / Example | Mandatory | | --- | --- | --- | | from | Your WhatsApp account. International number without `+`. For example: `972771234567` | yes | | to | The number you want to send the reaction to, in international format, digits only. For example: `972501234567`. Or: the user id you want to send the reaction to, for a client who hides their number behind a WhatsApp username (it arrives as `from_id` in your webhook). For example: `IL.1605856887361213` | yes | | unique | The unique ID of the message you wish to attach the reaction to. | yes | | reaction | The emoji you wish to react with. If you want to remove the emoji, just send an empty value. | yes | | showRequest | You can get back in the response an object with all the request you sent (without the `apiKey`). Default is off (`0`). `1` — enable. | no | ## Response ```json { "status": "OK", "unique": "65dfd4r4dref34rdfxd34r", "reaction": "😀", "reason": 1 } ``` ## Response-Explain | Parameter | Description | | --- | --- | | status | OK or FAIL. **Note:** OK status doesn't mean the reaction arrived to the end user, it only means that the system received your request. You should listen to [webhooks](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) to see the status of your message. | | unique | The unique ID of the reaction message. | | reaction | The emoji you used. | | originalRequest | Original request object, if you enabled this in `showRequest` when sending the request. Empty fields are left out. | | reason | Description | | --- | --- | | 1 | Not FAIL, the status is OK. | | 2 | `from` is missing, or JSON syntax error. | | 3 | Wrong apiKey, or the `from` number is not registered with us. | | 4 | `unique` is empty or does not exist, or `to` is empty or wrong. | | 5 | Error in the emoji you used. | | 7 | You are trying to send a reaction but it has been more than 24 hours since the client's last message. | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | Your WhatsApp account. International number without `+`. Example: `972771234567`. | | `to` | string | Yes | The number you want to send the reaction to, in international format, digits only — or the user id you want to send the reaction to, for a client who hides their number behind a WhatsApp username (it arrives as `from_id` in your webhook). Example: `972501234567`. | | `unique` | string | Yes | The unique ID of the message you wish to attach the reaction to. Example: `92E004B950CCEA3C386FCFA2AAF8558A`. | | `reaction` | string | Yes | The emoji you wish to react with. To remove your reaction, send an empty value. Example: `😀`. | | `showRequest` | integer | No | You can get back in the response an object with all the request you sent (without the `apiKey`). One of: `0` — Off; `1` — Enable — the response includes `originalRequest`. Default: `0`. | ### Example: React React to the client's message. ```json { "from": "972771234567", "to": "972501234567", "unique": "92E004B950CCEA3C386FCFA2AAF8558A", "reaction": "👍" } ``` ### Example: Remove reaction An empty `reaction` removes your reaction from the message. ```json { "from": "972771234567", "to": "972501234567", "unique": "92E004B950CCEA3C386FCFA2AAF8558A", "reaction": "" } ``` ## Responses ### 200 — The request was processed. Both a successful and a failed request answer with HTTP 200 — check `status`, and `reason` when it is FAIL. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) OK status doesn't mean the reaction arrived to the end user, it only means that the system received your request. You should listen to [webhooks](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) to see the status of your message. Always `OK`. | | `unique` | string | (one of: OK) The unique ID of the reaction message. Example: `19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ`. | | `reaction` | string | (one of: OK) The emoji you used. Example: `👍`. | | `originalRequest` | object | (one of: OK) Original request object, if you enabled this in `showRequest` when sending the request. Empty fields are left out. | | `originalRequest.from` | string | (one of: OK) The `from` you sent — your WhatsApp account. | | `originalRequest.unique` | string | (one of: OK) The `unique` you sent — the ID of the message you reacted to. | | `originalRequest.reaction` | string | (one of: OK) The `reaction` you sent — the emoji. Left out when you removed a reaction (empty value). | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `status` | string | (one of: FAIL) FAIL — the request was not carried out. `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `2` — 'from' is missing, or JSON syntax error; `3` — Wrong apiKey, or the "from" number is not registered with us; `4` — 'unique' is empty or does not exist, or 'to' is empty or wrong; `5` — Error in the emoji you used; `7` — You are trying to send a reaction but it has been more than 24 hours since the client's last message. | #### Example: OK The system received your request. ```json { "status": "OK", "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "reaction": "👍", "reason": 1 } ``` #### Example: Reason 4 'unique' is empty or does not exist. ```json { "status": "FAIL", "reason": 4 } ``` #### Example: Reason 7 More than 24 hours have passed since the client's last message. ```json { "status": "FAIL", "reason": 7 } ``` --- # Send Carousel Source: https://docs.99digital.co.il/whatsapp-api/send-carousel Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/send-carousel.md Section: WhatsApp API `POST https://api.99digital.co.il/whatsapp/v2/sendCarousel` Send a row of 2 to 10 media cards that your client scrolls through, each with its own buttons. :::info You can use the "Send Carousel" API in one case only: you reply to a message that the client sent, within 24 hours since the client sent their last message. ::: :::info If you send a message to a new client, or try to send a message to an old client (old client means that more than 24 hours have passed since their last message), you must use the [Send Template Message](https://docs.99digital.co.il/whatsapp-api/templates/send-a-template) API instead. Sending a contact is not available for a template message, therefore sending a contact message can only be done when replying to a client. If you sent a template message to the client, the client did not reply yet, and you want to send another message to them, you must use the template message again. ::: Sending a carousel means sending a carousel of media cards to the client. This looks like this: ![A WhatsApp carousel: a message followed by image cards side by side, each with a button](https://storage.99digital.online/docs/carousel1.png) ## Remarks - You can use the "Send Carousel" API in one case only: to reply to a message that the client sent, within 24 hours since the client sent their last message. If you send a message to a new client, or try to send a message to an old client (old client means that 24 hours have passed since the client's last message), you must use the "Send Template Message" API instead. If you sent a template message to the client, the client did not reply yet, and you want to send another message to them, you must use the template message again. - You can only send a message to private people, not groups. - The billing is per "conversation". A conversation means a 24-hour session between you and the client (this 24-hour conversation session is unrelated to the 24-hour timer for template messages). - You can send unlimited messages within the 24-hour session time of a conversation. - The 24-hour conversation session starts when you send a message to the client. - Every time the client replies, the template message session resets, which means that you don't have to use a template message during this 24-hour template message session. - The message must include between 2 and 10 cards. - Header and footer are not supported. - Cards must include either an image or a video. - A card must include either a URL button (external button) or one / two reply buttons. - All cards must look the same regarding the buttons type (either 1 with `buttonExternal`, or 2 / 3 with `button1` / `button2`). - All cards must look the same regarding the card body. If you choose to use a body, all cards must have a body. - All cards must have the same `headerLink` type, either an image or a video. - Make sure you follow the cards numbering right. Do not send `card5` data without sending `card1`, `card2`, `card3` and `card4` too. ## Settings | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/sendCarousel` | | Method | JSON via POST | | Key | Value | | --- | --- | | apiKey | Your API key for the service | ## Body Each card has a number from 1 to 10 in its field names (the `X` below): `card1_headerLink`, `card1_body` and so on describe the first card, `card2_headerLink` the second, up to `card10_`. Every card has the same fields. | Parameter | Description / Example | Mandatory | Max length | Example | | --- | --- | --- | --- | --- | | from | Your WhatsApp account. International number without `+`. | yes | | `972771234567` | | to | The number you want to send the message to, in international format, digits only (a local number such as `0501234567` is rejected with reason 4).
or
The user id you want to send the message to — for a client who hides their number behind a WhatsApp [username](https://docs.99digital.co.il/whatsapp-api/information/username); it arrives as `from_id` in your webhook. | yes | | `972501234567`
or
`IL.1605856887361213` | | body | Your message goes here, that comes with all the cards.
`\n` for a new line
`*text*` for bold
`_text_` for italic
`~text~` for strikethrough | yes | 1024 | `hello, please choose a product you like!` | | buttons | Here you need to choose how the buttons of all cards will be:
`1` - buttonExternal type
`2` - one 'reply' button type
`3` - two 'reply' buttons type | yes | 1 | `1` | | cardX_headerLink | The headerLink URL for card X. X can be 1 to 10.
The media must be either an image or a video; you must provide a valid URL, starting with `https://`.
Maximum 5 MB for an image, 16 MB for a video. | yes
minimum 2, maximum 10 | 2000 | `card8_headerLink` = `"https://www.example.com/file.png"` | | cardX_body | The body content of a card. X can be between 1 to 10.
If one card has a body, all the cards must have one. | no | 160 characters and up to 2 new lines (`\n`) | `card8_body` = `"Here is our blue flower\n\nclick to buy"` | | cardX_buttonExternal | In case you selected the `buttons` parameter to 1, here is the external button of card X — a phone number, a link or an email address, see the table below. X can be between 1 to 10. | only if `buttons` is set to 1 | 1000 | `https://www.google.com` | | cardX_buttonExternalText | The text that will appear for `cardX_buttonExternal`. X can be between 1 to 10. | only if `buttons` is set to 1 | 20 characters | `Click here` | | cardX_button1 | In case you selected the `buttons` parameter to 2 or 3, here is the first button text. X can be between 1 to 10. | only if `buttons` is set to 2 or 3 | 20 characters | `Click here one` | | cardX_button1ID | In case you selected the `buttons` parameter to 2 or 3, here you can provide an ID for that button, that will be sent back to you on the webhook. If you choose not to provide this value, the value will be set to 1. X can be between 1 to 10. | Not mandatory, only if `buttons` is set to 2 or 3.
If not provided, 1 will be set | 256 | `id-for-button-one` | | cardX_button2 | In case you selected the `buttons` parameter to 3, here is the second button text. X can be between 1 to 10. | only if `buttons` is set to 3 | 20 characters | `Click here two` | | cardX_button2ID | In case you selected the `buttons` parameter to 3, here you can provide an ID for that button, that will be sent back to you on the webhook. If you choose not to provide this value, the value will be set to 2. X can be between 1 to 10. | Not mandatory, only if `buttons` is set to 3.
If not provided, 2 will be set | 256 characters | `id-for-button-two` | | replyTo | In case you want to reply to a message that the end user has sent (quoted message), here you can provide the unique ID of that message. To quote one of your own messages, provide the `unique` you received when you sent it. | no | | | | showRequest | You can get back in the response an object with all the request you sent (without the `apiKey`).
Default is off (`0`).
`1` - enable | no | 1 | `0` | `cardX_buttonExternal` values: | Input | Example | What will happen? | | --- | --- | --- | | phone number (numbers only) | `972501234567` | The system will create a button that will initiate a phone call | | link (must start with `http` or `https`) | `https://www.google.com` | The system will create a button that will open the website | | email address | `john@example.com` | The system will create a button that will open the default email app to send an email | ## Sample request A message with two cards, an image header and `buttonExternal`: ```json { "from": "972771234567", "to": "972501234567", "body": "hello", "buttons": 1, "card1_headerLink": "https://www.example.com/image.png", "card1_buttonExternal": "972501234567", "card1_buttonExternalText": "Call us", "card2_headerLink": "https://www.example.com/imagetwo.png", "card2_buttonExternal": "https://www.example.com", "card2_buttonExternalText": "Our website" } ``` ## Response ```json { "status": "OK", "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "body": "hello", "timestamp": 1771932645, "from": "972771234567", "to": "972501234567", "reason": 1, "templateTimeLeft": 1431, "card1_headerLink": "https://www.example.com/image.png", "card2_headerLink": "https://www.example.com/imagetwo.png" } ``` ## Response-Explain | Parameter | Description | | --- | --- | | status | `OK` or `FAIL`.
**Note:** OK status doesn't mean the message arrived to the end user. It only means that the system received your request. You should listen to [webhooks](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) to see the status of your message. | | unique | Unique ID for any message. The webhooks about this message carry the same ID. | | body | The text you sent | | timestamp | Time stamp of the message (Unix time, in seconds) | | from | Your WhatsApp account | | to | The number or the user id that the message was sent to | | cardX_headerLink | The link you provided for any of the cards | | cardX_body | The body text you provided for any of the cards (if provided) | | templateTimeLeft | Amount of minutes left since the client's last message. If passed, you must use a template message. This value resets every time the client sends you a message. | | originalRequest | Original request object, if you enabled this in `showRequest` when sending the request. Empty fields are left out. | | reason | The status explanation — see the table below. | | reason | Description | | --- | --- | | 1 | Not FAIL. The status is OK. | | 2 | `from` is missing, or JSON syntax error | | 3 | Wrong apiKey, or the "from" number is not registered with us | | 4 | `to` is either empty or wrong number format | | 5 | `body` can't be empty | | 6 | Your WhatsApp number is not set up for sending. Please contact support. | | 7 | You are trying to send a message but it has been more than 24 hours since the client's last message. Please use 'Send Template' instead. | | 8 | You are trying to send a message for the first time to a contact. Please use 'Send Template' message instead. | | 9 | Rate limit error, try again | | 10 | The cards are not in the right format or order, or `card1` + `card2` do not exist. Make sure you have the right order of cards. This also covers a card whose `headerLink` is missing or does not start with `https://`, and a card with buttons that don't match `buttons`. | | 11 | `buttons` is incorrect or wrong (missing, or not 1, 2 or 3) | | 12 | The cards mix images and videos: all cards must have the same `headerLink` type | | 13 | `cardX_body` is too long or incorrect for one or more of the cards (more than 160 characters or more than 2 new lines), or only some of the cards have a body | | 14 | `cardX_buttonExternal` is required for the selected `buttons` type. Make sure `cardX_buttonExternal` is in the correct format (a phone number, a link or an email address). The issue can be in one or more of the cards provided. | | 15 | `cardX_buttonExternalText` is required since `cardX_buttonExternal` is in use. Make sure `cardX_buttonExternalText` is in the correct format (up to 20 characters). The issue can be in one or more of the cards provided. | | 16 | `cardX_button1` is required for the selected `buttons` type. Make sure `cardX_button1` is in the correct format (up to 20 characters). The issue can be in one or more of the cards provided. | | 17 | `cardX_button1ID` is wrong or not in the correct format (longer than 256 characters). The issue can be in one or more of the cards provided. | | 18 | `cardX_button2` is required for the selected `buttons` type. Make sure `cardX_button2` is in the correct format (up to 20 characters). The issue can be in one or more of the cards provided. | | 19 | `cardX_button2ID` is wrong or not in the correct format (longer than 256 characters). The issue can be in one or more of the cards provided. | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | Your WhatsApp account. International number without `+`. Example: `972771234567`. | | `to` | string | Yes | The number you want to send the message to, in international format, digits only (a local number such as `0501234567` is rejected with reason 4) — or the user id you want to send the message to, for a client who hides their number behind a WhatsApp username (it arrives as `from_id` in your webhook). Example: `972501234567`. | | `body` | string | Yes | Your message, which comes with all the cards. Use `\n` for a new line, `*text*` for bold, `_text_` for italic and `~text~` for strikethrough. Max length: 1024. Example: `Hello, please choose a product you like!`. | | `buttons` | integer | Yes | Here you need to choose how the buttons of all the cards will be. One of: `1` — buttonExternal type — one external button per card (`cardX_buttonExternal`); `2` — One 'reply' button type — one reply button per card (`cardX_button1`); `3` — Two 'reply' buttons type — two reply buttons per card (`cardX_button1` and `cardX_button2`). Example: `1`. | | `card1_headerLink` | string (uri) | Yes | The headerLink URL of card 1: the media must be either an image or a video, and you must provide a valid URL starting with `https://` — up to 5 MB for an image, 16 MB for a video. All cards must use the same media type. Every card needs one, and there are at least 2 cards: `card1_headerLink`, `card2_headerLink`, and up to `card10_headerLink`. Example: `https://storage.image.com/file.png`. | | `card1_body` | string | No | The text of card 1: up to 160 characters and up to 2 new lines (`\n`). If one card has a body, all the cards must have one. Max length: 160. Example: `Here is our blue flower click to buy`. | | `card1_buttonExternal` | string | No | Required when `buttons` is 1: the external button of card 1. - A phone number, digits only (`972501234567`) — a button that starts a phone call. - A link starting with `http` or `https` (`https://www.google.com`) — a button that opens the website. - An email address (`john@example.com`) — a button that opens the email app to send an email. Example: `https://www.google.com`. | | `card1_buttonExternalText` | string | No | Required when `buttons` is 1: the text that will appear on `card1_buttonExternal`. Max length: 20. Example: `Click here`. | | `card1_button1` | string | No | Required when `buttons` is 2 or 3 — the text of the first button. Max length: 20. Example: `Click here one`. | | `card1_button1ID` | string | No | When `buttons` is 2 or 3, an id for the first button, which will be sent back to you on the webhook. If you choose not to provide this value, it will be set to 1. Default: `1`. Max length: 256. Example: `id-for-button-one`. | | `card1_button2` | string | No | Required when `buttons` is 3 — the text of the second button. Max length: 20. Example: `Click here two`. | | `card1_button2ID` | string | No | When `buttons` is 3, an id for the second button, which will be sent back to you on the webhook. If you choose not to provide this value, it will be set to 2. Default: `2`. Max length: 256. Example: `id-for-button-two`. | | `replyTo` | string | No | In case you want to reply to a message that the end user has sent (quoted message), here you can provide the unique ID of that message. To quote one of your own messages, provide the `unique` you received when you sent it. Example: `92E004B950CCEA3C386FCFA2AAF8558A`. | | `showRequest` | integer | No | You can get back in the response an object with all the request you sent (without the `apiKey`). One of: `0` — Off; `1` — Enable — the response includes `originalRequest`. Default: `0`. | ### Example: External buttons `buttons` 1 — each card has one button that opens a website, starts a call or opens an email. ```json { "from": "972771234567", "to": "972501234567", "body": "Hello, please choose a product you like!", "buttons": 1, "card1_headerLink": "https://storage.99digital.online/samples/hello.png", "card1_body": "Browse the full catalogue online.", "card1_buttonExternal": "https://www.example.com/catalogue", "card1_buttonExternalText": "Open catalogue", "card2_headerLink": "https://storage.99digital.online/samples/hello.png", "card2_body": "Or talk to a human - we pick up fast.", "card2_buttonExternal": "97231234567", "card2_buttonExternalText": "Call us" } ``` ### Example: One reply button `buttons` 2 — each card has one reply button with your own id, which comes back in the webhook. ```json { "from": "972771234567", "to": "972501234567", "body": "Which one would you like?", "buttons": 2, "card1_headerLink": "https://storage.99digital.online/samples/hello.png", "card1_body": "Leather wallet - 149 NIS", "card1_button1": "I want this", "card1_button1ID": "WANT_WALLET", "card2_headerLink": "https://storage.99digital.online/samples/hello.png", "card2_body": "Travel backpack - 349 NIS", "card2_button1": "I want this", "card2_button1ID": "WANT_BACKPACK", "card3_headerLink": "https://storage.99digital.online/samples/hello.png", "card3_body": "Ceramic mug - 59 NIS", "card3_button1": "I want this", "card3_button1ID": "WANT_MUG" } ``` ### Example: Two reply buttons `buttons` 3 — each card has two reply buttons. These cards are videos. ```json { "from": "972771234567", "to": "972501234567", "body": "Pick a show and a seat.", "buttons": 3, "card1_headerLink": "https://storage.99digital.online/samples/meditation.mp4", "card1_body": "Sunday 20:00", "card1_button1": "Standard seat", "card1_button1ID": "SUN_STD", "card1_button2": "Front row", "card1_button2ID": "SUN_FRONT", "card2_headerLink": "https://storage.99digital.online/samples/meditation.mp4", "card2_body": "Tuesday 20:00", "card2_button1": "Standard seat", "card2_button1ID": "TUE_STD", "card2_button2": "Front row", "card2_button2ID": "TUE_FRONT" } ``` ### Example: Cards without text No `cardX_body` — the cards show only the media and the button. ```json { "from": "972771234567", "to": "972501234567", "body": "Tap the item you want to know more about.", "buttons": 2, "card1_headerLink": "https://storage.99digital.online/samples/hello.png", "card1_button1": "Details", "card1_button1ID": "ITEM_1", "card2_headerLink": "https://storage.99digital.online/samples/hello.png", "card2_button1": "Details", "card2_button1ID": "ITEM_2" } ``` ## Responses ### 200 — The request was processed. Both a successful and a failed request answer with HTTP 200 — check `status`, and `reason` when it is FAIL. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) OK status doesn't mean the message arrived to the end user, it only means that the system received your request. You should listen to [webhooks](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) to see the status of your message. Always `OK`. | | `unique` | string | (one of: OK) Unique ID for any message. The webhooks about this message carry the same ID. Example: `19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ`. | | `body` | string | (one of: OK) The text you sent. | | `timestamp` | integer | (one of: OK) Time stamp of the message (Unix time, in seconds). Example: `1600115719`. | | `from` | string | (one of: OK) Your WhatsApp account. Example: `972771234567`. | | `to` | string | (one of: OK) The number or the user id that the message was sent to. Example: `972501234567`. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `templateTimeLeft` | integer | (one of: OK) Amount of minutes left since the client's last message. If passed, you must use a template message. This value resets every time the client sends you a message. Example: `1200`. | | `card1_headerLink` | string | (one of: OK) The link you provided for each of the cards: `card1_headerLink`, `card2_headerLink` and so on. | | `card1_body` | string | (one of: OK) The body text you provided for each of the cards, if provided: `card1_body`, `card2_body` and so on. | | `originalRequest` | object | (one of: OK) Original request object, if you enabled this in `showRequest` when sending the request: the fields below and every card field you sent. Empty fields are left out. | | `originalRequest.from` | string | (one of: OK) The `from` you sent — your WhatsApp account. | | `originalRequest.to` | string | (one of: OK) The `to` you sent — the number or user id of the client. | | `originalRequest.body` | string | (one of: OK) The `body` you sent — the message text that comes with the cards. | | `originalRequest.buttons` | integer | (one of: OK) The `buttons` you sent — 1 external button, 2 one reply button, 3 two reply buttons per card. | | `originalRequest.replyTo` | string | (one of: OK) The `replyTo` you sent — the unique ID of the quoted message. | | `status` | string | (one of: FAIL) FAIL — the request was not carried out. `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `2` — 'from' is missing, or JSON syntax error; `3` — Wrong apiKey, or the "from" number is not registered with us; `4` — 'to' is either empty or wrong number format; `5` — 'body' can't be empty; `6` — Your WhatsApp number is not set up for sending. Please contact support; `7` — You are trying to send a message but it has been more than 24 hours since the client's last message. Please use 'Send Template' instead; `8` — You are trying to send a message for the first time to a contact. Please use 'Send Template' message instead; `9` — Rate limit error, try again; `10` — The cards are not in the right format or order: there are fewer than 2 cards, a card number is skipped, a card's `headerLink` is missing or is not an https link, or a card has buttons that don't match `buttons`; `11` — 'buttons' is missing or not 1, 2 or 3; `12` — The cards mix images and videos. All cards must use the same media type; `13` — A card body is longer than 160 characters or has more than 2 new lines, or only some of the cards have a body; `14` — `cardX_buttonExternal` is required for the selected 'buttons' type, and must be a phone number, a link or an email address. The issue can be in one or more of the cards; `15` — `cardX_buttonExternalText` is required since `cardX_buttonExternal` is in use, up to 20 characters. The issue can be in one or more of the cards; `16` — `cardX_button1` is required for the selected 'buttons' type, up to 20 characters. The issue can be in one or more of the cards; `17` — `cardX_button1ID` is wrong or too long. The issue can be in one or more of the cards; `18` — `cardX_button2` is required for the selected 'buttons' type, up to 20 characters. The issue can be in one or more of the cards; `19` — `cardX_button2ID` is wrong or too long. The issue can be in one or more of the cards. | #### Example: OK The system received your request. ```json { "status": "OK", "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "body": "Hello, please choose a product you like!", "timestamp": 1600115719, "from": "972771234567", "to": "972501234567", "reason": 1, "templateTimeLeft": 1200, "card1_headerLink": "https://storage.99digital.online/samples/hello.png", "card1_body": "Browse the full catalogue online.", "card2_headerLink": "https://storage.99digital.online/samples/hello.png", "card2_body": "Or talk to a human - we pick up fast." } ``` #### Example: Reason 7 More than 24 hours have passed since the client's last message. Use 'Send Template' instead. ```json { "status": "FAIL", "reason": 7 } ``` #### Example: Reason 10 Only one card was sent, or the cards are not numbered in order. ```json { "status": "FAIL", "reason": 10 } ``` --- # Type Effect Source: https://docs.99digital.co.il/whatsapp-api/type-effect Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/type-effect.md Section: WhatsApp API `POST https://api.99digital.co.il/whatsapp/v2/typing` Type effect allows you to send a "typing..." indicator to your client. ![The "typing..." indicator under the client's message, which shows two blue check marks](https://storage.99digital.online/docs/typing.png) The "typing..." indicator gives a more live feeling to the conversation, especially if you are building a chat bot. ## More Remarks - The typing effect will be dismissed once you send an actual message ([Send Message](https://docs.99digital.co.il/whatsapp-api/send-message) or any other) or once 20 seconds have passed, whichever comes first. - To prevent your client from waiting in the chat, it is better to use the typing indicator just a few moments before you are actually going to send a response. - The typing indicator is not an on/off feature for your entire WhatsApp number: this endpoint needs to be called every time you wish to create this effect. - This can only be sent when a session is open between you and the client (24-hour session), meaning that the client has sent you a message in the last 24 hours. - When using the type effect, it will automatically mark the message that the client sent you as "read" (two blue check marks, as shown in the picture above), so the client knows your API has read the message and is preparing a response. - Best practice is to use this when you are using an AI bot and the answers take a bit of time to generate, or when you wish to keep the client in the chat while preparing an answer. - Typing effect is not yet supported for all WhatsApp API accounts. - Avoid sending too many typing effects to the same client without sending an actual message, for a better user experience (no hard limit, just a suggestion). - Avoid sending a typing effect if you reply within less than 1 second, for a better user experience (no hard limit, just a suggestion). ## Settings | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/typing` | | Method | JSON via POST | | Key | Value | | --- | --- | | apiKey | Your API key for the service | ## Body | Parameter | Description / Example | Mandatory | | --- | --- | --- | | from | Your WhatsApp account. International number without `+`. For example: `972771234567` | yes | | to | The number you want to send the typing effect to, in international format, digits only. For example: `972501234567`. Or: the user id you want to send the typing effect to, for a client who hides their number behind a WhatsApp username (it arrives as `from_id` in your webhook). For example: `IL.1605856887361213` | yes | ## Response ```json { "status": "OK", "from": "972771234567", "to": "972501234567", "reason": 1 } ``` ## Response-Explain | Parameter | Description | | --- | --- | | status | OK or FAIL. OK means the system received your request and sends the typing effect to the client. | | from | Your WhatsApp account. | | to | The number or the user id you sent the typing effect to. | | reason | Description | | --- | --- | | 1 | Not FAIL, the status is OK. | | 2 | `from` is missing, or JSON syntax error. | | 3 | Wrong apiKey, or the `from` number is not registered with us. | | 4 | `to` is empty or wrong. | | 6 | Error sending typing effect, please contact support. | | 7 | You are trying to use typing effect but it has been more than 24 hours since the client's last message. Please wait for a message from the client. | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | Your WhatsApp account. International number without `+`. Example: `972771234567`. | | `to` | string | Yes | The number you want to send the typing effect to, in international format, digits only — or the user id, for a client who hides their number behind a WhatsApp username (it arrives as `from_id` in your webhook). Example: `972501234567`. | ### Example (generated from the schema) ```json { "from": "972771234567", "to": "972501234567" } ``` ## Responses ### 200 — The request was processed. Both a successful and a failed request answer with HTTP 200 — check `status`, and `reason` when it is FAIL. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) OK — the system received your request and sends the typing effect to the client. It shows until you send an actual message, or for up to 20 seconds. Always `OK`. | | `from` | string | (one of: OK) Your WhatsApp account. Example: `972771234567`. | | `to` | string | (one of: OK) The number or the user id you sent the typing effect to. Example: `972501234567`. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `status` | string | (one of: FAIL) FAIL — the request was not carried out. `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `2` — 'from' is missing, or JSON syntax error; `3` — Wrong apiKey, or the "from" number is not registered with us; `4` — 'to' is empty or wrong; `6` — Error sending typing effect, please contact support; `7` — You are trying to use typing effect but it has been more than 24 hours since the client's last message. Please wait for a message from the client. | #### Example: OK The client sees "typing...". ```json { "status": "OK", "from": "972771234567", "to": "972501234567", "reason": 1 } ``` #### Example: Reason 7 More than 24 hours have passed since the client's last message. ```json { "status": "FAIL", "reason": 7 } ``` --- # Get History Source: https://docs.99digital.co.il/whatsapp-api/get-history Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/get-history.md Section: WhatsApp API `POST https://api.99digital.co.il/whatsapp/v2/getHistory` Get history allows you to see all chat history per conversation or for your entire WhatsApp number. We keep the chat history for 1 year: every message that is stored for more than 1 year is deleted. The files are stored as links, which are deleted after 7 days. ## Settings | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/getHistory` | | Method | JSON via POST | | Key | Value | | --- | --- | | apiKey | Your API key for the service | ## Body | Parameter | Description / Example | | --- | --- | | from | Your WhatsApp account. International number without `+`. For example: `972771234567` | | to | You can choose which contact to get the chat history for: the number, or the user id for a client who hides their number, exactly as it appears in your webhook. If you leave this empty, you will get the history for all your WhatsApp account. For example: `972501234567` | | page | Mandatory. Integer number. Every page shows the last 50 messages, newest first.
For example, page `1` will show the last known messages from 1 to 50; page `2` will show the last known messages from message 51 to 100.
A page past the end returns an empty list. | ## Response ```json [ { "unique": "3EB08F941940DDC30F58", "timestamp": 1614198777, "direction": 2, "from": "972771234567", "from_id": null, "to": "972501234567", "to_id": null, "type": "text", "state": 1, "message": "outgoing message" }, { "unique": "3EB08F941940DDCFGF58", "timestamp": 1614198211, "direction": 1, "from": "972501234568", "from_id": null, "to": "972771234567", "to_id": null, "type": "text", "state": 0, "message": "incoming message" } ] ``` A failed request answers with `status` FAIL and a `reason` instead of the list, for example `{"status": "FAIL", "reason": 11}`. ## Response-Explain | Parameter | Description | | --- | --- | | unique | The unique ID of the message | | timestamp | The timestamp of the message (Unix time, in seconds) | | direction | `1` for an incoming message, `2` for an outgoing message (incoming messages are messages that come to the webhook; outgoing messages are messages you sent using the API) | | from | The chat that sent the message | | from_id | In case the message came from an end user under hidden identity, this is the user id; otherwise `null` | | to | The chat that received the message | | to_id | In case the message was sent to an end user under hidden identity, this is the user id; otherwise `null` | | type | The message type. The available types depend on the direction — see the table below. | | state | The delivery state of the message — see the table below. The state is only relevant for outgoing messages. | | message | The message that was sent | | direction | Available message types | | --- | --- | | 1 | text, image, audio, video, location, ptt, document | | 2 | text, file, location, ptt | | value | Information | | --- | --- | | 0 | Acknowledge that the message failed to deliver | | 1 | Acknowledge that the message was received by the server (1 gray check mark) | | 2 | Acknowledge that the message was delivered (2 gray check marks) | | 3 | Acknowledge that the message was read (2 blue check marks) | | reason | Description | | --- | --- | | 2 | `from` is missing, or JSON syntax error | | 3 | Wrong apiKey, or the "from" number is not registered with us | | 4 | `from` is either empty or wrong number format | | 11 | `page` is invalid or empty | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | Your WhatsApp account. International number without `+`. Example: `972771234567`. | | `to` | string | No | You can choose which contact to get the chat history for — the number, or the user id for a client who hides their number, exactly as it appears in your webhook. If you leave this empty, you will get the history for all your WhatsApp account. Example: `972509876543`. | | `page` | integer | Yes | Every page shows 50 messages, newest first: page 1 shows the last known messages 1 to 50, page 2 messages 51 to 100, and so on. A page past the end returns an empty list. Minimum: 1. Example: `1`. | ### Example: Whole account The last 50 messages of your WhatsApp number, with every contact. ```json { "from": "972771234567", "page": 1 } ``` ### Example: One contact The last 50 messages with one contact. ```json { "from": "972771234567", "to": "972501234567", "page": 1 } ``` ## Responses ### 200 — The request was processed. A successful request answers with the list of messages; a failed one with `status` FAIL and a `reason`. Both are HTTP 200. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `[].unique` | string | (one of: Messages) The unique ID of the message. | | `[].timestamp` | integer | (one of: Messages) The timestamp of the message (Unix time, in seconds). | | `[].direction` | integer | (one of: Messages) Incoming messages are messages that come to your webhook; outgoing messages are messages you sent using the API. One of: `1` — Incoming message; `2` — Outgoing message. | | `[].from` | string | (one of: Messages) The chat that sent the message. | | `[].from_id` | string \| null | (one of: Messages) In case the message came from an end user under hidden identity, this is the user id; otherwise null. | | `[].to` | string | (one of: Messages) The chat that received the message. | | `[].to_id` | string \| null | (one of: Messages) In case the message was sent to an end user under hidden identity, this is the user id; otherwise null. | | `[].type` | string | (one of: Messages) The message type, which depends on the direction. Incoming (1): text, image, audio, video, location, ptt, document. Outgoing (2): text, file, location, ptt. | | `[].state` | integer | (one of: Messages) This state is only relevant for outgoing messages. One of: `0` — The message failed to deliver; `1` — The message was received by the server (1 gray check mark); `2` — The message was delivered (2 gray check marks); `3` — The message was read (2 blue check marks). | | `[].message` | string | (one of: Messages) The message that was sent. | | `status` | string | (one of: FAIL) FAIL — the request was not carried out. `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. It does not explain the state 0 of a failed message. One of: `2` — 'from' is missing, or JSON syntax error; `3` — Wrong apiKey, or the "from" number is not registered with us; `4` — 'from' is either empty or wrong number format; `11` — 'page' is invalid or empty. | #### Example: Messages An outgoing and an incoming message. ```json [ { "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "timestamp": 1614198777, "direction": 2, "from": "972771234567", "from_id": null, "to": "972501234567", "to_id": null, "type": "text", "state": 3, "message": "outgoing message" }, { "unique": "92E004B950CCEA3C386FCFA2AAF8558A", "timestamp": 1614198211, "direction": 1, "from": "972501234567", "from_id": null, "to": "972771234567", "to_id": null, "type": "text", "state": 0, "message": "incoming message" } ] ``` #### Example: No messages Nothing on this page. ```json [] ``` #### Example: Reason 11 'page' is invalid or empty. ```json { "status": "FAIL", "reason": 11 } ``` --- # Get Contacts Source: https://docs.99digital.co.il/whatsapp-api/get-contacts Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/get-contacts.md Section: WhatsApp API `POST https://api.99digital.co.il/whatsapp/v2/getContacts` Get Contacts allows you to see all contacts that messaged you and that you messaged. ## Settings | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/getContacts` | | Method | JSON via POST | | Key | Value | | --- | --- | | apiKey | Your API key for the service | ## Body | Parameter | Description / Example | | --- | --- | | from | Your WhatsApp account. International number without `+`. For example: `972771234567` | | page | Integer number. Every page shows the last 50 contacts, most recent first.
For example, page `1` will show the last known contacts from 1 to 50; page `2` will show the last known contacts from contact 51 to 100.
If you leave it out, you get page `1`. A page past the end returns an empty list. | ## Response ```json [ { "contact_phone": "972501234567", "contact_phone_id": null, "contact_name": "John", "update_time": 1770196687, "online_contact_id": 1, "online_conversation_id": 2, "contact_profilePic": "https://storage.99digital.online/samples/hello.png" }, { "contact_phone": "972501234568", "contact_phone_id": null, "contact_name": "Smith", "update_time": 1770196600, "online_contact_id": 3, "online_conversation_id": 4, "contact_profilePic": null } ] ``` A failed request answers with `status` FAIL and a `reason` instead of the list, for example `{"status": "FAIL", "reason": 3}`. ## Response-Explain | Parameter | Description | | --- | --- | | contact_phone | The end user's phone number — or their user id, for a client who hides their number | | contact_name | The end user's contact name | | update_time | The time when this contact was created / updated (Unix time, in seconds). This is based on your last interaction with them. | | online_contact_id | If you are using 99 Digital omni channel, this is the contact ID | | online_conversation_id | If you are using 99 Digital omni channel, this is the conversation ID | | contact_profilePic | If the contact ever sent you a message, and the profile picture arrived, you will find the link here (the same as in the webhook message when the incoming message arrived). If empty, you will get `null`. | | contact_phone_id | The user id of the contact (available for new contacts after May 28, 2026). Any contact before that will return `null`. | | reason | Description | | --- | --- | | 2 | `from` is missing, or JSON syntax error | | 3 | Wrong apiKey, or the "from" number is not registered with us | | 11 | `page` is invalid | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | Your WhatsApp account. International number without `+`. Example: `972771234567`. | | `page` | integer | No | Every page shows 50 contacts, most recent first: page 1 shows the last known contacts 1 to 50, page 2 contacts 51 to 100, and so on. A page past the end returns an empty list. Default: `1`. Minimum: 1. Example: `1`. | ### Example (generated from the schema) ```json { "from": "972771234567", "page": 1 } ``` ## Responses ### 200 — The request was processed. A successful request answers with the list of contacts; a failed one with `status` FAIL and a `reason`. Both are HTTP 200. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `[].contact_phone` | string | (one of: Contacts) The end user's phone number — or their user id, for a client who hides their number. | | `[].contact_phone_id` | string \| null | (one of: Contacts) The user id of the contact. Available for contacts created after May 28, 2026; null for any contact before that. | | `[].contact_name` | string | (one of: Contacts) The end user's contact name. | | `[].update_time` | integer | (one of: Contacts) The time when this contact was created or updated (Unix time, in seconds), based on your last interaction with them. | | `[].online_contact_id` | integer | (one of: Contacts) If you are using 99 Digital omni channel, this is the contact ID. | | `[].online_conversation_id` | integer | (one of: Contacts) If you are using 99 Digital omni channel, this is the conversation ID. | | `[].contact_profilePic` | string \| null | (one of: Contacts) If the contact ever sent you a message and the profile picture arrived, you will find the link here (the same as in the webhook of that message). If there is none, null. | | `status` | string | (one of: FAIL) FAIL — the request was not carried out. `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `2` — 'from' is missing, or JSON syntax error; `3` — Wrong apiKey, or the "from" number is not registered with us; `11` — 'page' is invalid. | #### Example: Contacts Two contacts — the second hides their number behind a WhatsApp username. ```json [ { "contact_phone": "972501234567", "contact_phone_id": null, "contact_name": "John", "update_time": 1770196687, "online_contact_id": 1, "online_conversation_id": 2, "contact_profilePic": "https://storage.99digital.online/samples/hello.png" }, { "contact_phone": "IL.1605856887361213", "contact_phone_id": "IL.1605856887361213", "contact_name": "Smith", "update_time": 1770196600, "online_contact_id": 3, "online_conversation_id": 4, "contact_profilePic": null } ] ``` #### Example: Reason 3 Wrong apiKey, or the "from" number is not registered with us. ```json { "status": "FAIL", "reason": 3 } ``` --- # Get Timers Source: https://docs.99digital.co.il/whatsapp-api/get-timers Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/get-timers.md Section: WhatsApp API `POST https://api.99digital.co.il/whatsapp/v2/getTimers` Get Timers API allows you to see the templateTimeLeft for a specific number. ## Settings | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/getTimers` | | Method | JSON via POST | | Key | Value | | --- | --- | | apiKey | Your API key for the service | ## Body | Parameter | Description / Example | | --- | --- | | from | Your WhatsApp account. International number without `+`. For example: `972771234567` | | number | The phone number you want to check. International number, digits only — or the user id, for a client who hides their number. For example: `972501234567` | ## Response ```json { "status": "OK", "templateTimeLeft": 400, "conversationTimeLeft": 0, "reason": 1 } ``` ## Response-Explain | Parameter | Description | | --- | --- | | status | `OK` or `FAIL` | | templateTimeLeft | Amount of minutes left since the client's last message. If passed (`0`), you must use a template message. This value resets every time the client sends you a message. | | conversationTimeLeft | No longer in use: the conversation time left is part of the webhook instead. Until it is removed in a future update, it is always `0`. | | reason | The status explanation — see the table below. | | reason | Description | | --- | --- | | 1 | Not FAIL. The status is OK. | | 2 | `from` is missing, or JSON syntax error | | 3 | Wrong apiKey, or the "from" number is not registered with us | | 4 | `number` is either empty or wrong number format | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | Your WhatsApp account. International number without `+`. Example: `972771234567`. | | `number` | string | Yes | The phone number you want to check, in international format, digits only — or the user id, for a client who hides their number. Example: `972551234567`. | ### Example (generated from the schema) ```json { "from": "972771234567", "number": "972551234567" } ``` ## Responses ### 200 — The request was processed. Both a successful and a failed request answer with HTTP 200 — check `status`, and `reason` when it is FAIL. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) OK — the request succeeded; `templateTimeLeft` shows the time left for this number. Always `OK`. | | `templateTimeLeft` | integer | (one of: OK) Amount of minutes left since the client's last message. If passed (0), you must use a template message. This value resets every time the client sends you a message. Example: `1200`. | | `conversationTimeLeft` | integer | (one of: OK) **Deprecated.** This value is no longer in use: the conversation time left is part of the webhook instead. Until it is removed in a future update, it is always 0. Example: `0`. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `status` | string | (one of: FAIL) FAIL — the request was not carried out. `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `2` — 'from' is missing, or JSON syntax error; `3` — Wrong apiKey, or the "from" number is not registered with us; `4` — 'number' is either empty or wrong number format. | #### Example: OK The client wrote recently — you can still reply without a template. ```json { "status": "OK", "templateTimeLeft": 1200, "conversationTimeLeft": 0, "reason": 1 } ``` #### Example: Window closed More than 24 hours have passed — use a template message. ```json { "status": "OK", "templateTimeLeft": 0, "conversationTimeLeft": 0, "reason": 1 } ``` #### Example: Reason 4 'number' is empty. ```json { "status": "FAIL", "reason": 4 } ``` --- # Mark as Read Source: https://docs.99digital.co.il/whatsapp-api/mark-as-read Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/mark-as-read.md Section: WhatsApp API `POST https://api.99digital.co.il/whatsapp/v2/readStatus` Mark as read allows you to send "read" status for incoming messages. The default is always to show the client 2 gray check marks; this endpoint allows you to set the read status for messages. For every incoming message you get to your webhook, you can send the status read, which is two blue check marks, like this: ![Two blue check marks under a WhatsApp message](https://storage.99digital.online/docs/ticks.png) so your client can know you read the message. The system will automatically mark the client's last message as read once you use this endpoint. ## More Remarks - Marking a message as read will also mark earlier messages in the conversation as read. - This operation is irreversible: once you marked a message as read, you can't change it back. ## Settings | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/readStatus` | | Method | JSON via POST | | Key | Value | | --- | --- | | apiKey | Your API key for the service | ## Body | Parameter | Description / Example | Mandatory | | --- | --- | --- | | from | Your WhatsApp account. International number without `+`. For example: `972771234567` | yes | | to | The number whose messages you want to mark as read, in international format, digits only. For example: `972501234567`
or
The user id of the client, for a client who hides their number behind a WhatsApp [username](https://docs.99digital.co.il/whatsapp-api/information/username) (it arrives as `from_id` in your webhook). For example: `IL.1605856887361213` | yes | ## Response ```json { "status": "OK", "reason": 1, "from": "972771234567", "to": "972501234567" } ``` ## Response-Explain | Parameter | Description | | --- | --- | | status | `OK` or `FAIL` | | from | Your WhatsApp number | | to | The destination number or destination user id | | reason | The status explanation — see the table below. | | error | Details, with some of the reason 2 failures (for example `No HB message found in history` when there is no message from this client to mark as read). Only in a FAIL response. | | reason | Description | | --- | --- | | 1 | Not FAIL. The status is OK. | | 2 | `from` is missing, JSON syntax error, or there is no message from this client to mark as read | | 3 | Wrong apiKey, or the "from" number is not registered with us | | 4 | `to` is empty or wrong (not a valid number or user id) | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | Your WhatsApp account. International number without `+`. Example: `972771234567`. | | `to` | string | Yes | The number whose messages you want to mark as read, in international format, digits only — or the user id, for a client who hides their number behind a WhatsApp username (it arrives as `from_id` in your webhook). Example: `972501234567`. | ### Example (generated from the schema) ```json { "from": "972771234567", "to": "972501234567" } ``` ## Responses ### 200 — The request was processed. Both a successful and a failed request answer with HTTP 200 — check `status`, and `reason` when it is FAIL. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) OK — the client's messages are marked as read (two blue check marks). Always `OK`. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `from` | string | (one of: OK) Your WhatsApp number. Example: `972771234567`. | | `to` | string | (one of: OK) The destination number or destination user id. Example: `972501234567`. | | `status` | string | (one of: FAIL) FAIL — the request was not carried out. `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `2` — 'from' is missing, JSON syntax error, or there is no message from this client to mark as read; `3` — Wrong apiKey, or the "from" number is not registered with us; `4` — 'to' is empty or wrong (not a valid number or user id). | | `error` | string | (one of: FAIL) Details, with some of the reason 2 failures. | #### Example: OK The client's messages show two blue check marks. ```json { "status": "OK", "reason": 1, "from": "972771234567", "to": "972501234567" } ``` #### Example: Reason 2 There is no message from this client to mark as read. ```json { "status": "FAIL", "reason": 2, "error": "No HB message found in history" } ``` --- # Black List (Block) Source: https://docs.99digital.co.il/whatsapp-api/black-list-block Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/black-list-block.md Section: WhatsApp API › Black list (Block) These endpoints allow you to block, unblock and get the list of blocked WhatsApp user numbers. | Endpoint | What it does | | --- | --- | | [Block](https://docs.99digital.co.il/whatsapp-api/black-list-block/block) | This endpoint allows you to block a number. | | [Unblock](https://docs.99digital.co.il/whatsapp-api/black-list-block/unblock) | This endpoint allows you to unblock a number you previously blocked. | | [Get Blocked List](https://docs.99digital.co.il/whatsapp-api/black-list-block/get-blocked-list) | This endpoint allows you to see all the numbers you blocked. | ## What happens here? Sometimes you wish to block a contact number (WhatsApp number) from sending you a message, for any kind of reason. When you do this, this will happen: - The user cannot contact your WhatsApp number at all: they won't be able to send you any message (they will see 1 grey check mark). - You can't message that user either. If you try to send, you will get an error. ## More Remarks - You can only block users that have messaged you in the last 24 hours. - The maximum limit is 64,000 numbers that you can have in your "block list". ## Best Practice - how to use This blacklist can be used, for example, when you send a template to the user with one of the buttons being "Unsubscribe": when the user clicks on it, you can add them to the block list. This endpoint is not only blocking incoming, but also outgoing messages: it will prevent, from your end, any future templates you might accidentally try to send them again. A real blacklist. Another use case: if a client sends you unwanted messages (or files), triggering your chat bot or other processes and integrations, you can stop their messages by blocking their number. --- # Block Source: https://docs.99digital.co.il/whatsapp-api/black-list-block/block Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/black-list-block/block.md Section: WhatsApp API › Black list (Block) `POST https://api.99digital.co.il/whatsapp/v2/block` This endpoint allows you to block a number. The user cannot contact your WhatsApp number at all (they will see 1 grey check mark), and you can't message that user either: if you try to send, you will get an error. You can only block users that have messaged you in the last 24 hours, and the maximum is 64,000 numbers in your block list. See [Black List (Block)](https://docs.99digital.co.il/whatsapp-api/black-list-block) for how it works and when to use it. ## Settings | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/block` | | Method | JSON via POST | | Key | Value | | --- | --- | | apiKey | Your API key for the service | ## Body | Parameter | Description / Example | Mandatory | | --- | --- | --- | | from | Your WhatsApp account. International number without `+`. For example: `972771234567` | yes | | whatsapp | The number you want to block, in international format, digits only. For example: `972501234567` | yes | ## Response ```json { "status": "OK", "from": "972771234567", "whatsapp": "972501234567", "reason": 1 } ``` ## Response-Explain | Parameter | Description | | --- | --- | | status | `OK` or `FAIL` | | from | Your WhatsApp account | | whatsapp | The number that you blocked | | reason | The status explanation — see the table below. | | reason | Description | | --- | --- | | 1 | Not FAIL. The status is OK. | | 2 | `from` is missing, or JSON syntax error | | 3 | Wrong apiKey, or the "from" number is not registered with us | | 4 | `whatsapp` is either empty or wrong number format | | 6 | Error blocking the number, please try again | | 7 | You are trying to block a number, but it has been more than 24 hours since the user sent you a message. You need to wait for their next message. | | 8 | The 64,000 block limit has been reached | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | Your WhatsApp account. International number without `+`. Example: `972771234567`. | | `whatsapp` | string | Yes | The number you want to block, in international format, digits only. Example: `972501234567`. | ### Example (generated from the schema) ```json { "from": "972771234567", "whatsapp": "972501234567" } ``` ## Responses ### 200 — The request was processed. Both a successful and a failed request answer with HTTP 200 — check `status`, and `reason` when it is FAIL. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) OK — the number is blocked. Always `OK`. | | `from` | string | (one of: OK) Your WhatsApp account. Example: `972771234567`. | | `whatsapp` | string | (one of: OK) The number that you blocked. Example: `972501234567`. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `status` | string | (one of: FAIL) FAIL — the request was not carried out. `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `2` — 'from' is missing, or JSON syntax error; `3` — Wrong apiKey, or the "from" number is not registered with us; `4` — 'whatsapp' is either empty or wrong number format; `6` — Error blocking the number, please try again; `7` — You are trying to block a number, but it has been more than 24 hours since the user sent you a message. You need to wait for their next message; `8` — The 64,000 block limit has been reached. | #### Example: OK The number is blocked. ```json { "status": "OK", "from": "972771234567", "whatsapp": "972501234567", "reason": 1 } ``` #### Example: Reason 7 The user hasn't messaged you in the last 24 hours. ```json { "status": "FAIL", "reason": 7 } ``` --- # Unblock Source: https://docs.99digital.co.il/whatsapp-api/black-list-block/unblock Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/black-list-block/unblock.md Section: WhatsApp API › Black list (Block) `POST https://api.99digital.co.il/whatsapp/v2/unblock` This endpoint allows you to unblock a number you previously blocked. See [Black List (Block)](https://docs.99digital.co.il/whatsapp-api/black-list-block) for how blocking works. ## Settings | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/unblock` | | Method | JSON via POST | | Key | Value | | --- | --- | | apiKey | Your API key for the service | ## Body | Parameter | Description / Example | Mandatory | | --- | --- | --- | | from | Your WhatsApp account. International number without `+`. For example: `972771234567` | yes | | whatsapp | The number you want to unblock, in international format, digits only. For example: `972501234567` | yes | ## Response ```json { "status": "OK", "from": "972771234567", "whatsapp": "972501234567", "reason": 1 } ``` ## Response-Explain | Parameter | Description | | --- | --- | | status | `OK` or `FAIL` | | from | Your WhatsApp account | | whatsapp | The number that you unblocked | | reason | The status explanation — see the table below. | | reason | Description | | --- | --- | | 1 | Not FAIL. The status is OK. | | 2 | `from` is missing, or JSON syntax error | | 3 | Wrong apiKey, or the "from" number is not registered with us | | 4 | `whatsapp` is either empty or wrong number format | | 6 | Error unblocking the number, please try again | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | Your WhatsApp account. International number without `+`. Example: `972771234567`. | | `whatsapp` | string | Yes | The number you want to unblock, in international format, digits only. Example: `972501234567`. | ### Example (generated from the schema) ```json { "from": "972771234567", "whatsapp": "972501234567" } ``` ## Responses ### 200 — The request was processed. Both a successful and a failed request answer with HTTP 200 — check `status`, and `reason` when it is FAIL. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) OK — the number is unblocked. Always `OK`. | | `from` | string | (one of: OK) Your WhatsApp account. Example: `972771234567`. | | `whatsapp` | string | (one of: OK) The number that you unblocked. Example: `972501234567`. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `status` | string | (one of: FAIL) FAIL — the request was not carried out. `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `2` — 'from' is missing, or JSON syntax error; `3` — Wrong apiKey, or the "from" number is not registered with us; `4` — 'whatsapp' is either empty or wrong number format; `6` — Error unblocking the number, please try again. | #### Example: OK The number is unblocked. ```json { "status": "OK", "from": "972771234567", "whatsapp": "972501234567", "reason": 1 } ``` #### Example: Reason 4 'whatsapp' is either empty or wrong number format. ```json { "status": "FAIL", "reason": 4 } ``` --- # Get Blocked List Source: https://docs.99digital.co.il/whatsapp-api/black-list-block/get-blocked-list Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/black-list-block/get-blocked-list.md Section: WhatsApp API › Black list (Block) `POST https://api.99digital.co.il/whatsapp/v2/blockedList` This endpoint allows you to see all the numbers you blocked. See [Black List (Block)](https://docs.99digital.co.il/whatsapp-api/black-list-block) for how blocking works. ## Settings | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/blockedList` | | Method | JSON via POST | | Key | Value | | --- | --- | | apiKey | Your API key for the service | ## Body | Parameter | Description / Example | Mandatory | | --- | --- | --- | | from | Your WhatsApp account. International number without `+`. For example: `972771234567` | yes | ## Response ```json { "status": "OK", "from": "972771234567", "numbers": ["972501234567", "972501234568"] } ``` ## Response-Explain | Parameter | Description | | --- | --- | | status | `OK` or `FAIL` | | from | Your WhatsApp account | | numbers | Array of the numbers that were blocked by you | | reason | Only in a FAIL response: the status explanation — see the table below. | | reason | Description | | --- | --- | | 2 | `from` is missing, or JSON syntax error | | 3 | Wrong apiKey, or the "from" number is not registered with us | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | Your WhatsApp account. International number without `+`. Example: `972771234567`. | ### Example (generated from the schema) ```json { "from": "972771234567" } ``` ## Responses ### 200 — The request was processed. Both a successful and a failed request answer with HTTP 200 — check `status`, and `reason` when it is FAIL. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) OK — `numbers` lists the numbers you blocked. Always `OK`. | | `from` | string | (one of: OK) Your WhatsApp account. Example: `972771234567`. | | `numbers` | array of string | (one of: OK) The numbers that you blocked. | | `status` | string | (one of: FAIL) FAIL — the request was not carried out. `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `2` — 'from' is missing, or JSON syntax error; `3` — Wrong apiKey, or the "from" number is not registered with us. | #### Example: OK Every number you blocked. ```json { "status": "OK", "from": "972771234567", "numbers": [ "972501234567", "972502958372" ] } ``` #### Example: Reason 3 Wrong apiKey, or the "from" number is not registered with us. ```json { "status": "FAIL", "reason": 3 } ``` --- # Request Phone Source: https://docs.99digital.co.il/whatsapp-api/request-phone Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/request-phone.md Section: WhatsApp API `POST https://api.99digital.co.il/whatsapp/v2/requestPhone` Ask a client who hides their phone number behind a WhatsApp username to share their phone number and name with you. :::info You can use the "Request Phone" API in one case only: you reply to a message that the client sent, within 24 hours since the client sent their last message. ::: ## Explanation - Requesting a phone is used only when the client is using the "username" feature, and hides their phone number on WhatsApp. When a client is hiding their phone number and their name, you can use Request Phone to ask the client to reveal their phone number to you. Read more about [usernames](https://docs.99digital.co.il/whatsapp-api/information/username). - The user will get a message with a button (you can't control its text), asking whether they want to reveal their phone number and their name to you. After the client confirms and clicks the button, the new phone number data will be sent as a `phone` type inside the webhook. ## Remarks - You can use the "Request Phone" API in one case only: to reply to a message that the client sent, within 24 hours since the client sent their last message. - The billing is per message: when sending this message, you will be billed. - Every time the client replies, the template message session resets, which means that you don't have to use a template message during this 24-hour template message session. ## Settings | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/requestPhone` | | Method | JSON via POST | | Key | Value | | --- | --- | | apiKey | Your API key for the service | ## Body | Parameter | Description / Example | Mandatory | | --- | --- | --- | | from | Your WhatsApp account. International number without `+`. For example: `972771234567` | yes | | to | The user id you want to send the message to (it arrives as `from_id` in your webhook). For example: `IL.1605856887361213` | yes | | body | Your message goes here.
`\n` for a new line
`*text*` for bold
`_text_` for italic
`~text~` for strikethrough | yes | | showRequest | You can get back in the response an object with all the request you sent (without the `apiKey`).
Default is off (`0`).
`1` - enable | no | ## Response ```json { "status": "OK", "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "body": "Please click to share your phone number", "timestamp": 1705225312, "from": "972771234567", "to": "IL.1605856887361213", "templateTimeLeft": 1372, "reason": 1 } ``` ## Response-Explain | Parameter | Description | | --- | --- | | status | `OK` or `FAIL`.
**Note:** OK status doesn't mean the message arrived to the end user. It only means that the system received your request. You should listen to [webhooks](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) to see the status of your message. | | unique | Unique ID for any message. The webhooks about this message carry the same ID. | | body | The text you sent | | timestamp | Time stamp of the message (Unix time, in seconds) | | from | Your WhatsApp account | | to | The number or the user id that the message was sent to | | templateTimeLeft | Amount of minutes left since the client's last message. If passed, you must use a template message. This value resets every time the client sends you a message. | | originalRequest | Original request object, if you enabled this in `showRequest` when sending the request. Empty fields are left out. | | reason | The status explanation — see the table below. | | reason | Description | | --- | --- | | 1 | Not FAIL. The status is OK. | | 2 | `from` is missing, or JSON syntax error | | 3 | Wrong apiKey, or the "from" number is not registered with us | | 4 | `to` is either empty or wrong format | | 5 | `body` is empty or wrong | | 6 | WhatsApp error - try again | | 7 | You are trying to send a message but it has been more than 24 hours since the client's last message. Please use Send Template instead. | | 8 | You are trying to send a message for the first time to a contact. Please use Send Template Message instead. | | 9 | Rate limit error, try again | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | Your WhatsApp account. International number without `+`. Example: `972771234567`. | | `to` | string | Yes | The user id you want to send the message to (it arrives as `from_id` in your webhook). Example: `IL.1605856887361213`. | | `body` | string | Yes | Your message goes here. Use `\n` for a new line, `*text*` for bold, `_text_` for italic and `~text~` for strikethrough. Example: `To complete your order we need your phone number - please tap the button to share it.`. | | `showRequest` | integer | No | You can get back in the response an object with all the request you sent (without the `apiKey`). One of: `0` — Off; `1` — Enable — the response includes `originalRequest`. Default: `0`. | ### Example (generated from the schema) ```json { "from": "972771234567", "to": "IL.1605856887361213", "body": "To complete your order we need your phone number - please tap the button to share it." } ``` ## Responses ### 200 — The request was processed. Both a successful and a failed request answer with HTTP 200 — check `status`, and `reason` when it is FAIL. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) OK status doesn't mean the message arrived to the end user, it only means that the system received your request. You should listen to [webhooks](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) to see the status of your message. Always `OK`. | | `unique` | string | (one of: OK) Unique ID for any message. The webhooks about this message carry the same ID. Example: `19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ`. | | `body` | string | (one of: OK) The text you sent. | | `timestamp` | integer | (one of: OK) Time stamp of the message (Unix time, in seconds). Example: `1600115719`. | | `from` | string | (one of: OK) Your WhatsApp account. Example: `972771234567`. | | `to` | string | (one of: OK) The user id that the message was sent to. Example: `IL.1605856887361213`. | | `templateTimeLeft` | integer | (one of: OK) Amount of minutes left since the client's last message. If passed, you must use a template message. This value resets every time the client sends you a message. Example: `1200`. | | `originalRequest` | object | (one of: OK) Original request object, if you enabled this in `showRequest` when sending the request. Empty fields are left out. | | `originalRequest.from` | string | (one of: OK) The `from` you sent — your WhatsApp account. | | `originalRequest.to` | string | (one of: OK) The `to` you sent — the user id of the client. | | `originalRequest.body` | string | (one of: OK) The `body` you sent — the message text. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `status` | string | (one of: FAIL) FAIL — the request was not carried out. `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `2` — 'from' is missing, or JSON syntax error; `3` — Wrong apiKey, or the "from" number is not registered with us; `4` — 'to' is either empty or wrong format; `5` — 'body' is empty or wrong; `6` — WhatsApp error — try again; `7` — You are trying to send a message but it has been more than 24 hours since the client's last message. Please use 'Send Template' instead; `8` — You are trying to send a message for the first time to a contact. Please use 'Send Template' message instead; `9` — Rate limit error, try again. | #### Example: OK The system received your request. ```json { "status": "OK", "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "body": "To complete your order we need your phone number - please tap the button to share it.", "timestamp": 1600115719, "from": "972771234567", "to": "IL.1605856887361213", "templateTimeLeft": 1200, "reason": 1 } ``` #### Example: Reason 7 More than 24 hours have passed since the client's last message. Use 'Send Template' instead. ```json { "status": "FAIL", "reason": 7 } ``` --- # Set Webhook Source: https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/webhook/set-webhook.md Section: WhatsApp API › Webhook `POST https://api.99digital.co.il/whatsapp/v2/setWebhook` Set Webhook allows you to set the webhook URL you want for all incoming messages and acknowledges. What we send to this URL, and when, is explained on the [Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/webhook) page: one page for every kind of webhook — [Incoming Messages](https://docs.99digital.co.il/whatsapp-api/webhook/incoming-messages), [Acknowledge](https://docs.99digital.co.il/whatsapp-api/webhook/acknowledge), [System Messages](https://docs.99digital.co.il/whatsapp-api/webhook/system-messages), [Contacts Update](https://docs.99digital.co.il/whatsapp-api/webhook/contacts-update) and [Outgoing Messages](https://docs.99digital.co.il/whatsapp-api/webhook/outgoing-messages). **Settings:** | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/setWebhook` | | Method | JSON via POST | | Header | Value | | --- | --- | | `apiKey` | Your API key for the service | **Body:** | Parameter | Description / Example | Mandatory | Example | | --- | --- | --- | --- | | `from` | Your WhatsApp account. International number without `+`, for example: `972771234567`. | yes | `972771234567` | | `url` | The webhook URL. It must start with `http://` or `https://`. If you need to clear this data, you can send `" "` (space): the webhook is turned off and nothing is sent until you set a URL again. | no | `https://your-server.example.com/99digital/whatsapp-webhook` | | `system` | System messages notifications ([System Messages](https://docs.99digital.co.il/whatsapp-api/webhook/system-messages)). 0 for off, 1 for on. Default is off. | no | `1` | | `systemPhoneAlert` | You can receive all system notifications via WhatsApp message directly from us. Here you can specify the phone you wish us to send the messages to (starting with 972). The messages will be sent in Hebrew. A list of phone numbers is accepted by providing comma separation, up to 5 numbers — digits and commas only, without spaces or `+`. If you need to clear this data, you can send `" "` (space). | no | `972502211234,972527788695` | | `readStatus` | Read status notification — sent / delivered / read / failed ([Acknowledge](https://docs.99digital.co.il/whatsapp-api/webhook/acknowledge)). 0 is off, 1 is on. Default is off. | no | `1` | | `retry` | Retry mechanism for webhook sending — see "Retry mechanism" below. 1 — enable this feature. 0 — disable this feature. By default, this feature is disabled (0). | no | `1` | Every field except `from` is optional: a field you leave out keeps its current value, so you can change one setting at a time. Changes take effect immediately. Use [Get Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/get-webhook) to see all your current settings. ### Retry mechanism Whenever we have a new update that we need to deliver to you, we will try to deliver it to your webhook. Your webhook must respond with a 2xx status (200 OK, 201, 204 …): we wait up to 5 seconds to connect to your server and up to 15 seconds for its answer. If this happens, we assume the message was received successfully. If this does not happen, we will initiate more retries in the following sequence (the same payload every time): - retry 1 — immediately after the first attempt - retry 2 — after 5 minutes - retry 3 — after 20 minutes - retry 4 — after 1 hour - retry 5 — after 4 hours - retry 6 — after 24 hours After that, we will stop trying to deliver the webhook message. By default, this feature is disabled (0), which means that we try to send only once, without any retries. **Response:** ```json { "status": "OK", "url": "https://your-server.example.com/99digital/whatsapp-webhook", "system": 1, "systemPhoneAlert": "972502211234", "readStatus": 1, "retry": 0, "reason": 1 } ``` **Response explained:** | Parameter | Description | | --- | --- | | `status` | OK or FAIL | | `url` | The webhook url you provided | | `system` | The system messages setting you provided | | `systemPhoneAlert` | The phone numbers you provided | | `readStatus` | The read status setting you provided | | `retry` | The retry setting you provided | | `reason` | The status explanation — see below | A field you did not send in this request comes back as `null` and keeps its saved value. | Reason | Explanation | | --- | --- | | 1 | Not FAIL. The status is OK. | | 2 | `from` is missing, or a JSON syntax error. | | 3 | Wrong apiKey, or your "from" number account does not exist. | | 4 | `system` must be 0 or 1. | | 5 | `systemPhoneAlert` list is invalid — digits and commas only. | | 6 | `readStatus` is invalid — it must be 0 or 1. | | 7 | `retry` is invalid — it must be 0 or 1. | | 9 | The url is invalid — it must start with `http://` or `https://`. | ## Remarks - Incoming messages, contacts updates and outgoing messages (coexistence) are sent whenever a `url` is set. Acknowledges (sent / delivered / read / failed) are sent only with `readStatus` 1, and system messages only with `system` 1. - Webhook messages come from the IP address **34.165.99.212**. In case you are required to whitelist, please whitelist this IP. ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | Your WhatsApp account. International number without `+`. Example: `972771234567`. | | `url` | string | No | The webhook URL. It must start with `http://` or `https://`. If you need to clear this data, you can send `" "` (space): the webhook is turned off and nothing is sent until you set a URL again. Example: `https://your-server.example.com/99digital/whatsapp-webhook`. | | `system` | integer | No | System messages notifications: updates about your account, your templates and messages that failed — see [System Messages](https://docs.99digital.co.il/whatsapp-api/webhook/system-messages). 0 for off, 1 for on. Default is off. One of: `0` — Off; `1` — On. Default: `0`. Example: `1`. | | `systemPhoneAlert` | string | No | You can receive all system notifications via WhatsApp message directly from us. Here you can specify the phone you wish us to send the messages to, in international format (starting with 972). The messages will be sent in Hebrew. A list of phone numbers is accepted by providing comma separation, up to 5 numbers — digits and commas only, without spaces or `+`. If you need to clear this data, you can send `" "` (space). Example: `972502211234,972527788695`. | | `readStatus` | integer | No | Read status notification: the acknowledge webhooks (sent / delivered / read / failed) of the messages you send — see [Acknowledge](https://docs.99digital.co.il/whatsapp-api/webhook/acknowledge). 0 is off, 1 is on. Default is off. One of: `0` — Off; `1` — On. Default: `0`. Example: `1`. | | `retry` | integer | No | Retry mechanism for webhook sending. Whenever we have a new update that we need to deliver to you, we will try to deliver it to your webhook. Your webhook must respond with a 2xx status (200 OK, 201, 204 …): we wait up to 5 seconds to connect to your server and up to 15 seconds for its answer. If this happens, we assume the message was received successfully. If this does not happen, we will initiate more retries in the following sequence (the same payload every time): - retry 1 — immediately after the first attempt - retry 2 — after 5 minutes - retry 3 — after 20 minutes - retry 4 — after 1 hour - retry 5 — after 4 hours - retry 6 — after 24 hours After that, we will stop trying to deliver the webhook message. By default, this feature is disabled (0), which means that we try to send only once, without the retries above. One of: `0` — Disable this feature — one attempt only; `1` — Enable this feature. Default: `0`. Example: `1`. | ### Example: URL Set the webhook URL; the other settings keep their current values. ```json { "from": "972771234567", "url": "https://your-server.example.com/99digital/whatsapp-webhook" } ``` ### Example: URL + all notifications The recommended production setup: incoming messages, acknowledges, system messages and retries all on. ```json { "from": "972771234567", "url": "https://your-server.example.com/99digital/whatsapp-webhook", "system": 1, "readStatus": 1, "retry": 1 } ``` ### Example: System alerts to my phone Receive the system notifications as WhatsApp messages (in Hebrew) on up to 5 phone numbers. ```json { "from": "972771234567", "system": 1, "systemPhoneAlert": "972502211234,972527788695" } ``` ### Example: Turn off the webhook A space as `url` clears it — nothing is sent until you set a URL again. ```json { "from": "972771234567", "url": " " } ``` ### Example: Clear alert phones A space as `systemPhoneAlert` clears the phone numbers. ```json { "from": "972771234567", "systemPhoneAlert": " " } ``` ## Responses ### 200 — The request was processed. Both a successful and a failed request answer with HTTP 200 — check `status`, and `reason` when it is FAIL. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) OK — the settings were saved. Always `OK`. | | `url` | string \| null | (one of: OK) The webhook url you provided, as you sent it. Example: `https://your-server.example.com/99digital/whatsapp-webhook`. | | `system` | integer \| null | (one of: OK) The system messages setting you provided. Example: `1`. | | `systemPhoneAlert` | string \| null | (one of: OK) The phone numbers you provided, as you sent them. Example: `972502211234,972527788695`. | | `readStatus` | integer \| null | (one of: OK) The read status setting you provided. Example: `1`. | | `retry` | integer \| null | (one of: OK) The retry setting you provided. Example: `1`. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `status` | string | (one of: FAIL) FAIL — nothing was saved; `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `2` — 'from' is missing, or JSON syntax error; `3` — Wrong apiKey, or the "from" number is not registered with us; `4` — 'system' must be 0 or 1; `5` — 'systemPhoneAlert' list is invalid — digits and commas only; `6` — 'readStatus' is invalid — it must be 0 or 1; `7` — 'retry' is invalid — it must be 0 or 1; `9` — The url is invalid — it must start with http:// or https://. | #### Example: OK The settings of "URL + all notifications" are saved. ```json { "status": "OK", "url": "https://your-server.example.com/99digital/whatsapp-webhook", "system": 1, "systemPhoneAlert": null, "readStatus": 1, "retry": 1, "reason": 1 } ``` #### Example: OK — some fields Only `system` and `systemPhoneAlert` were sent; the fields you left out are `null` and keep their saved values. ```json { "status": "OK", "url": null, "system": 1, "systemPhoneAlert": "972502211234,972527788695", "readStatus": null, "retry": null, "reason": 1 } ``` #### Example: Webhook turned off The `url` you sent (a space) is echoed as is. ```json { "status": "OK", "url": " ", "system": null, "systemPhoneAlert": null, "readStatus": null, "retry": null, "reason": 1 } ``` #### Example: Reason 3 Wrong apiKey, or the "from" number is not registered with us. ```json { "status": "FAIL", "reason": 3 } ``` #### Example: Reason 5 'systemPhoneAlert' contains something other than digits and commas. ```json { "status": "FAIL", "reason": 5 } ``` #### Example: Reason 9 The url does not start with http:// or https://. ```json { "status": "FAIL", "reason": 9 } ``` --- # Webhook Source: https://docs.99digital.co.il/whatsapp-api/webhook/webhook Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/webhook/webhook.md Section: WhatsApp API › Webhook › Webhook Webhook allows you to get a callback push to your server whenever there is an incoming message or status. - You need to set the webhook URL with the [Set Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) API. [Get Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/get-webhook) shows your current settings. - Every webhook is sent to your URL as JSON via POST (`Content-Type: application/json`), and `hook` tells you what arrived. **Settings:** | Setting | Value | | --- | --- | | URL | Your URL | | Method | JSON via POST | ## Webhook types Every kind of webhook has its own page, with its explanation, an example, and every parameter explained: | Webhook | `hook` | What arrives | When it is sent | | --- | --- | --- | --- | | [Incoming Messages](https://docs.99digital.co.il/whatsapp-api/webhook/incoming-messages) | `new` | Every incoming message from a client: text, media, location, contacts, button and list replies, reactions, store orders and more. | Always, once a webhook URL is set. | | [Acknowledge](https://docs.99digital.co.il/whatsapp-api/webhook/acknowledge) | `update` | For every message or template you send: failed, sent, delivered or read. | Turned off by default — enable with `readStatus` 1 in Set Webhook. | | [System Messages](https://docs.99digital.co.il/whatsapp-api/webhook/system-messages) | `system` | Updates about your account: daily limit, spam flags, account blocked, templates approved or rejected, failed messages, display name. | Turned off by default — enable with `system` 1 in Set Webhook. | | [Contacts Update](https://docs.99digital.co.il/whatsapp-api/webhook/contacts-update) | `contact` | A contact was added or changed in the WhatsApp Business app ([coexistence](https://docs.99digital.co.il/whatsapp-api/information/coexistence) accounts). | Turned on by default. | | [Outgoing Messages](https://docs.99digital.co.il/whatsapp-api/webhook/outgoing-messages) | `outgoing` | A message the user sent from the WhatsApp Business app on their phone, outside the API (coexistence accounts). | Turned on by default. | ## IP addresses Note! Webhook messages come from the following IP address. In case you are required to whitelist, please whitelist this: **34.165.99.212** If you wish to whitelist the IP of the API endpoints too (`https://api.99digital.co.il/whatsapp/v2/`, the address your own requests go to), you should whitelist this IP: **130.211.28.127**. You need it only if your firewall also limits outgoing traffic. ## Delivery and retries - Your webhook must respond with a 2xx status (200 OK, 201, 204 …). We wait up to 5 seconds to connect to your server and up to 15 seconds for its answer, so answer first and process the webhook afterwards. Any other answer counts as a failed delivery. The body of your answer is ignored. - With `retry` 1 in [Set Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook), a failed delivery is retried immediately, then after 5 minutes, 20 minutes, 1 hour, 4 hours and 24 hours, with the same payload. After that, we stop trying to deliver the webhook message. Without it, we try once. - When your server can't be reached or answers 429, 500, 502, 503 or 504, each attempt is repeated up to 3 more times within a few seconds. The same webhook can therefore arrive more than once, even with `retry` 0: use `hook` and `unique` (and `ack` for acknowledges) to ignore duplicates. - The order of the webhooks is not guaranteed. For example, a delivered acknowledge (`ack` 2) may arrive before the sent one (`ack` 1). - There is no signature header: restrict your endpoint to our IP address and keep its URL secret. ## Remarks - You must download the link files (images, audio, video, documents) to your server. We delete all files within 7 days. - In the text of `text`, `button` and `list` messages, in `senderName` and in contact names, a single quote (`'`) arrives as a backtick (`` ` ``). --- # Incoming Messages Source: https://docs.99digital.co.il/whatsapp-api/webhook/incoming-messages Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/webhook/incoming-messages.md Section: WhatsApp API › Webhook › Webhook **Webhook.** Sent to the webhook URL you configure. With every incoming message, you will receive the following webhook (`hook` "new"). **Settings:** | Setting | Value | | --- | --- | | URL | Your URL — set it with [Set Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) | | Method | JSON via POST | Incoming messages webhooks are always sent once a webhook URL is set. How webhooks are delivered and retried, and the IP address they come from, is explained on [Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/webhook). ```json { "status": "OK", "hook": "new", "unique": "92E004B950CCEA3C386FCFA2AAF8558A", "from": "972501234567", "from_id": "IL.1605856887361213", "username": null, "country": "IL", "phone": "972501234567", "to": "972771234567", "senderName": "Dana Cohen", "type": "text", "body": "Hi, is the store open today?", "caption": "", "template": null, "isForwarded": false, "timestamp": "1789900000", "timestampMS": 483921, "media": false, "quote": false, "quoteUnique": false, "profilePic": "https://storage.99digital.online/profilePic/1789900000-ab12cd34.jpg", "conversationTimeLeft": 1435, "isNewConversation": 1, "referral": { "ref_type": "none" } } ``` :::warning You must download the link files to your server. We delete all files within 7 days. ::: ### Response explained | Parameter | Description / Example | | --- | --- | | `status` | "OK" always. | | `hook` | "new" always, for a new incoming message. | | `unique` | Unique ID for the incoming message. Use it as `replyTo` to quote the message in your reply, or to react to it with [Send Reaction](https://docs.99digital.co.il/whatsapp-api/send-reaction). | | `from` | The contact person that sent you the message, in international format: `972501234567`. If the person is hiding their identity (enabled the [username](https://docs.99digital.co.il/whatsapp-api/information/username) feature), this value will return the `from_id`, for example `IL.1605856887361213`. | | `from_id` | The contact person (sender) user id. It arrives whenever WhatsApp provides it, also when the client did not hide their identity; otherwise null. The format is always 2 letters country code + dot + 16 digits, for example `IL.1605856887361213`. This value is fixed per end user per WhatsApp API account. You can use this value to send messages to the client. | | `username` | The username the client chose for their WhatsApp. This feature is not available yet and will return null until officially released by Meta. | | `country` | The country code (two letters) of the contact person (sender), taken from their user id. Null when there is no user id. | | `phone` | The contact person phone number, in international format, for example `972501234567`. If the phone number is not available (the client hides their identity), this will return null. | | `to` | Your WhatsApp account. | | `senderName` | The name of the person that sent the message. For type `phone`, the name they shared. | | `type` | Message type. Can be one of the following: `text`, `image`, `audio`, `video`, `location`, `ptt`, `document`, `button`, `contacts`, `list`, `reaction`, `order`, `phone`. What arrives in `body` and `caption` for each type is in the tables below. | | `body` | The content of the 'body' depends on the 'type' of the message — see "`body` by message type" below. | | `caption` | The content of the 'caption' depends on the 'type' of the message — see "`caption` by message type" below. | | `template` | The template name, if the client clicked on a quick reply button when getting the template ([Send a Template](https://docs.99digital.co.il/whatsapp-api/templates/send-a-template)). For everything else, this will return null. | | `isForwarded` | Shows if the incoming message is forwarded — true or false. | | `timestamp` | Time stamp of the incoming message (Unix time, in seconds, as a string). | | `timestampMS` | The sub-second part of the timestamp (the digits after the decimal point of the time we processed the message), in case you need it. | | `media` | If this message contains any media file, it will be true; otherwise false. | | `quote` | If this message is a quoted message, it will be true; otherwise false. A reaction is always quoted: it points to the message the client reacted to. | | `quoteUnique` | In case the message is quoted (it means that someone replied to your outgoing message), this will be the original message unique ID — for your own message, the `unique` you received when you sent it. For a reaction, the message the client reacted to. If the message is not quoted, this will be false. | | `profilePic` | jpg file link to the client's profile picture, if the user has a profile picture and their privacy settings allow it; otherwise a link to a default image. Profile picture links are generated once per number. | | `conversationTimeLeft` | Amount of minutes left for the incoming conversation session to end (up to 1435). If passed, any incoming message after that will be considered as a new incoming conversation, and the timer will reset. | | `isNewConversation` | Whether this message started a new incoming message conversation session or not. 0 — this new message does not open a new conversation. 1 — this new message opens a new conversation. | | `referral` | Object of items that describes the original referral that initiated the incoming WhatsApp message — see "`referral`" below. | | `order` | Only for type `order`: the list of products of the order summary that was sent from your WhatsApp store — see "`order`" below. | #### `body` by message type | Type | The data that will come | | --- | --- | | text | Regular incoming message | | image | A link to download the image file (jpg) | | audio | A link to download the audio file (ogg) | | video | A link to download the video file (mp4) | | location | A location text in format `latitude,longitude` | | ptt | A link to download the push to talk audio (voice message, ogg) | | document | A link to download the document file | | button | The text of the button that was selected | | contacts | The phone number that was shared | | list | The selection text from the list | | reaction | The emoji that was sent — empty when the client removed their reaction | | order | The note the client wrote with the order — the items are in `order` | | phone | The phone number that was shared when the client revealed their phone number ([Request Phone](https://docs.99digital.co.il/whatsapp-api/request-phone)) | You must download the link files to your server: we delete all files within 7 days. Documents are kept as pdf, zip, xls, xlsx, doc, docx, csv, apk, rar, ppt, pptx or wav; a jpg, png or mp4 sent as a document arrives as `image` or `video`. If a file could not be kept (for example a document of another file type), `body` is empty and `media` is false. #### `caption` by message type | Type | The data that will come | | --- | --- | | text | Nothing, empty | | image | Caption text with the image | | audio | Nothing, empty | | video | Caption text with the video | | location | The name and address of the place (`name - address`), when the client shared a place; otherwise empty | | ptt | Nothing, empty | | document | Caption text with the document | | button | The ID of the button that was selected. This ID arrives for the [Send Buttons](https://docs.99digital.co.il/whatsapp-api/send-buttons) and [Send Carousel](https://docs.99digital.co.il/whatsapp-api/send-carousel) button IDs, and for a template quick reply button (if you provided a quickReply button id) | | contacts | The name of the contact | | list | The item list ID that was selected ([Send List](https://docs.99digital.co.il/whatsapp-api/send-list)) | | reaction | Nothing, empty | | order | The store (catalog) ID number | | phone | The name of the person that revealed their phone number | The answer to [Request Location](https://docs.99digital.co.il/whatsapp-api/request-location) arrives as type `location`. #### `referral` Object of items that describes the original referral that initiated the incoming WhatsApp message. Available data: | Field | Description | | --- | --- | | `ref_type` | `none` (for a non-referral incoming message), `post` (Facebook / Instagram post) or `ad` (Facebook / Instagram campaign). | If the `ref_type` is `post` or `ad`, more information will be available: | Field | Description | | --- | --- | | `ref_title` | The title of the post / ad. | | `ref_body` | The message of the post / ad. | | `ref_id` | ID of the post / ad. | | `ref_link` | Link to the post / ad. | | `ref_image` | Image of the original post / ad (the link will be deleted in 7 days). Null when there is no image. | ```json "referral": { "ref_type": "ad", "ref_title": "Summer sale", "ref_body": "20% off everything", "ref_id": "120210000000000000", "ref_link": "https://fb.me/xyz123", "ref_image": "https://storage.99digital.online/files/1789900000Qw3Er4Ty5U.jpg" } ``` #### `order` This is the list of products of the order summary that was sent from your WhatsApp store. This parameter is an array of items, and looks like this: ```json "order": [ { "product_retailer_id": "woo_92", "quantity": 2, "item_price": 24, "currency": "ILS" }, { "product_retailer_id": "woo_70", "quantity": 3, "item_price": 10, "currency": "ILS" } ] ``` | Field | Description | | --- | --- | | `product_retailer_id` | The product ID of the item. | | `quantity` | The quantity of that product. | | `item_price` | The price of each product. | | `currency` | The currency of that product. | ### Remarks - Stickers and other message kinds that are not listed in `type` are not forwarded. - In the text of `text`, `button` and `list` messages, in `senderName` and in contact names, a single quote (`'`) arrives as a backtick (`` ` ``). - An example of every message type is under **Webhook payload** below. ## Webhook payload Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `status` | string | Yes | "OK" always. One of: `OK`. | | `hook` | string | Yes | "new" always, for a new incoming message. Always `new`. | | `unique` | string | Yes | Unique ID for the incoming message. Use it as `replyTo` to quote the message in your reply, or to react to it with [Send Reaction](https://docs.99digital.co.il/whatsapp-api/send-reaction). Example: `92E004B950CCEA3C386FCFA2AAF8558A`. | | `from` | string | Yes | The contact person that sent you the message, in international format: `972501234567`. If the person is hiding their identity (enabled the [username](https://docs.99digital.co.il/whatsapp-api/information/username) feature), this value will return the `from_id`, for example `IL.1605856887361213`. Example: `972501234567`. | | `from_id` | string \| null | Yes | The contact person (sender) user id. It arrives whenever WhatsApp provides it, also when the client did not hide their identity; otherwise null. The format is always 2 letters country code + dot + 16 digits, for example `IL.1605856887361213`. This value is fixed per end user per WhatsApp API account. You can use this value to send messages to the client. Example: `IL.1605856887361213`. | | `username` | null | Yes | The username the client chose for their WhatsApp. This feature is not available yet and will return null until officially released by Meta. | | `country` | string \| null | Yes | The country code (two letters) of the contact person (sender), taken from their user id. Null when there is no user id. Example: `IL`. | | `phone` | string \| null | Yes | The contact person phone number, in international format, for example `972501234567`. If the phone number is not available (the client hides their identity), this will return null. Example: `972501234567`. | | `to` | string | Yes | Your WhatsApp account. Example: `972771234567`. | | `senderName` | string | Yes | The name of the person that sent the message. For type `phone`, the name they shared. Example: `Dana Cohen`. | | `type` | string | Yes | Message type. `ptt` is a voice message (push to talk). `button` and `list` are the client's choice in [Send Buttons](https://docs.99digital.co.il/whatsapp-api/send-buttons), [Send Carousel](https://docs.99digital.co.il/whatsapp-api/send-carousel), [Send List](https://docs.99digital.co.il/whatsapp-api/send-list) or a template quick reply button. `order` is a cart from your WhatsApp store. `phone` is the client's phone number, shared through [Request Phone](https://docs.99digital.co.il/whatsapp-api/request-phone). The answer to [Request Location](https://docs.99digital.co.il/whatsapp-api/request-location) arrives as `location`. One of: `text`, `image`, `audio`, `video`, `location`, `ptt`, `document`, `button`, `contacts`, `list`, `reaction`, `order`, `phone`. Example: `text`. | | `body` | string | Yes | The content of the 'body' depends on the 'type' of the message: \| Type \| The data that will come \| \| --- \| --- \| \| text \| Regular incoming message \| \| image \| A link to download the image file (jpg) \| \| audio \| A link to download the audio file (ogg) \| \| video \| A link to download the video file (mp4) \| \| location \| A location text in format `latitude,longitude` \| \| ptt \| A link to download the push to talk audio (ogg) \| \| document \| A link to download the document file \| \| button \| The text of the button that was selected \| \| contacts \| The phone number that was shared \| \| list \| The selection text from the list \| \| reaction \| The emoji that was sent — empty when the client removed their reaction \| \| order \| The note the client wrote with the order — the items are in `order` \| \| phone \| The phone number that was shared when the client revealed their phone number \| You must download the link files to your server: we delete all files within 7 days. Documents are kept as pdf, zip, xls, xlsx, doc, docx, csv, apk, rar, ppt, pptx or wav; a jpg, png or mp4 sent as a document arrives as `image` or `video`. If a file could not be kept (for example a document of another file type), `body` is empty and `media` is false. Example: `Hi, is the store open today?`. | | `caption` | string | Yes | The content of the 'caption' depends on the 'type' of the message: \| Type \| The data that will come \| \| --- \| --- \| \| text \| Nothing, empty \| \| image \| Caption text with the image \| \| audio \| Nothing, empty \| \| video \| Caption text with the video \| \| location \| The name and address of the place (`name - address`), when the client shared a place; otherwise empty \| \| ptt \| Nothing, empty \| \| document \| Caption text with the document \| \| button \| The ID of the button that was selected. This ID arrives for the `sendButtons` and `sendCarousel` button IDs, and for a template quick reply button (if you provided a quickReply button id) \| \| contacts \| The name of the contact \| \| list \| The item list ID that was selected \| \| reaction \| Nothing, empty \| \| order \| The store (catalog) ID number \| \| phone \| The name of the person that revealed their phone number \|. Example: ``. | | `template` | string \| null | Yes | The template name, if the client clicked on a quick reply button of a template you sent ([Send a Template](https://docs.99digital.co.il/whatsapp-api/templates/send-a-template)). For everything else, this will return null. Example: `null`. | | `isForwarded` | boolean | Yes | Shows if the incoming message is forwarded — true or false. Example: `false`. | | `timestamp` | string | Yes | Time stamp of the incoming message (Unix time, in seconds, as a string). Example: `1789900000`. | | `timestampMS` | integer | Yes | The sub-second part of the time we processed the message (the digits after the decimal point), in case you need it. Example: `483921`. | | `media` | boolean | Yes | If this message contains a media file (`body` is a link to it), it will be true; otherwise false. Example: `false`. | | `quote` | boolean | Yes | If this message is a quoted message, it will be true; otherwise false. A reaction is always quoted: it points to the message the client reacted to. Example: `false`. | | `quoteUnique` | string \| boolean | Yes | In case the message is quoted (it means that someone replied to your outgoing message), this will be the original message unique ID — for your own message, the `unique` you received when you sent it. For a reaction, the message the client reacted to. If the message is not quoted, this will be false. Example: `false`. | | `profilePic` | string | Yes | jpg file link to the client's profile picture, if the user has a profile picture and their privacy settings allow it; otherwise a link to a default image. Profile picture links are generated once per number. Example: `https://storage.99digital.online/profilePic/1789900000-ab12cd34.jpg`. | | `conversationTimeLeft` | integer | Yes | Amount of minutes left for the incoming conversation session to end (up to 1435). If passed, any incoming message after that will be considered as a new incoming conversation, and the timer will reset. Example: `1435`. | | `isNewConversation` | integer | Yes | Whether this message started a new incoming message conversation session or not. One of: `0` — This new message does not open a new conversation; `1` — This new message opens a new conversation. Example: `1`. | | `referral` | object | Yes | Object of items that describes the original referral that initiated the incoming WhatsApp message. If the `ref_type` is 'post' or 'ad', more information is available. | | `referral.ref_type` | string | Yes | The referral type. One of: `none` — Not a referral incoming message; `post` — Facebook / Instagram post; `ad` — Facebook / Instagram campaign. | | `referral.ref_title` | string | No | The title of the post / ad. | | `referral.ref_body` | string | No | The message of the post / ad. | | `referral.ref_id` | string | No | ID of the post / ad. | | `referral.ref_link` | string | No | Link to the post / ad. | | `referral.ref_image` | string \| null | No | Image of the original post / ad (the link will be deleted in 7 days). Null when there is no image. | | `order` | array of object | No | Only for type `order`: the list of products of the order summary that was sent from your WhatsApp store. | | `order[].product_retailer_id` | string | No | The product ID of the item. Example: `woo_92`. | | `order[].quantity` | integer | No | The quantity of that product. Example: `2`. | | `order[].item_price` | number | No | The price of each product. Example: `24`. | | `order[].currency` | string | No | The currency of that product. Example: `ILS`. | ### Example: Text A regular incoming text message — here the first one of a new conversation. ```json { "status": "OK", "hook": "new", "unique": "92E004B950CCEA3C386FCFA2AAF8558A", "from": "972501234567", "from_id": null, "username": null, "country": null, "phone": "972501234567", "to": "972771234567", "senderName": "Dana Cohen", "type": "text", "body": "Hi, is the store open today?", "caption": "", "template": null, "isForwarded": false, "timestamp": "1789900000", "timestampMS": 483921, "media": false, "quote": false, "quoteUnique": false, "profilePic": "https://storage.99digital.online/profilePic/1789900000-ab12cd34.jpg", "conversationTimeLeft": 1435, "isNewConversation": 1, "referral": { "ref_type": "none" } } ``` ### Example: Quoted reply The client quoted your message: `quoteUnique` is the `unique` you received when you sent it. ```json { "status": "OK", "hook": "new", "unique": "92E004B950CCEA3C386FCFA2AAF8558A", "from": "972501234567", "from_id": null, "username": null, "country": null, "phone": "972501234567", "to": "972771234567", "senderName": "Dana Cohen", "type": "text", "body": "Yes, tomorrow at 10:00 works for me", "caption": "", "template": null, "isForwarded": false, "timestamp": "1789900000", "timestampMS": 483921, "media": false, "quote": true, "quoteUnique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "profilePic": "https://storage.99digital.online/profilePic/1789900000-ab12cd34.jpg", "conversationTimeLeft": 1380, "isNewConversation": 0, "referral": { "ref_type": "none" } } ``` ### Example: Image `body` is a link to the image file (jpg), `caption` the text with it. Download it — we delete files within 7 days. ```json { "status": "OK", "hook": "new", "unique": "92E004B950CCEA3C386FCFA2AAF8558A", "from": "972501234567", "from_id": null, "username": null, "country": null, "phone": "972501234567", "to": "972771234567", "senderName": "Dana Cohen", "type": "image", "body": "https://storage.99digital.online/files/1789900000Ab3dE9fGh1.jpg", "caption": "My receipt", "template": null, "isForwarded": false, "timestamp": "1789900000", "timestampMS": 483921, "media": true, "quote": false, "quoteUnique": false, "profilePic": "https://storage.99digital.online/profilePic/1789900000-ab12cd34.jpg", "conversationTimeLeft": 1380, "isNewConversation": 0, "referral": { "ref_type": "none" } } ``` ### Example: Video `body` is a link to the video file (mp4). ```json { "status": "OK", "hook": "new", "unique": "92E004B950CCEA3C386FCFA2AAF8558A", "from": "972501234567", "from_id": null, "username": null, "country": null, "phone": "972501234567", "to": "972771234567", "senderName": "Dana Cohen", "type": "video", "body": "https://storage.99digital.online/files/1789900000Kp4LmN7qRs.mp4", "caption": "This is the noise it makes", "template": null, "isForwarded": false, "timestamp": "1789900000", "timestampMS": 483921, "media": true, "quote": false, "quoteUnique": false, "profilePic": "https://storage.99digital.online/profilePic/1789900000-ab12cd34.jpg", "conversationTimeLeft": 1380, "isNewConversation": 0, "referral": { "ref_type": "none" } } ``` ### Example: Audio `body` is a link to the audio file (ogg); `caption` is empty. ```json { "status": "OK", "hook": "new", "unique": "92E004B950CCEA3C386FCFA2AAF8558A", "from": "972501234567", "from_id": null, "username": null, "country": null, "phone": "972501234567", "to": "972771234567", "senderName": "Dana Cohen", "type": "audio", "body": "https://storage.99digital.online/files/1789900000Wq2Er5TyUi.ogg", "caption": "", "template": null, "isForwarded": false, "timestamp": "1789900000", "timestampMS": 483921, "media": true, "quote": false, "quoteUnique": false, "profilePic": "https://storage.99digital.online/profilePic/1789900000-ab12cd34.jpg", "conversationTimeLeft": 1380, "isNewConversation": 0, "referral": { "ref_type": "none" } } ``` ### Example: Voice message (ptt) A voice message (push to talk): `body` is a link to the audio (ogg); `caption` is empty. ```json { "status": "OK", "hook": "new", "unique": "92E004B950CCEA3C386FCFA2AAF8558A", "from": "972501234567", "from_id": null, "username": null, "country": null, "phone": "972501234567", "to": "972771234567", "senderName": "Dana Cohen", "type": "ptt", "body": "https://storage.99digital.online/files/1789900000Hj8Kl3ZxCv.ogg", "caption": "", "template": null, "isForwarded": false, "timestamp": "1789900000", "timestampMS": 483921, "media": true, "quote": false, "quoteUnique": false, "profilePic": "https://storage.99digital.online/profilePic/1789900000-ab12cd34.jpg", "conversationTimeLeft": 1380, "isNewConversation": 0, "referral": { "ref_type": "none" } } ``` ### Example: Document `body` is a link to the document file, `caption` the text with it. ```json { "status": "OK", "hook": "new", "unique": "92E004B950CCEA3C386FCFA2AAF8558A", "from": "972501234567", "from_id": null, "username": null, "country": null, "phone": "972501234567", "to": "972771234567", "senderName": "Dana Cohen", "type": "document", "body": "https://storage.99digital.online/files/1789900000Zx9Yw8Vu7T.pdf", "caption": "Signed contract", "template": null, "isForwarded": false, "timestamp": "1789900000", "timestampMS": 483921, "media": true, "quote": false, "quoteUnique": false, "profilePic": "https://storage.99digital.online/profilePic/1789900000-ab12cd34.jpg", "conversationTimeLeft": 1380, "isNewConversation": 0, "referral": { "ref_type": "none" } } ``` ### Example: Location `body` is `latitude,longitude`; `caption` is the name and address of the place the client shared. ```json { "status": "OK", "hook": "new", "unique": "92E004B950CCEA3C386FCFA2AAF8558A", "from": "972501234567", "from_id": null, "username": null, "country": null, "phone": "972501234567", "to": "972771234567", "senderName": "Dana Cohen", "type": "location", "body": "32.0853,34.7818", "caption": "Azrieli Center - Menachem Begin 132, Tel Aviv", "template": null, "isForwarded": false, "timestamp": "1789900000", "timestampMS": 483921, "media": false, "quote": false, "quoteUnique": false, "profilePic": "https://storage.99digital.online/profilePic/1789900000-ab12cd34.jpg", "conversationTimeLeft": 1380, "isNewConversation": 0, "referral": { "ref_type": "none" } } ``` ### Example: Location (Request Location) The client shared their current location after Request Location: `caption` is empty. ```json { "status": "OK", "hook": "new", "unique": "92E004B950CCEA3C386FCFA2AAF8558A", "from": "972501234567", "from_id": null, "username": null, "country": null, "phone": "972501234567", "to": "972771234567", "senderName": "Dana Cohen", "type": "location", "body": "32.0853,34.7818", "caption": "", "template": null, "isForwarded": false, "timestamp": "1789900000", "timestampMS": 483921, "media": false, "quote": false, "quoteUnique": false, "profilePic": "https://storage.99digital.online/profilePic/1789900000-ab12cd34.jpg", "conversationTimeLeft": 1380, "isNewConversation": 0, "referral": { "ref_type": "none" } } ``` ### Example: Contact A shared contact: `body` is the phone number, `caption` the name. ```json { "status": "OK", "hook": "new", "unique": "92E004B950CCEA3C386FCFA2AAF8558A", "from": "972501234567", "from_id": null, "username": null, "country": null, "phone": "972501234567", "to": "972771234567", "senderName": "Dana Cohen", "type": "contacts", "body": "972521112233", "caption": "Yossi Levi", "template": null, "isForwarded": false, "timestamp": "1789900000", "timestampMS": 483921, "media": false, "quote": false, "quoteUnique": false, "profilePic": "https://storage.99digital.online/profilePic/1789900000-ab12cd34.jpg", "conversationTimeLeft": 1380, "isNewConversation": 0, "referral": { "ref_type": "none" } } ``` ### Example: Button reply A tap on a button of Send Buttons or Send Carousel: `body` is the button text, `caption` its ID. ```json { "status": "OK", "hook": "new", "unique": "92E004B950CCEA3C386FCFA2AAF8558A", "from": "972501234567", "from_id": null, "username": null, "country": null, "phone": "972501234567", "to": "972771234567", "senderName": "Dana Cohen", "type": "button", "body": "Track my order", "caption": "track_order", "template": null, "isForwarded": false, "timestamp": "1789900000", "timestampMS": 483921, "media": false, "quote": true, "quoteUnique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "profilePic": "https://storage.99digital.online/profilePic/1789900000-ab12cd34.jpg", "conversationTimeLeft": 1380, "isNewConversation": 0, "referral": { "ref_type": "none" } } ``` ### Example: Template quick reply A tap on a quick reply button of a template: `caption` is the quickReply button id, `template` the template name. ```json { "status": "OK", "hook": "new", "unique": "92E004B950CCEA3C386FCFA2AAF8558A", "from": "972501234567", "from_id": null, "username": null, "country": null, "phone": "972501234567", "to": "972771234567", "senderName": "Dana Cohen", "type": "button", "body": "Confirm", "caption": "confirm", "template": "appointment_reminder", "isForwarded": false, "timestamp": "1789900000", "timestampMS": 483921, "media": false, "quote": true, "quoteUnique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "profilePic": "https://storage.99digital.online/profilePic/1789900000-ab12cd34.jpg", "conversationTimeLeft": 1380, "isNewConversation": 0, "referral": { "ref_type": "none" } } ``` ### Example: List reply A choice from Send List: `body` is the selection text, `caption` the item ID. ```json { "status": "OK", "hook": "new", "unique": "92E004B950CCEA3C386FCFA2AAF8558A", "from": "972501234567", "from_id": null, "username": null, "country": null, "phone": "972501234567", "to": "972771234567", "senderName": "Dana Cohen", "type": "list", "body": "Support", "caption": "support", "template": null, "isForwarded": false, "timestamp": "1789900000", "timestampMS": 483921, "media": false, "quote": true, "quoteUnique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "profilePic": "https://storage.99digital.online/profilePic/1789900000-ab12cd34.jpg", "conversationTimeLeft": 1380, "isNewConversation": 0, "referral": { "ref_type": "none" } } ``` ### Example: Reaction `body` is the emoji; `quoteUnique` is the message the client reacted to. ```json { "status": "OK", "hook": "new", "unique": "92E004B950CCEA3C386FCFA2AAF8558A", "from": "972501234567", "from_id": null, "username": null, "country": null, "phone": "972501234567", "to": "972771234567", "senderName": "Dana Cohen", "type": "reaction", "body": "👍", "caption": "", "template": null, "isForwarded": false, "timestamp": "1789900000", "timestampMS": 483921, "media": false, "quote": true, "quoteUnique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "profilePic": "https://storage.99digital.online/profilePic/1789900000-ab12cd34.jpg", "conversationTimeLeft": 1380, "isNewConversation": 0, "referral": { "ref_type": "none" } } ``` ### Example: Order A cart from your WhatsApp store: `order` lists the items, `body` is the client's note, `caption` the store ID. ```json { "status": "OK", "hook": "new", "unique": "92E004B950CCEA3C386FCFA2AAF8558A", "from": "972501234567", "from_id": null, "username": null, "country": null, "phone": "972501234567", "to": "972771234567", "senderName": "Dana Cohen", "type": "order", "body": "Please deliver after 18:00", "caption": "1234567890123456", "template": null, "isForwarded": false, "timestamp": "1789900000", "timestampMS": 483921, "media": false, "quote": false, "quoteUnique": false, "profilePic": "https://storage.99digital.online/profilePic/1789900000-ab12cd34.jpg", "conversationTimeLeft": 1380, "isNewConversation": 0, "referral": { "ref_type": "none" }, "order": [ { "product_retailer_id": "woo_92", "quantity": 2, "item_price": 24, "currency": "ILS" }, { "product_retailer_id": "woo_70", "quantity": 3, "item_price": 10, "currency": "ILS" } ] } ``` ### Example: Phone (Request Phone) A client who hides their number shared it after Request Phone: `body` is the phone number, `caption` and `senderName` the name they shared. ```json { "status": "OK", "hook": "new", "unique": "92E004B950CCEA3C386FCFA2AAF8558A", "from": "IL.1605856887361213", "from_id": "IL.1605856887361213", "username": null, "country": "IL", "phone": null, "to": "972771234567", "senderName": "Dana Cohen", "type": "phone", "body": "972501234567", "caption": "Dana Cohen", "template": null, "isForwarded": false, "timestamp": "1789900000", "timestampMS": 483921, "media": false, "quote": false, "quoteUnique": false, "profilePic": "https://storage.99digital.online/profilePic/noprofile.jpg", "conversationTimeLeft": 1380, "isNewConversation": 0, "referral": { "ref_type": "none" } } ``` ### Example: Hidden number A client who hides their number: `from` is their user id and `phone` is null. Reply to the user id. ```json { "status": "OK", "hook": "new", "unique": "92E004B950CCEA3C386FCFA2AAF8558A", "from": "IL.1605856887361213", "from_id": "IL.1605856887361213", "username": null, "country": "IL", "phone": null, "to": "972771234567", "senderName": "Dana", "type": "text", "body": "Hi, I saw your ad", "caption": "", "template": null, "isForwarded": false, "timestamp": "1789900000", "timestampMS": 483921, "media": false, "quote": false, "quoteUnique": false, "profilePic": "https://storage.99digital.online/profilePic/noprofile.jpg", "conversationTimeLeft": 1380, "isNewConversation": 0, "referral": { "ref_type": "none" } } ``` ### Example: Ad referral The conversation started from a Facebook / Instagram ad: `referral` describes it. ```json { "status": "OK", "hook": "new", "unique": "92E004B950CCEA3C386FCFA2AAF8558A", "from": "972501234567", "from_id": null, "username": null, "country": null, "phone": "972501234567", "to": "972771234567", "senderName": "Dana Cohen", "type": "text", "body": "I would like to know more about the offer", "caption": "", "template": null, "isForwarded": false, "timestamp": "1789900000", "timestampMS": 483921, "media": false, "quote": false, "quoteUnique": false, "profilePic": "https://storage.99digital.online/profilePic/1789900000-ab12cd34.jpg", "conversationTimeLeft": 1435, "isNewConversation": 1, "referral": { "ref_type": "ad", "ref_title": "Summer sale", "ref_body": "20% off everything", "ref_id": "120210000000000000", "ref_link": "https://fb.me/xyz123", "ref_image": "https://storage.99digital.online/files/1789900000Qw3Er4Ty5U.jpg" } } ``` ## Responses ### 200 — Received. Answer with any 2xx status (200, 201, 204 …) — we wait up to 5 seconds to connect and up to 15 seconds for your answer. The body of your answer is ignored. ### default — Any other status, or no answer in time, counts as a failed delivery. With `retry` 1 in Set Webhook we try again: immediately, then after 5 minutes, 20 minutes, 1 hour, 4 hours and 24 hours. Without it, the webhook is not sent again. --- # Acknowledge Source: https://docs.99digital.co.il/whatsapp-api/webhook/acknowledge Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/webhook/acknowledge.md Section: WhatsApp API › Webhook › Webhook **Webhook.** Sent to the webhook URL you configure. For every message or template you send, you can get an acknowledge if the recipient received your message or not (`hook` "update"). There are four available statuses: failed, sent, delivered, read. Acknowledges are turned off by default. You can enable them with `readStatus` in the [Set Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) endpoint. **Settings:** | Setting | Value | | --- | --- | | URL | Your URL — set it with [Set Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) | | Method | JSON via POST | **With every acknowledge message, you will receive the following:** ```json { "status": "OK", "hook": "update", "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "to": "972771234567", "from": "972501234567", "from_id": "IL.1605856887361213", "country": "IL", "timestamp": "1789900061", "conversationTimeLeft": 1380, "isBilledTemplate": 0, "newTemplateType": 0, "isNewConversation": 0, "newConversationType": 0, "ack": 3 } ``` ### Response explained | Parameter | Description / Example | | --- | --- | | `status` | "OK" always. | | `hook` | "update" always, for an acknowledge update message. | | `unique` | The same unique ID as the original message — the `unique` you received when you sent it. This parameter allows you to know which message was seen. | | `to` | Your WhatsApp account. | | `from` | The contact that you sent the message to. If you messaged a normal international number, this will return the number. If you messaged a user id (2 letters country code + dot + 16 digits), this will return this value. | | `from_id` | The user id of the contact that you sent the message to. Null when it is not known. | | `country` | The country code (two letters) of the contact that you sent the message to, taken from their user id. Null when there is no user id. | | `timestamp` | The timestamp of the ack (Unix time, in seconds, as a string). | | `conversationTimeLeft` | The time (in minutes) that is left for the conversation between you and the end user to finish, in case an incoming conversation is open between you and the client; otherwise 0. A conversation is a 24 hours session. | | `isBilledTemplate` | This value shows if a new billed template was sent to the client — see below. | | `newTemplateType` | In case a new billed template is created under `isBilledTemplate`, here you can know the type of the template — see below. | | `isNewConversation` | This value is no longer in use. It is always 0. | | `newConversationType` | This value is no longer in use. It is always 0. | | `ack` | Acknowledge type — see below. | #### `isBilledTemplate` This value shows if a new billed template was sent to the client. You will get this only once per new billed template: 1 arrives on its first delivered (`ack` 2) or read (`ack` 3) update. - If this value is 1, it means a new template is billed. - If this value is 0, it means there is no new billing event. A billed template is: - any marketing template you send. - any utility template you send if no incoming 24 hours session is open with the client. - any authentication template you send. #### `newTemplateType` | Value | Explanation | | --- | --- | | 0 | No billing template | | 1 | Utility template. Authentication templates currently arrive as 1 too. | | 2 | Marketing template | | 3 | Authentication template (not sent at the moment — see 1) | #### `ack` | Value | Explanation | | --- | --- | | 0 | Message failed to deliver. For more information, check the [System Messages](https://docs.99digital.co.il/whatsapp-api/webhook/system-messages) of type "messages" with the same `unique` (needs `system` 1 in Set Webhook). | | 1 | Acknowledge that the message was **sent** (one gray check mark). | | 2 | Acknowledge that the recipient received the message (two gray check marks). Message marked as **delivered**. | | 3 | Acknowledge that the recipient read the message (two blue check marks). Message marked as **read**. This ack is only available if the recipient allowed it within their WhatsApp privacy settings inside the mobile app. | :::info[Important note] The word "conversation" can be a little confusing regarding how it is counted and billed. Please see this page for more information: [Template, conversation and Message](https://docs.99digital.co.il/whatsapp-api/information/template-conversation-and-message). ::: ### Remarks - The order of the acknowledges is not guaranteed: a delivered acknowledge (`ack` 2) may arrive before the sent one (`ack` 1). - The acknowledges of messages sent from the WhatsApp Business app of a coexistence account ([Outgoing Messages](https://docs.99digital.co.il/whatsapp-api/webhook/outgoing-messages)) arrive here too, with the same `unique`. - An example of every acknowledge is under **Webhook payload** below. ## Webhook payload Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `status` | string | Yes | "OK" always. One of: `OK`. | | `hook` | string | Yes | "update" always, for an acknowledge update message. Always `update`. | | `unique` | string | Yes | The same unique ID as the original message — the `unique` you received when you sent it. This parameter allows you to know which message was seen. Example: `19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ`. | | `to` | string | Yes | Your WhatsApp account. Example: `972771234567`. | | `from` | string | Yes | The contact that you sent the message to. If you messaged a normal international number, this will return the number. If you messaged a user id (2 letters country code + dot + 16 digits), this will return this value. Example: `972501234567`. | | `from_id` | string \| null | Yes | The user id of the contact that you sent the message to. Null when it is not known. Example: `null`. | | `country` | string \| null | Yes | The country code (two letters) of the contact that you sent the message to, taken from their user id. Null when there is no user id. Example: `null`. | | `timestamp` | string | Yes | The timestamp of the ack (Unix time, in seconds, as a string). Example: `1789900061`. | | `conversationTimeLeft` | integer | Yes | The time (in minutes) that is left for the conversation between you and the end user to finish, in case an incoming conversation is open between you and the client; otherwise 0. A conversation is a 24 hours session. Example: `1380`. | | `isBilledTemplate` | integer | Yes | This value shows if a new billed template was sent to the client. You will get 1 only once per new billed template: on its first delivered (`ack` 2) or read (`ack` 3) update. A billed template is: - any marketing template you send. - any utility template you send if no incoming 24 hours session is open with the client. - any authentication template you send. One of: `0` — No new billing event; `1` — A new template is billed — see `newTemplateType`. Example: `0`. | | `newTemplateType` | integer | Yes | In case a new billed template is created under `isBilledTemplate`, here you can know the type of the template. One of: `0` — No billing template; `1` — Utility template. Authentication templates currently arrive as 1 too; `2` — Marketing template; `3` — Authentication template (not sent at the moment — see 1). Example: `0`. | | `isNewConversation` | integer | Yes | **Deprecated.** This value is no longer in use. It is always 0. Example: `0`. | | `newConversationType` | integer | Yes | **Deprecated.** This value is no longer in use. It is always 0. Example: `0`. | | `ack` | integer | Yes | Acknowledge type. One of: `0` — Message failed to deliver. For more information, check the system message of type "messages" with the same `unique` (needs `system` 1); `1` — Acknowledge that the message was **sent** (one gray check mark); `2` — Acknowledge that the recipient received the message (two gray check marks). Message marked as **delivered**; `3` — Acknowledge that the recipient read the message (two blue check marks). Message marked as **read**. This ack is only available if the recipient allowed it within their WhatsApp privacy settings inside the mobile app. Example: `3`. | ### Example: Ack 1 — sent The message was sent (one gray check mark). ```json { "status": "OK", "hook": "update", "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "to": "972771234567", "from": "972501234567", "from_id": null, "country": null, "timestamp": "1789900061", "conversationTimeLeft": 1380, "isBilledTemplate": 0, "newTemplateType": 0, "isNewConversation": 0, "newConversationType": 0, "ack": 1 } ``` ### Example: Ack 2 — delivered The recipient received the message (two gray check marks). ```json { "status": "OK", "hook": "update", "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "to": "972771234567", "from": "972501234567", "from_id": null, "country": null, "timestamp": "1789900061", "conversationTimeLeft": 1380, "isBilledTemplate": 0, "newTemplateType": 0, "isNewConversation": 0, "newConversationType": 0, "ack": 2 } ``` ### Example: Ack 3 — read The recipient read the message (two blue check marks). ```json { "status": "OK", "hook": "update", "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "to": "972771234567", "from": "972501234567", "from_id": null, "country": null, "timestamp": "1789900061", "conversationTimeLeft": 1380, "isBilledTemplate": 0, "newTemplateType": 0, "isNewConversation": 0, "newConversationType": 0, "ack": 3 } ``` ### Example: Ack 0 — failed The message failed to deliver. The reason arrives as a system message of type "messages". ```json { "status": "OK", "hook": "update", "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "to": "972771234567", "from": "972501234567", "from_id": null, "country": null, "timestamp": "1789900061", "conversationTimeLeft": 1380, "isBilledTemplate": 0, "newTemplateType": 0, "isNewConversation": 0, "newConversationType": 0, "ack": 0 } ``` ### Example: Billed template A marketing template opened a new billed conversation: sent once, with its first delivered or read update. ```json { "status": "OK", "hook": "update", "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "to": "972771234567", "from": "972501234567", "from_id": null, "country": null, "timestamp": "1789900061", "conversationTimeLeft": 0, "isBilledTemplate": 1, "newTemplateType": 2, "isNewConversation": 0, "newConversationType": 0, "ack": 2 } ``` ## Responses ### 200 — Received. Answer with any 2xx status (200, 201, 204 …) — we wait up to 5 seconds to connect and up to 15 seconds for your answer. The body of your answer is ignored. ### default — Any other status, or no answer in time, counts as a failed delivery. With `retry` 1 in Set Webhook we try again: immediately, then after 5 minutes, 20 minutes, 1 hour, 4 hours and 24 hours. Without it, the webhook is not sent again. --- # System Messages Source: https://docs.99digital.co.il/whatsapp-api/webhook/system-messages Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/webhook/system-messages.md Section: WhatsApp API › Webhook › Webhook **Webhook.** Sent to the webhook URL you configure. System messages allow you to receive a webhook when there is a new update about your account (`hook` "system"). The types of system messages you can get are: - Daily limit of outgoing conversations (250, 2000, 10000 etc.). - Cases where your WhatsApp number is flagged due to spam reports. - Message template approved or rejected. - Message template ongoing spam reports. - Failed messages (messages that you tried to send but they failed). - Account blocked (due to spam or any other reason). - Display name approved or rejected. System messages are turned off by default. You can enable them with `system` in the [Set Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) endpoint. **Settings:** | Setting | Value | | --- | --- | | URL | Your URL — set it with [Set Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) | | Method | JSON via POST | **With every system message, you will get some of the following:** ```json { "status": "OK", "hook": "system", "type": "template", "to": "972771234567", "timestamp": 1789900000, "update": "", "issues": "", "template": "order_confirmation", "templateUpdate": 1, "templateCategory": 1, "unique": "", "messageUpdate": "", "messageTo": "" } ``` The fields that are not relevant to the message's `type` are empty (`""`). ### Response explained | Parameter | Description / Example | | --- | --- | | `status` | "OK" always. | | `hook` | "system" always, for a system update message. | | `type` | System message type. Values: for daily limit updates: "update"; for account issues: "issues"; for templates update: "template"; for messages update: "messages"; for names update: "name". Another change of the daily limit, such as a lower limit, arrives as "unknown". | | `to` | Your WhatsApp account. | | `timestamp` | The timestamp of the information (Unix time, in seconds). A number; for type "messages", a string with the time of the failed message's status. | | `update` | Relevant for "update" type only. Will show the new daily conversation limit for the WhatsApp account: 50, 250, 1000, 2000, 10000, 100000, or 1000000 for unlimited. An "issues" message about spam flags (codes 1 and 2) shows the current limit here too. | | `issues` | Relevant for "issues" type only. Here you can get account issues. If there is an account issue, one of the codes below will be returned. | | `template` | Relevant for "template" type only. Will show the template name. | | `templateUpdate` | Relevant for "template" type only. Will show the status code for the relevant template — see the codes below. | | `templateCategory` | Relevant for "template" type only, and will only come when `templateUpdate` is 1 or 8. Will show the category that this template is set to: 1 — utility, 2 — marketing, 3 — authentication. | | `unique` | Relevant for "messages" type only. This is the unique ID of the message that was sent. | | `messageUpdate` | Relevant for "messages" type only. Will show the status code for messages that failed to deliver — see the codes below. | | `messageTo` | Relevant for "messages" type only. The WhatsApp number (or user id) you tried to send the message to. | | `name` | Relevant for "name" type only (the field is sent only with it). This is the requested display name. | | `rejectReason` | Relevant for "name" type only (the field is sent only with it). This is the reason to reject the name, if any — see the codes below. | #### `issues` codes | Code | Explanation | | --- | --- | | 1 | Your account is flagged due to spam. Be careful! | | 2 | Your account is no longer flagged. | | 3 | Your account has been blocked from WhatsApp. | | 4 | Your account is back to be active again after being blocked / reviewed. | | 5 | The phone number has been removed from the business manager, please contact support. | | 6 | The account has been deleted, please contact support. | | 7 | Access to the account has been removed by the client, please contact support. | | 8 | Your account was sent to review by Meta. | #### `templateUpdate` codes | Code | Explanation | | --- | --- | | 1 | Your template has been approved and is available to use. | | 2 | Template rejected. Reason: wrong format template / too many variables / template is similar to another template that already exists in your account. | | 3 | Template rejected. Reason: the template contains content that is violating WhatsApp policy. | | 4 | Template rejected. Reason: the template contains content that is marked as spam. | | 5 | Template rejected. Reason unknown. | | 6 | Template received too many spam reports. You can't use this template for the next 6 hours. | | 7 | Template is banned to use due to too many spam reports. | | 8 | Template category has been changed. | | 9 | The template has been deleted. | | 10 | The template is flagged, it received a high amount of negative reports from users. Be careful! | | 11 | The template is no longer flagged. | #### `messageUpdate` codes | Code | Explanation | | --- | --- | | 1 | Server error, try to send the message again. | | 2 | Billing issue, please contact support to fix the billing. | | 3 | Attached file is incorrect, please try to re-send the message and fix the file. | | 4 | Account is blocked for sending messages. | | 5 | You have reached your daily limit for sending messages. | | 6 | The 'to' and 'from' parameters are the same. You can't send a message to yourself. | | 7 | The WhatsApp number you tried to send the message to is using an old WhatsApp app, or did not accept the WhatsApp 'terms of use' within their app. | | 8 | It's been more than 24 hours since the client's last reply, please use a template instead. | | 9 | Error unknown, please contact support. | | 10 | Variables error, please check the variables used in the template (either a body variable or the header link). | | 11 | Context issue in the body or header of the message. | | 12 | The template you tried to send was not approved to use by Meta. | | 13 | The client can't receive this template message now because their number is marked as "trial". Contact support for more information. | | 14 | You can't send more than two marketing templates to the same number within 24 hours. Please wait for the user to reply first. | | 15 | The template you tried to send does not exist. | | 16 | You are trying to send too many messages in a short period of time. Slow down. | | 17 | Permission issue, please contact support. | #### `rejectReason` codes | Code | Meaning | | --- | --- | | 0 | No rejection. The name was approved to use. | | 1 | The name does not relate to the business name. | | 2 | The name violates WhatsApp name policy. | | 3 | The name is related to alcohol, which is forbidden. | | 4 | The name is related to selling digital goods, which is forbidden. | | 10 | Rejection reason unknown. | ### Remarks - A failed message also arrives as an [Acknowledge](https://docs.99digital.co.il/whatsapp-api/webhook/acknowledge) with `ack` 0 and the same `unique`; the reason is in the system message above. - With `systemPhoneAlert` in [Set Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook), you can also get system alerts to your phone. - An example of every system message type is under **Webhook payload** below. ## Webhook payload Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `status` | string | Yes | "OK" always. One of: `OK`. | | `hook` | string | Yes | "system" always, for a system update message. Always `system`. | | `type` | string | Yes | System message type. One of: `update` — Daily limit updates — see `update`; `issues` — Account issues — see `issues`; `template` — Templates update — see `template`, `templateUpdate` and `templateCategory`; `messages` — Messages update — a message you sent failed; see `unique`, `messageUpdate` and `messageTo`; `name` — Display name update — see `name` and `rejectReason`; `unknown` — Another change of the daily limit, such as a lower limit — see `update`. Example: `template`. | | `to` | string | Yes | Your WhatsApp account. Example: `972771234567`. | | `timestamp` | integer \| string | Yes | The timestamp of the information (Unix time, in seconds). A number; for type "messages", a string with the time of the failed message's status. Example: `1789900000`. | | `update` | integer \| string | Yes | Relevant for "update" type only. Will show the new daily conversation limit for the WhatsApp account: 50, 250, 1000, 2000, 10000, 100000, or 1000000 for unlimited. An "issues" message about spam flags (codes 1 and 2) shows the current limit here too. Example: ``. | | `issues` | integer \| string | Yes | Relevant for "issues" type only. Here you can get account issues. If there is an account issue, one of the following codes will be returned. One of: `1` — Your account is flagged due to spam. Be careful!; `2` — Your account is no longer flagged; `3` — Your account has been blocked from WhatsApp; `4` — Your account is back to be active again after being blocked / reviewed; `5` — The phone number has been removed from the business manager, please contact support; `6` — The account has been deleted, please contact support; `7` — Access to the account has been removed by the client, please contact support; `8` — Your account was sent to review by Meta; `` — Empty — another type, or an account update that needs no action. Example: ``. | | `template` | string | Yes | Relevant for "template" type only. Will show the template name. Example: `order_confirmation`. | | `templateUpdate` | integer \| string | Yes | Relevant for "template" type only. Will show the status code for the relevant template. One of: `1` — Your template has been approved and is available to use; `2` — Template rejected. Reason: wrong format template / too many variables / template is similar to another template that already exists in your account; `3` — Template rejected. Reason: the template contains content that is violating WhatsApp policy; `4` — Template rejected. Reason: the template contains content that is marked as spam; `5` — Template rejected. Reason unknown; `6` — Template received too many spam reports. You can't use this template for the next 6 hours; `7` — Template is banned to use due to too many spam reports; `8` — Template category has been changed; `9` — The template has been deleted; `10` — The template is flagged, it received a high amount of negative reports from users. Be careful!; `11` — The template is no longer flagged; `` — Empty — another type. Example: `1`. | | `templateCategory` | integer | No | Relevant for "template" type only, and will only come when `templateUpdate` is 1 or 8. Will show the category that this template is set to. One of: `1` — Utility; `2` — Marketing; `3` — Authentication. Example: `1`. | | `unique` | string | Yes | Relevant for "messages" type only. This is the unique ID of the message that was sent. Example: ``. | | `messageUpdate` | integer \| string | Yes | Relevant for "messages" type only. Will show the status code for messages that failed to deliver. One of: `1` — Server error, try to send the message again; `2` — Billing issue, please contact support to fix the billing; `3` — Attached file is incorrect, please try to re-send the message and fix the file; `4` — Account is blocked for sending messages; `5` — You have reached your daily limit for sending messages; `6` — The 'to' and 'from' parameters are the same. You can't send a message to yourself; `7` — The WhatsApp number you tried to send the message to is using an old WhatsApp app, or did not accept the WhatsApp 'terms of use' within their app; `8` — It's been more than 24 hours since the client's last reply, please use a template instead; `9` — Error unknown, please contact support; `10` — Variables error, please check the variables used in the template (either a body variable or the header link); `11` — Context issue in the body or header of the message; `12` — The template you tried to send was not approved to use by Meta; `13` — The client can't receive this template message now because their number is marked as "trial". Contact support for more information; `14` — You can't send more than two marketing templates to the same number within 24 hours. Please wait for the user to reply first; `15` — The template you tried to send does not exist; `16` — You are trying to send too many messages in a short period of time. Slow down; `17` — Permission issue, please contact support; `` — Empty — another type. Example: ``. | | `messageTo` | string | Yes | Relevant for "messages" type only. The WhatsApp number (or user id) you tried to send the message to. Example: ``. | | `name` | string | No | Relevant for "name" type only (the field is sent only with it). This is the requested display name. Example: `99 Digital`. | | `rejectReason` | integer | No | Relevant for "name" type only (the field is sent only with it). This is the reason to reject the name, if any. One of: `0` — No rejection. The name was approved to use; `1` — The name does not relate to the business name; `2` — The name violates WhatsApp name policy; `3` — The name is related to alcohol, which is forbidden; `4` — The name is related to selling digital goods, which is forbidden; `10` — Rejection reason unknown. Example: `0`. | ### Example: Message failed A message you sent failed: `messageUpdate` is the reason. Here, more than 24 hours since the client's last reply. ```json { "status": "OK", "hook": "system", "type": "messages", "to": "972771234567", "timestamp": "1789900061", "update": "", "issues": "", "template": "", "templateUpdate": "", "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "messageUpdate": 8, "messageTo": "972501234567" } ``` ### Example: Template approved Your template was approved; `templateCategory` is its category. ```json { "status": "OK", "hook": "system", "type": "template", "to": "972771234567", "timestamp": 1789900000, "update": "", "issues": "", "template": "order_confirmation", "templateUpdate": 1, "unique": "", "messageUpdate": "", "messageTo": "", "templateCategory": 1 } ``` ### Example: Template rejected Your template was rejected (here: wrong format / too many variables / similar to another template). ```json { "status": "OK", "hook": "system", "type": "template", "to": "972771234567", "timestamp": 1789900000, "update": "", "issues": "", "template": "summer_sale", "templateUpdate": 2, "unique": "", "messageUpdate": "", "messageTo": "" } ``` ### Example: Template category Meta changed the category of your template; `templateCategory` is the new one. ```json { "status": "OK", "hook": "system", "type": "template", "to": "972771234567", "timestamp": 1789900000, "update": "", "issues": "", "template": "order_confirmation", "templateUpdate": 8, "unique": "", "messageUpdate": "", "messageTo": "", "templateCategory": 2 } ``` ### Example: Daily limit Your daily limit of new conversations changed; `update` is the new limit. ```json { "status": "OK", "hook": "system", "type": "update", "to": "972771234567", "timestamp": 1789900000, "update": 10000, "issues": "", "template": "", "templateUpdate": "", "unique": "", "messageUpdate": "", "messageTo": "" } ``` ### Example: Account flagged Your number is flagged due to spam reports; `update` shows the current daily limit. ```json { "status": "OK", "hook": "system", "type": "issues", "to": "972771234567", "timestamp": 1789900000, "update": 2000, "issues": 1, "template": "", "templateUpdate": "", "unique": "", "messageUpdate": "", "messageTo": "" } ``` ### Example: Account blocked Your account has been blocked from WhatsApp. ```json { "status": "OK", "hook": "system", "type": "issues", "to": "972771234567", "timestamp": 1789900000, "update": "", "issues": 3, "template": "", "templateUpdate": "", "unique": "", "messageUpdate": "", "messageTo": "" } ``` ### Example: Display name Your display name was approved (`rejectReason` 0). ```json { "status": "OK", "hook": "system", "type": "name", "to": "972771234567", "timestamp": 1789900000, "update": "", "issues": "", "template": "", "templateUpdate": "", "unique": "", "messageUpdate": "", "messageTo": "", "name": "99 Digital", "rejectReason": 0 } ``` ## Responses ### 200 — Received. Answer with any 2xx status (200, 201, 204 …) — we wait up to 5 seconds to connect and up to 15 seconds for your answer. The body of your answer is ignored. ### default — Any other status, or no answer in time, counts as a failed delivery. With `retry` 1 in Set Webhook we try again: immediately, then after 5 minutes, 20 minutes, 1 hour, 4 hours and 24 hours. Without it, the webhook is not sent again. --- # Contacts Update Source: https://docs.99digital.co.il/whatsapp-api/webhook/contacts-update Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/webhook/contacts-update.md Section: WhatsApp API › Webhook › Webhook **Webhook.** Sent to the webhook URL you configure. Contacts update allows you to receive a webhook when there is a new update about your WhatsApp contacts (`hook` "contact"). A contact is an end user WhatsApp number that you are chatting with. The types of contacts updates you can get are: - For [coexistence](https://docs.99digital.co.il/whatsapp-api/information/coexistence) accounts, when a contact is added or changed. - For coexistence accounts, when a contact is deleted (not sent at the moment). - When a contact asked to stop receiving marketing messages (future update, not on production now). - When a contact asked to keep receiving marketing messages (future update, not on production now). - When a contact accepted your WhatsApp API to call them using WhatsApp Calls (future update, not on production now). Contacts updates are turned on by default. **Settings:** | Setting | Value | | --- | --- | | URL | Your URL — set it with [Set Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) | | Method | JSON via POST | **With every contacts update, you will get some of the following:** ```json { "status": "OK", "hook": "contact", "type": "coexistence", "to": "972771234567", "contact": "972501234567", "timestamp": "1789900000", "coexistence": "add", "contact_name": "Dana Cohen" } ``` ### Response explained | Parameter | Description / Example | | --- | --- | | `status` | "OK" always. | | `hook` | "contact" always, for contact webhooks. | | `type` | Contact webhook type. Values: for a coexistence contact update: "coexistence"; for marketing requests: "marketing" (future feature); for calls requests: "calls" (future feature). | | `to` | Your WhatsApp account. | | `contact` | The end user WhatsApp number. | | `timestamp` | The timestamp of the information (Unix time, in seconds, as a string). | | `coexistence` | Relevant for "coexistence" type only. This will show "add" if a new contact was saved to the WhatsApp Business app phone contact list, or an existing contact was changed. This will show "remove" if the WhatsApp Business app removed a phone from the contact list (not sent at the moment). | | `marketing` | Relevant for "marketing" type only. This will show "remove" if a contact asked to stop getting marketing messages. This will show "add" if the contact asked to resume getting marketing messages. (This is a future feature.) | | `calls` | Relevant for "calls" type only. This will show "add" if a contact allows your business to call them over WhatsApp. This will show "remove" if the contact no longer allows your business to call them over WhatsApp. (This is a future feature.) | | `contact_name` | Relevant for "coexistence" type with "add" only. This will show the contact name as it was saved in the WhatsApp Business app on the mobile phone. | ## Webhook payload Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `status` | string | Yes | "OK" always. One of: `OK`. | | `hook` | string | Yes | "contact" always, for contact webhooks. Always `contact`. | | `type` | string | Yes | Contact webhook type. One of: `coexistence` — Coexistence contact update; `marketing` — Marketing requests (this is a future feature); `calls` — Calls requests (this is a future feature). Example: `coexistence`. | | `to` | string | Yes | Your WhatsApp account. Example: `972771234567`. | | `contact` | string | Yes | The end user WhatsApp number. Example: `972501234567`. | | `timestamp` | string | Yes | The timestamp of the information (Unix time, in seconds, as a string). Example: `1789900000`. | | `coexistence` | string | No | Relevant for "coexistence" type only. One of: `add` — A new contact was saved to the WhatsApp Business app phone contact list, or an existing contact was changed; `remove` — The WhatsApp Business app removed a phone from the contact list (not sent at the moment). Example: `add`. | | `marketing` | string | No | Relevant for "marketing" type only (this is a future feature). One of: `add` — The contact asked to resume getting marketing messages; `remove` — The contact asked to stop getting marketing messages. | | `calls` | string | No | Relevant for "calls" type only (this is a future feature). One of: `add` — The contact allows your business to call them over WhatsApp; `remove` — The contact no longer allows your business to call them over WhatsApp. | | `contact_name` | string | No | Relevant for "coexistence" type with "add" only. This will show the contact name as it was saved in the WhatsApp Business app on the mobile phone. Example: `Dana Cohen`. | ### Example: Contact saved (coexistence) A contact was saved or changed in the WhatsApp Business app on the phone. ```json { "status": "OK", "hook": "contact", "type": "coexistence", "to": "972771234567", "contact": "972501234567", "timestamp": "1789900000", "coexistence": "add", "contact_name": "Dana Cohen" } ``` ## Responses ### 200 — Received. Answer with any 2xx status (200, 201, 204 …) — we wait up to 5 seconds to connect and up to 15 seconds for your answer. The body of your answer is ignored. ### default — Any other status, or no answer in time, counts as a failed delivery. With `retry` 1 in Set Webhook we try again: immediately, then after 5 minutes, 20 minutes, 1 hour, 4 hours and 24 hours. Without it, the webhook is not sent again. --- # Outgoing Messages Source: https://docs.99digital.co.il/whatsapp-api/webhook/outgoing-messages Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/webhook/outgoing-messages.md Section: WhatsApp API › Webhook › Webhook **Webhook.** Sent to the webhook URL you configure. Outgoing messages webhooks are only relevant to [coexistence](https://docs.99digital.co.il/whatsapp-api/information/coexistence) WhatsApp accounts (`hook` "outgoing"). They show outgoing messages sent by the user themselves from their mobile phone WhatsApp Business app (or WhatsApp Web), outside of the API. This is only relevant to let you know the user sent a message, in case you want to show it as an outgoing message in your platform. - Note: any outgoing message sent from the API will not trigger an outgoing message webhook. - Outgoing messages webhooks are turned on by default. - Note 2: outgoing messages to groups are not supported. - The acknowledges of these messages arrive as [Acknowledge](https://docs.99digital.co.il/whatsapp-api/webhook/acknowledge) webhooks (`hook` "update") with the same `unique`. **Settings:** | Setting | Value | | --- | --- | | URL | Your URL — set it with [Set Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) | | Method | JSON via POST | **With every outgoing message, you will get the following:** ```json { "status": "OK", "hook": "outgoing", "unique": "HBgMOTcyNTAxMjM0NTY3FQIAEhgUOEY0QzE2N0E5RDNCMDA5RkQ1QjIA", "from": "972771234567", "to": "972501234567", "type": "text", "body": "Sure, we are open until 20:00", "caption": "", "isForwarded": false, "timestamp": "1789900120", "timestampMS": 102938, "media": false, "quote": false, "quoteUnique": false } ``` ### Response explained | Parameter | Description / Example | | --- | --- | | `status` | "OK" always. | | `hook` | "outgoing" always, for a new outgoing message. | | `unique` | Unique ID for the outgoing message. Its acknowledges arrive with the same `unique`. | | `from` | Your WhatsApp account. | | `to` | The end user WhatsApp account that received the message. | | `type` | Message type. Can be one of the following: `text`, `image`, `audio`, `video`, `location`, `ptt`, `document`, `button`, `contacts`, `list`, `reaction`. | | `body` | The content of the 'body' depends on the 'type' of the message — see the table below. | | `caption` | The content of the 'caption' depends on the 'type' of the message — see the table below. | | `isForwarded` | Shows if the outgoing message is forwarded — true or false. | | `timestamp` | Time stamp of the outgoing message (Unix time, in seconds, as a string). | | `timestampMS` | The sub-second part of the timestamp (of the time we processed the message, in microseconds), in case you need it. | | `media` | If this message contains any media file, it will be true; otherwise false. | | `quote` | If this message is a quoted message, it will be true; otherwise false. | | `quoteUnique` | In case the message is quoted (it means that the user replied to an incoming message), this will be the original message unique ID. If the message is not quoted, this will be false. | #### `body` by message type | Type | The data that will come | | --- | --- | | text | Outgoing text message | | image | Link | | audio | Link | | video | Link | | location | `lat,lng` | | ptt | Link | | document | Link | | button | Button text | | contacts | Phone number | | list | The selection text | | reaction | The emoji | You must download the link files to your server: we delete all files within 7 days. #### `caption` by message type | Type | The data that will come | | --- | --- | | text | Nothing, empty | | image | Caption text with the image | | audio | Nothing, empty | | video | Caption text with the video | | location | The name and address of the place (`name - address`), if any | | ptt | Nothing, empty | | document | Caption text with the document | | button | Nothing, empty | | contacts | Name of the contact | | list | The item list ID that was selected | | reaction | Nothing, empty | ## Webhook payload Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `status` | string | Yes | "OK" always. One of: `OK`. | | `hook` | string | Yes | "outgoing" always, for a new outgoing message. Always `outgoing`. | | `unique` | string | Yes | Unique ID for the outgoing message. Its acknowledges arrive with the same `unique`. Example: `HBgMOTcyNTAxMjM0NTY3FQIAEhgUOEY0QzE2N0E5RDNCMDA5RkQ1QjIA`. | | `from` | string | Yes | Your WhatsApp account. Example: `972771234567`. | | `to` | string | Yes | The end user WhatsApp account that received the message. Example: `972501234567`. | | `type` | string | Yes | Message type. One of: `text`, `image`, `audio`, `video`, `location`, `ptt`, `document`, `button`, `contacts`, `list`, `reaction`. Example: `text`. | | `body` | string | Yes | The content of the 'body' depends on the 'type' of the message: \| Type \| The data that will come \| \| --- \| --- \| \| text \| Outgoing text message \| \| image \| Link \| \| audio \| Link \| \| video \| Link \| \| location \| `lat,lng` \| \| ptt \| Link \| \| document \| Link \| \| button \| Button text \| \| contacts \| Phone number \| \| list \| The selection text \| \| reaction \| The emoji \| You must download the link files to your server: we delete all files within 7 days. Example: `Sure, we are open until 20:00`. | | `caption` | string | Yes | The content of the 'caption' depends on the 'type' of the message: \| Type \| The data that will come \| \| --- \| --- \| \| text \| Nothing, empty \| \| image \| Caption text with the image \| \| audio \| Nothing, empty \| \| video \| Caption text with the video \| \| location \| The name and address of the place (`name - address`), if any \| \| ptt \| Nothing, empty \| \| document \| Caption text with the document \| \| button \| Nothing, empty \| \| contacts \| Name of the contact \| \| list \| The item list ID that was selected \| \| reaction \| Nothing, empty \|. Example: ``. | | `isForwarded` | boolean | Yes | Shows if the outgoing message is forwarded — true or false. Example: `false`. | | `timestamp` | string | Yes | Time stamp of the outgoing message (Unix time, in seconds, as a string). Example: `1789900120`. | | `timestampMS` | integer | Yes | The sub-second part of the time we processed the message (in microseconds), in case you need it. Example: `102938`. | | `media` | boolean | Yes | If this message contains any media file, it will be true; otherwise false. Example: `false`. | | `quote` | boolean | Yes | If this message is a quoted message, it will be true; otherwise false. Example: `false`. | | `quoteUnique` | string \| boolean | Yes | In case the message is quoted (it means that the user replied to an incoming message), this will be the original message unique ID. If the message is not quoted, this will be false. Example: `false`. | ### Example: Text A message sent from the WhatsApp Business app on the phone, not through the API. ```json { "status": "OK", "hook": "outgoing", "unique": "HBgMOTcyNTAxMjM0NTY3FQIAEhgUOEY0QzE2N0E5RDNCMDA5RkQ1QjIA", "from": "972771234567", "to": "972501234567", "type": "text", "body": "Sure, we are open until 20:00", "caption": "", "isForwarded": false, "timestamp": "1789900120", "timestampMS": 102938, "media": false, "quote": false, "quoteUnique": false } ``` ## Responses ### 200 — Received. Answer with any 2xx status (200, 201, 204 …) — we wait up to 5 seconds to connect and up to 15 seconds for your answer. The body of your answer is ignored. ### default — Any other status, or no answer in time, counts as a failed delivery. With `retry` 1 in Set Webhook we try again: immediately, then after 5 minutes, 20 minutes, 1 hour, 4 hours and 24 hours. Without it, the webhook is not sent again. --- # Get Webhook Source: https://docs.99digital.co.il/whatsapp-api/webhook/get-webhook Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/webhook/get-webhook.md Section: WhatsApp API › Webhook `POST https://api.99digital.co.il/whatsapp/v2/getWebhook` Get Webhook allows you to see the webhook URL you have for incoming messages. The default is empty. It also shows your other webhook settings — the ones you set with [Set Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook): system messages, the phones for system alerts, retries and read status. **Settings:** | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/getWebhook` | | Method | JSON via POST | | Header | Value | | --- | --- | | `apiKey` | Your API key for the service | **Body:** | Parameter | Description / Example | | --- | --- | | `from` | Your WhatsApp account. International number without `+`, for example: `972771234567`. | **Response:** ```json { "status": "OK", "url": "https://your-server.example.com/99digital/whatsapp-webhook", "system": 1, "systemPhoneAlert": "972502211234", "retry": 1, "readStatus": 1, "reason": 1 } ``` **Response explained:** | Parameter | Description | | --- | --- | | `status` | OK or FAIL | | `url` | Your webhook url. Empty when no webhook is set. | | `system` | System messages status: 1 — active, 0 — not active. | | `systemPhoneAlert` | List of phone numbers to receive system notifications via WhatsApp message, comma separated. `null` if you never set one, empty after you cleared it. | | `retry` | 0 if disabled, 1 if enabled. | | `readStatus` | 0 if disabled, 1 if enabled. | | `reason` | The status explanation — see below. | | Reason | Explanation | | --- | --- | | 1 | Not FAIL. The status is OK. | | 2 | `from` is missing, or a JSON syntax error. | | 3 | Wrong apiKey, or your "from" number account does not exist. | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | Your WhatsApp account. International number without `+`. Example: `972771234567`. | ### Example (generated from the schema) ```json { "from": "972771234567" } ``` ## Responses ### 200 — The request was processed. Both a successful and a failed request answer with HTTP 200 — check `status`, and `reason` when it is FAIL. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) OK — the request was successful. Always `OK`. | | `url` | string | (one of: OK) Your webhook url. Empty when no webhook is set. Example: `https://your-server.example.com/99digital/whatsapp-webhook`. | | `system` | integer | (one of: OK) System messages status. One of: `0` — Not active; `1` — Active. Example: `1`. | | `systemPhoneAlert` | string \| null | (one of: OK) List of phone numbers to receive system notifications via WhatsApp message, comma separated. `null` if you never set one, empty after you cleared it. Example: `972502211234,972527788695`. | | `retry` | integer | (one of: OK) The retry mechanism for webhook sending — see "Retry mechanism" on [Set Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook). One of: `0` — Disabled; `1` — Enabled. Example: `1`. | | `readStatus` | integer | (one of: OK) Read status notification (the acknowledge webhooks). One of: `0` — Disabled; `1` — Enabled. Example: `1`. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `status` | string | (one of: FAIL) FAIL — the request failed; `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `2` — 'from' is missing, or JSON syntax error; `3` — Wrong apiKey, or the "from" number is not registered with us. | #### Example: OK A webhook with every notification on. ```json { "status": "OK", "url": "https://your-server.example.com/99digital/whatsapp-webhook", "system": 1, "systemPhoneAlert": "972502211234,972527788695", "retry": 1, "readStatus": 1, "reason": 1 } ``` #### Example: No webhook The defaults — no webhook URL and every setting off. ```json { "status": "OK", "url": "", "system": 0, "systemPhoneAlert": null, "retry": 0, "readStatus": 0, "reason": 1 } ``` #### Example: Reason 3 Wrong apiKey, or the "from" number is not registered with us. ```json { "status": "FAIL", "reason": 3 } ``` --- # Get Templates Source: https://docs.99digital.co.il/whatsapp-api/templates/get-templates Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/templates/get-templates.md Section: WhatsApp API › Templates `POST https://api.99digital.co.il/whatsapp/v2/getTemplates` List all the templates in your WhatsApp account, with their language, category, status and content. Get Templates allows you to see all the templates you have in your account. Use a template's `name` to send it with [Send a Template](https://docs.99digital.co.il/whatsapp-api/templates/send-a-template). ## Settings | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/getTemplates` | | Method | JSON via POST | | Key | Value | | --- | --- | | apiKey | Your API key for the service | ## Body | Parameter | Description / Example | | --- | --- | | from | Your WhatsApp account. International number without `+`. For example: `972771234567` | ## Response The way that the response provides the information back is not the same as the way you submitted the template with [Create a Template](https://docs.99digital.co.il/whatsapp-api/templates/create-a-template): the response shows each template as its parts — header, body, footer and buttons — the way WhatsApp stores them. ```json { "status": "OK", "list": [ { "name": "template_name", "language": "en_US", "category": 1, "status": "approved", "template": [ { "type": "HEADER", "format": "TEXT", "text": "hello {{1}}" }, { "type": "BODY", "text": "thank you for coming" }, { "type": "FOOTER", "text": "have a great day" } ] } ] } ``` ## Response-Explain | Parameter | Description | | --- | --- | | status | `OK` or `FAIL` | | list | An array of information about your templates | | list->name | The name of the template, to use when you send a template message | | list->language | The language you chose, as WhatsApp writes it: `he` (Hebrew), `en_US` (English), `ar`, `ru`, `es`, `zh_CN`, `hi`, `th` or `fr` | | list->category | The template category — see the values below | | list->status | The template status — see the statuses below | | list->template | The parts of the template: `HEADER` (with its `format` — `TEXT`, `IMAGE`, `VIDEO` or `DOCUMENT` — and `text` for a text header), `BODY`, `FOOTER`, `BUTTONS` (with each button's `type`, `text`, and `url` or `phone_number`) and, for a carousel, `CAROUSEL` with its `cards` | | Value | Meaning | | --- | --- | | 1 | Utility template | | 2 | Marketing template | | 3 | Authentication template | | Status | Meaning | | --- | --- | | approved | Approved to use by Meta | | pending | Still under review | | rejected | Rejected by Meta. You must create a new one with a different name. | | paused | The template was approved before, but received spam reports, and therefore it is paused for 10 hours | | disabled | The template was approved before, but received massive spam reports for a period of time. This template is disabled and can't be used anymore. | WhatsApp may report other statuses as well. | reason | Description | | --- | --- | | 2 | `from` is missing, or JSON syntax error | | 3 | Wrong apiKey, or the "from" number is not registered with us | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | Your WhatsApp account. International number without `+`. Example: `972771234567`. | ### Example (generated from the schema) ```json { "from": "972771234567" } ``` ## Responses ### 200 — The request was processed. Both a successful and a failed request answer with HTTP 200 — check `status`, and `reason` when it is FAIL. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) OK — your templates are listed in `list`. Always `OK`. | | `list` | array of object | (one of: OK) Information about each of your templates. | | `list[].name` | string | (one of: OK) The name of the template, to use when you send a template message. Example: `website_welcome`. | | `list[].language` | string | (one of: OK) The language you chose for the template, as WhatsApp writes it: `he` (Hebrew), `en_US` (English), `ar`, `ru`, `es`, `zh_CN`, `hi`, `th` or `fr`. Example: `en_US`. | | `list[].category` | integer | (one of: OK) The template category, as approved by WhatsApp. One of: `1` — Utility template; `2` — Marketing template; `3` — Authentication template. | | `list[].status` | string | (one of: OK) The template's status. WhatsApp may report other statuses as well. One of: `approved` — Approved to use by WhatsApp (Meta); `pending` — Still under review; `rejected` — Rejected by WhatsApp. You must create a new one with a different name; `paused` — The template was approved before, but received spam reports and therefore it is paused for 10 hours; `disabled` — The template was approved before, but received massive spam reports for a period of time. This template is disabled and can't be used anymore. | | `list[].template` | array of object | (one of: OK) The parts of the template: `HEADER` (with its `format` — `TEXT`, `IMAGE`, `VIDEO` or `DOCUMENT` — and `text` for a text header), `BODY`, `FOOTER`, `BUTTONS` (with each button's `type`, `text`, and `url` or `phone_number`) and, for a carousel, `CAROUSEL` with its `cards`. | | `list[].template[].type` | string | (one of: OK) The part — `HEADER`, `BODY`, `FOOTER`, `BUTTONS` or `CAROUSEL`. | | `list[].template[].format` | string | (one of: OK) For `HEADER`, its kind — `TEXT`, `IMAGE`, `VIDEO` or `DOCUMENT`. | | `list[].template[].text` | string | (one of: OK) The text of the part, with its `{{1}}` variables. | | `list[].template[].add_security_recommendation` | boolean | (one of: OK) For the `BODY` of an authentication template: whether WhatsApp adds its security recommendation (not to share the code) to the message. | | `list[].template[].code_expiration_minutes` | integer | (one of: OK) For the `FOOTER` of an authentication template: the number of minutes until the code expires, shown to the client. | | `list[].template[].buttons` | array of object | (one of: OK) For `BUTTONS`, the buttons. | | `list[].template[].buttons[].type` | string | (one of: OK) The kind of button, as WhatsApp writes it — for example `QUICK_REPLY`, `URL` (website), `PHONE_NUMBER`, `COPY_CODE` (coupon code) or `OTP` (authentication code). | | `list[].template[].buttons[].text` | string | (one of: OK) The text on the button. | | `list[].template[].buttons[].url` | string | (one of: OK) For a `URL` button: the website address. A dynamic website ends with `{{1}}`, which you fill in with `websiteVariable` when you send the template. | | `list[].template[].buttons[].phone_number` | string | (one of: OK) For a `PHONE_NUMBER` button, the phone number it calls. | | `list[].template[].buttons[].otp_type` | string | (one of: OK) For an `OTP` button: how the client gets the code — for example `COPY_CODE`, a button that copies it. | | `list[].template[].cards` | array of object | (one of: OK) For `CAROUSEL`: the cards, in order, each with its own `components` — its `HEADER` (image or video), `BODY` and `BUTTONS`. | | `list[].template[].cards[].components` | array of object | (one of: OK) The parts of this card, in the same form as the parts of the template. | | `status` | string | (one of: FAIL) FAIL — the request was not carried out. `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `2` — 'from' is missing, or JSON syntax error; `3` — Wrong apiKey, or the "from" number is not registered with us. | #### Example: OK A utility template with variables, a template with a document header and a website button that is still under review, and an authentication template. ```json { "status": "OK", "list": [ { "name": "postman_welcome_text", "language": "en_US", "category": 1, "status": "approved", "template": [ { "type": "BODY", "text": "Hi {{1}}, your order {{2}} was received. We will let you know when it ships." }, { "type": "FOOTER", "text": "Thank you for shopping with us" } ] }, { "name": "postman_invoice_pdf", "language": "en_US", "category": 1, "status": "pending", "template": [ { "type": "BODY", "text": "Dear {{1}}, your invoice for {{2}} is attached. The total amount is {{3}}. Thank you for your business." }, { "type": "HEADER", "format": "DOCUMENT" }, { "type": "BUTTONS", "buttons": [ { "type": "URL", "text": "Pay online", "url": "https://www.example.com/pay/{{1}}" } ] } ] }, { "name": "postman_login_code", "language": "en_US", "category": 3, "status": "approved", "template": [ { "type": "BODY", "add_security_recommendation": true }, { "type": "FOOTER", "code_expiration_minutes": 5 }, { "type": "BUTTONS", "buttons": [ { "type": "OTP", "otp_type": "COPY_CODE" } ] } ] } ] } ``` #### Example: Reason 3 Wrong apiKey, or the "from" number is not registered with us. ```json { "status": "FAIL", "reason": 3 } ``` --- # Create a Template Source: https://docs.99digital.co.il/whatsapp-api/templates/create-a-template Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/templates/create-a-template.md Section: WhatsApp API › Templates `POST https://api.99digital.co.il/whatsapp/v2/createTemplate` Submit a new WhatsApp template (utility, marketing, carousel or authentication) to WhatsApp (Meta) for approval. ## Explanation Template messages need to get approval by WhatsApp (Meta) before you can start using them. This API will guide you on submitting a new template. Every option below also has its own example tab under **Body**, with an explanation and a picture of the result. Once a template is approved, send it with [Send a Template](https://docs.99digital.co.il/whatsapp-api/templates/send-a-template); check its status and final category with [Get Templates](https://docs.99digital.co.il/whatsapp-api/templates/get-templates). ## Create a Utility and Marketing template **(If you wish to create an authentication template, please scroll down to the last part of this page: "Create an Authentication template".)** ### Remarks - If the template body is too general, it will not be approved. - You can use variables in this way: `{{1}}` and `{{2}}` and so on (up to 10 variables). You set these variables later, when you send the template to your clients. - A variable can be used only once inside the body. It means that if you used `{{1}}` somewhere in your body, you should not use `{{1}}` again. - You must have a reasonable number of variables compared to the rest of the text. Usually, for every variable you need at least 3 words in your body. For example: if you have 5 variables, make sure the rest of the body has at least 15 words. - It usually takes up to 1 hour for a template to change its status to approved or rejected. You can't edit a rejected template; you must submit a new one with a new name. New accounts might get approved within 24 hours for their first template submissions. - The template name must be unique. If you delete a template, you can't use the same name for 30 days. - The template name must be lower case, English letters and numbers only. No spaces. - A template can contain more than just text. It can also have an image, a document or a video as part of the template. - You can have up to 6000 templates in your account. - A template can contain buttons for quick actions. You can have website / call / coupon / quick reply buttons, under these limitations: - A template can have a maximum of 10 buttons of all kinds. - You can have a maximum of 1 'Call' button. - You can have a maximum of 2 'Website' buttons. - You can have a maximum of 10 'Quick reply' buttons. - You can have a maximum of 1 'Coupon' button. - Quick reply buttons are buttons that, when the end user clicks on them, send you the text and the ID of the button. They must not contain variables, new lines, emoji or any design symbols. - A call button makes a phone call from the user's mobile phone to the number you requested. - Website buttons open a website link: a static link (fixed) or a dynamic link (with a variable). - A coupon button holds a code: when the user clicks on the button, the code is copied to their clipboard. - If you wish to create a template that you will not be able to delete afterwards (an important template you wish to protect against accidental deletion), use this as the start of the template name: `reserved_`. - The body of the template can't start with a variable and can't end with a variable. - A template that is created and not used even once for 12 months will automatically be deleted by Meta. You will get a delete webhook notification. - A carousel template must have between 2 and 10 cards, the header must be an image or a video, and each card can have up to 2 buttons. This template will be in the Marketing category. All cards must look the same (body, button types, variables). The card fields carry the card's number: `carouselCard1_…` for card 1, `carouselCard2_…` for card 2, up to `carouselCard10_…`; number the cards from 1 without gaps. ### Endpoint | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/createTemplate` | | Method | JSON via POST | | Key | Value | | --- | --- | | apiKey | Your API key for the service | ### Template setup Each template needs to have a name and a language. | Content | Explanation | Mandatory | Example | Limit (characters) | | --- | --- | --- | --- | --- | | name | Name for your template, without spaces (use an underscore instead), lower case, English only. The template name must be unique. | yes | website_login_new_client | 512 | | language | The language of the template: the code to use, from the table below. | yes | 1 | | | Language name | Code to use | | --- | --- | | Hebrew | 1 | | English | 2 | | Arabic | 3 | | Russian | 4 | | Spanish | 5 | | Chinese | 6 | | Hindi | 7 | | Thai | 8 | | French | 9 | ### Template structure Each template contains 4 parts: - header (media is optional). - body (mandatory). - footer (optional). - buttons (optional). | Content | Explanation | Mandatory | Number of variables allowed | Example | Limit (characters) | | --- | --- | --- | --- | --- | --- | | header | Header allows you to choose media to be sent as part of the template:
1 - no media
2 - image
3 - video
4 - document
5 - carousel
WhatsApp reviews the template with a sample file that we provide; you send the real file each time you send the template. | yes | 0 | 1 | 1 | | body | Your template message goes here.
`\n` for a new line
`*text*` for bold
`_text_` for italic
`~text~` for strikethrough
`{{1}}` - `{{10}}` for variables | yes | 10 | `Hello {{1}}, and welcome to our website! Thank you for buying {{2}}. Your order will be shipped on {{3}}.` | 1024 for the total body content, including the variables' data when sending the template (600 with a coupon code button) | | bodyVariableSample1-10 | For any given variable you used in `body`, you can provide a sample text, for example:
for `{{1}}` use `bodyVariableSample1`
for `{{2}}` use `bodyVariableSample2`
and so on.
WhatsApp reviews the template with these samples. | No, but if not provided, a variable sample will be generated for you automatically | 0 | This is a sample text | 500 | | footer | Any footer you want to add.
No emoji, no variables.
A footer does not work with a carousel header. | no | 0 | This is footer, optional | 60 | | buttons | 1 - No buttons
2 - for "call to action" only
3 - for "quick reply" only
4 - both call to action and quick reply combination | yes, you must select 1/2/3/4 (not needed for a carousel, `header` 5) | see below | see below | 1 | | carouselMedia | Only relevant if `header` is set to 5. You must choose the carousel cards: either an image for all cards, or a video for all cards.
1 - image cards
2 - video cards | yes, if `header` = 5 | 0 | 1 | 1 | | carouselButtons | Only relevant if `header` is set to 5. The buttons setup (the same on every card):
1 - one website only
2 - one quick reply only
3 - two quick replies only
4 - website + quick reply
5 - phone + website
6 - phone + quick reply only | yes, if `header` = 5 | 0 | 3 | 1 | For the `body` part, you can also use the following markups: ![WhatsApp text formatting: *bold*, _italic_, ~strikethrough~ and \`\`\`monospace\`\`\`](https://storage.99digital.online/docs/template1.png) ### Buttons setup If you wish to use buttons, you need to choose between "call to action" or "quick reply", or use both. - Call to action is a button that triggers an action. There are two types: url (which opens a website in the phone's browser) and call (which makes a regular phone call to a number). You can use up to 1 call button and 2 website buttons in your template. - Quick reply is a button that the user clicks, and it returns a webhook about the button text that was clicked. For example, a button named "sales" will return to your webhook URL a reply saying that "sales" was clicked, so you can build your flow scenario according to that. You can have up to 10 buttons of the quick reply type. - Remember! A total of 10 buttons is allowed from the two kinds. | Content | Explain | Option to select | Mandatory | Number of variables allowed | Example | Limit (characters) | | --- | --- | --- | --- | --- | --- | --- | | callToAction | Here you can choose how you want to set up the call to action | 1 - One website button only
2 - Call button only
3 - One website + Call button
4 - Two websites + Call button
5 - Two websites only | only if you selected "2" or "4" in `buttons` | - | 3 | 1 | | callToActionWebsiteText | First website text to show | Text to show for the link | only if you used `callToAction` option 1 / 3 / 4 / 5 | 0 | Click here for my website | 20 | | callToActionWebsiteType | First website link type | 1 - for a static URL (meaning, no variable)
2 - for a dynamic URL, with one variable automatically added at the end of the URL | only if you used `callToAction` option 1 / 3 / 4 / 5 | 0 | 1 | 1 | | callToActionWebsiteURL | First website link URL | The link to your website. You cannot use WhatsApp groups, WhatsApp URLs for opening a conversation, and cannot use short URL services such as bitly. | only if you used `callToAction` option 1 / 3 / 4 / 5 | In case you choose "2" in `callToActionWebsiteType`, the variable will be automatically put at the end. For example: `https://www.amazon.com/{{1}}`, so when you send the template, you can provide what the `{{1}}` will be. Write the URL without the variable: it is added for you. | `https://www.google.com/` | 2000 | | callToActionWebsiteText2 | Second website text to show, in case you want to use a second website button | Text to show for the link | only if you used `callToAction` option 4 / 5 | 0 | Click here for my second website | 20 | | callToActionWebsiteType2 | Second website link type | 1 - for a static URL (meaning, no variable)
2 - for a dynamic URL, with one variable automatically added at the end of the URL | only if you used `callToAction` option 4 / 5 | 0 | 1 | 1 | | callToActionWebsiteURL2 | Second website link URL | The link to your website. You cannot use WhatsApp groups, WhatsApp URLs for opening a conversation, and cannot use short URL services such as bitly. | only if you used `callToAction` option 4 / 5 | In case you choose "2" in `callToActionWebsiteType2`, the variable will be automatically put at the end. For example: `https://www.amazon.com/{{1}}`, so when you send the template, you can provide what the `{{1}}` will be. Write the URL without the variable: it is added for you. | `https://www.amazon.com/` | 2000 | | callToActionCallText | The button text for the call | The text to show for the dial button | only if you used `callToAction` option 2 / 3 / 4 | 0 | Click here to call me | 20 | | callToActionCallNumber | The number to dial. The number is fixed. | The number to dial, with the country code and `+` | only if you used `callToAction` option 2 / 3 / 4 | 0 | `+972501234567` | 20 | | useCoupon | A coupon button is another type of "call to action" and can be added to any of the `callToAction` options 1/3/4/5. When using a coupon button, the end user receives a "copy code" coupon message that can have an expiration time.
If a coupon code button is used, please notice the following limitations:
- the `body` parameter can only have 600 characters;
- the `header` can only be none/image/video, not a document;
- at least one website URL is required;
- a footer can't be used;
- only mobile phones using WhatsApp can see this template, not WhatsApp Web. | 0 to disable
1 to enable
(send it as a number, not as text) | no. Default is 0. | 0 | 1 | 1 | | couponTitle | The title of the coupon code, which will be presented next to the code in the template. | Text to show for the coupon title | only if `useCoupon` is set to 1 | 0 | Special offer! | 16 | | couponExpiration | In case you want to use a time limit for the coupon button. You will provide the expiration time when sending the template, and the template shows the timer. | 0 - to have a coupon without a time limit
1 - to limit the time to use the coupon
(send it as a number, not as text) | only if `useCoupon` is set to 1 | 0 | 1 | 1 | | quickReply1-10 | The quick reply buttons, up to 10 buttons | Provide the quick reply buttons as parameters (`quickReply1`, `quickReply2`, etc.) | only if you selected the `buttons` parameter as 3 or 4 | 0 | "customer service"
"sales"
"support" | 25 | | carouselCardX_body | In case the header is a carousel, this is the body of card number X, where X is from 1 to 10 | The body text of the specific carousel card, with up to 2 new lines | No, but it's all or none: if you choose to have a body for one card, all of them must have one. | 1 (only `{{1}}`) | Here is my first product, named: `{{1}}`. Click to buy | 160 | | carouselCardX_var | In case the body of card X has the variable `{{1}}`, where X can be between 1 and 10 | A sample text for that `{{1}}`, which WhatsApp reviews the template with | No, but if not provided, a sample will be generated for you automatically. Send it only if the card body has `{{1}}`. | 0 | Leather wallet | 160 | | carouselCardX_websiteText | In case `carouselButtons` is set to 1/4/5, where X can be between 1 and 10 | Text to show for the website button | only if `carouselButtons` is 1/4/5 | 0 | Click here | 25 | | carouselCardX_websiteType | In case `carouselButtons` is set to 1/4/5, where X can be between 1 and 10 | 1 - for a static website URL
2 - for a dynamic URL, with a variable at the end
The same type on all cards. | only if `carouselButtons` is 1/4/5 | 1 | 1 | 1 | | carouselCardX_websiteURL | In case `carouselButtons` is set to 1/4/5, where X can be between 1 and 10 | This is the website URL; you can use a variable that will be added at the end. | only if `carouselButtons` is 1/4/5 | In case you choose "2" in `carouselCardX_websiteType`, the variable will be automatically put at the end. For example: `https://www.amazon.com/{{1}}`, so when you send the template, you can provide what the `{{1}}` will be. | `https://www.amazon.com/` | 2000 | | carouselCardX_quickReply1 | In case `carouselButtons` is set to 2/3/4/6, where X can be between 1 and 10 | This is the first quick reply button | only if `carouselButtons` is 2/3/4/6 | 0 | Click Here | 25 | | carouselCardX_quickReply2 | In case `carouselButtons` is set to 3, where X can be between 1 and 10 | This is the second quick reply button | only if `carouselButtons` is 3 | 0 | Click here 2 | 25 | | carouselCardX_callText | In case `carouselButtons` is set to 5/6, where X can be between 1 and 10 | This is the button text for the phone call | only if `carouselButtons` is 5/6 | 0 | Call now | 25 | | carouselCardX_callNumber | In case `carouselButtons` is set to 5/6, where X can be between 1 and 10 | This is the phone number, with the country code and `+` | only if `carouselButtons` is 5/6, and `carouselCardX_callText` is provided | 0 | `+972501234567` | 20 | ### Full Request | Parameter | Description / Example | | --- | --- | | from | Your WhatsApp account. International number without `+`. For example: `972771234567` | | name | Any name for the template; it cannot be used twice | | language | 1-9 | | header | 2 for image | | body | Your template + variables go here.
`\n` for a new line
`*text*` for bold
`_text_` for italic
`~text~` for strikethrough
`{{1}}` for variable 1
`{{2}}` for variable 2
and so on (maximum 10 variables) | | footer | Footer text | | buttons | 3 for quick reply | | callToAction | Everything that is relevant to buttons (phone calls, website(s), coupon code) | | quickReply1-10 | Any text goes here | ### Full example 1 Here is an example of a full template request. The template is in English. The template contains: - no header; - a body with 6 variables; - no footer; - 2 websites and 1 call button; - 5 buttons of "quick reply". ```json { "from": "972771234567", "name": "website_welcome", "language": 2, "header": 1, "body": "*Hello {{1}}* and thank you for joining our exclusive website store!\nOur company has many secrets to discover.\nFor future connection, we received your phone number: {{2}} and your email address: {{3}}.\nYou can find shirts, hats, shoes and gloves at discounted prices. Hold on, wait a minute, i found something interesting! just for this week we offer: {{4}} at discounted price: {{5}} only when you buy it online or in-store shop at: {{6}}.\nWhat would you like to discover?", "buttons": 4, "callToAction": 4, "callToActionWebsiteText": "Our Website", "callToActionWebsiteType": 1, "callToActionWebsiteURL": "https://www.example.com", "callToActionWebsiteText2": "Our second website", "callToActionWebsiteType2": 1, "callToActionWebsiteURL2": "https://www.example-second-website.com", "callToActionCallText": "Click to call us", "callToActionCallNumber": "+972522222222", "quickReply1": "Shirts", "quickReply2": "Hats", "quickReply3": "Shoes", "quickReply4": "Gloves", "quickReply5": "Something else" } ``` The template submission will look like this: ![The template: the welcome text, two website buttons, a call button and five quick reply buttons](https://storage.99digital.online/docs/template2.png) When you send the template to your client, you need to fill `{{1}}`, `{{2}}`, `{{3}}`, `{{4}}`, `{{5}}` and `{{6}}`. ### Full example 2 Here is a sample of a full template request: an appointment update template, in English. The template contains: - an image header; - a body with 2 variables; - a footer; - buttons: call to action (one website + one call button). ```json { "from": "972771234567", "name": "friday_appointment_reminder", "language": 2, "header": 2, "body": "*Hello {{1}}* we would like to remind you of the appointment you have with us on {{2}}.\nPlease arrive with your ID card.", "footer": "Our address: 51D street.", "buttons": 2, "callToAction": 3, "callToActionWebsiteText": "Click for navigation", "callToActionWebsiteType": 1, "callToActionWebsiteURL": "https://waze.com/ul", "callToActionCallText": "Call Us", "callToActionCallNumber": "+972779111111" } ``` The template submission will look like this: ![The template: an image, the reminder text, the footer, and "Click for navigation" and "Call Us" buttons](https://storage.99digital.online/docs/template3.png) ### Full example 3 Here is a sample of a full template request: a payment update template, in English. The template contains: - a document header; - a body with 2 variables; - no footer; - buttons: call to action (dynamic website). ```json { "from": "972771234567", "name": "payment_reminder_1", "language": 2, "header": 4, "body": "*Dear {{1}}*\nYour invoice for December 2021 is attached. Total amount is {{2}} USD.\nPlease pay as soon as you can.\nThe invoice is due in a week. 💳", "buttons": 2, "callToAction": 1, "callToActionWebsiteText": "Click to pay", "callToActionWebsiteType": 2, "callToActionWebsiteURL": "https://paypal.com/" } ``` The template submission will look like this: ![The template: a document, the payment text, and a "Click to pay" button](https://storage.99digital.online/docs/template4.png) ### Full example 4 Here is a sample of a full template request: a transportation update template, in English. The template contains: - no header; - a body with no variables; - a footer; - no buttons. ```json { "from": "972771234567", "name": "the_bus_is_coming", "language": 2, "header": 1, "body": "*Dear NetBus user*\nYour bus is on its way.\nStay sharp. 🚍🚍🚍🚍", "footer": "The wheels on the bus go round and round", "buttons": 1 } ``` The template submission will look like this: ![The template: a bold title, two lines of text with bus emoji, and a footer](https://storage.99digital.online/docs/template5.png) ### Full example 5 Here is a sample of a full template request in English: a weekend sale with a coupon code. The template contains: - no header; - a body with 2 variables; - 1 website button (static website); - 1 phone button; - 1 coupon code button with an expiration time. ```json { "from": "972771234567", "name": "weekend_sale", "language": 2, "header": 1, "body": "*Hello {{1}}*\nWe value our VIP clients very much and would like to offer you {{2}} off for the weekend sale only!", "buttons": 2, "callToAction": 3, "callToActionWebsiteText": "Click here for more", "callToActionWebsiteType": 1, "callToActionWebsiteURL": "https://www.amazon.com/store/", "callToActionCallText": "Call Us", "callToActionCallNumber": "+972501122334", "useCoupon": 1, "couponTitle": "Weekend Sale!", "couponExpiration": 1 } ``` The template submission will look like this: ![The template: the sale text, the "Weekend Sale!" offer with a timer, and "Copy offer code", website and call buttons](https://storage.99digital.online/docs/template6.png) (The "Copy offer code" text is fixed and can't be changed; each template language shows the relevant translation. When the user clicks on it, it copies the code. When you send the template, the expiration shows the relevant timer.) ### Response ```json { "status": "OK", "name": "template name", "timestamp": 1710861707, "body": "The body text you wrote", "category": 1, "reason": 1 } ``` ### Full example 6 Here is a sample of a full carousel template, in English: - image cards; - 3 cards; - each card has 1 static website button and 1 quick reply button. This is how it will look like; the client can switch between the 3 cards provided: ![A carousel template: the message, then image cards side by side, each with a website and a quick reply button](https://storage.99digital.online/docs/carousel_template.png) ```json { "from": "972771234567", "name": "carousel_1", "language": 2, "header": 5, "carouselMedia": 1, "carouselButtons": 4, "body": "Hello! See all my cards below", "carouselCard1_body": "Card 1 body text", "carouselCard1_websiteText": "My website", "carouselCard1_websiteType": 1, "carouselCard1_websiteURL": "https://www.amazon.com", "carouselCard1_quickReply1": "Contact us", "carouselCard2_body": "Card 2 body text", "carouselCard2_websiteText": "My website 2", "carouselCard2_websiteType": 1, "carouselCard2_websiteURL": "https://www.google.com", "carouselCard2_quickReply1": "Contact us 2", "carouselCard3_body": "Card 3 body text", "carouselCard3_websiteText": "My website 3", "carouselCard3_websiteType": 1, "carouselCard3_websiteURL": "https://www.wikipedia.com", "carouselCard3_quickReply1": "Contact us 3" } ``` ### Response ```json { "status": "OK", "name": "carousel_1", "timestamp": 1788784106, "body": "Hello! See all my cards below", "category": 2, "reason": 1 } ``` ### Response-Explain | Parameter | Description | | --- | --- | | status | `OK` (template submitted to Meta) or `FAIL` (template error) | | name | The template name you submitted | | timestamp | The timestamp (Unix time, in seconds) | | body | The body message you submitted | | category | The category of the template, temporarily — see the values below | | reason | The status explanation — see the table below | | Value | Meaning | | --- | --- | | 1 | Utility template | | 2 | Marketing template | The reason it's "temporarily" is that until the template is approved, the category can be changed by Meta. The final and actual category is determined when the template is approved, and can be obtained with the [Get Templates](https://docs.99digital.co.il/whatsapp-api/templates/get-templates) API. | reason | Description | | --- | --- | | 1 | Not FAIL. The status is OK. | | 2 | `from` is missing, or JSON syntax error | | 3 | Wrong apiKey, or the "from" number is not registered with us | | 4 | `name` is either empty / too long / invalid / already exists in your account | | 5 | `language` code is incorrect | | 6 | `header` code is incorrect (with a coupon code button, the header can't be a document) | | 7 | The `body` has one of the following issues:
- it has more than 10 variables;
- the text is too long;
- the same variable appears more than once;
- there are only parameters and no regular text;
- the body can't have more than two consecutive new lines (`\n\n\n`) together. | | 8 | `footer` is too long or incorrect (a coupon code template can't have a footer) | | 9 | `buttons` is missing or not 1/2/3/4 (2 or 4 with a coupon code button) | | 10 | You used call to action / quick reply buttons, but didn't provide a correct `callToAction` code or a quick reply button | | 11 | `callToActionWebsiteText` is invalid / too long | | 12 | `callToActionWebsiteType` must be 1/2 | | 13 | `callToActionWebsiteURL` is invalid / too long (write it without the variable: it is added for you) | | 14 | `callToActionCallText` is invalid / too long | | 15 | `callToActionCallNumber` is invalid / too long | | 16 | You used quick reply buttons, but did not provide any buttons | | 17 | You used more than 10 buttons | | 18 | The number of `bodyVariableSample` fields you provided does not match the number of variables in `body`; the body variables must be numbered in order, from `{{1}}` and without gaps | | 19 | WhatsApp rejected the header's sample file. Please try again or contact support. | | 20 | A dynamic website button (`callToActionWebsiteType` or `callToActionWebsiteType2` set to 2) needs its `callToActionWebsiteURL` / `callToActionWebsiteURL2` | | 21 | The quick reply button(s) are too long | | 22 | The template contains too many variables compared to the length of the rest of the text. Decrease the number of variables or increase the body length. | | 23 | `callToActionWebsiteText2` is invalid / too long, or two buttons are the same | | 24 | `callToActionWebsiteType2` must be 1/2 | | 25 | `callToActionWebsiteURL2` is invalid / too long | | 26 | `couponTitle` is required / too long / wrong | | 27 | `couponExpiration` is invalid (it must be the number 0 or 1) | | 30 | Unknown error, please check your syntax | | 31 | Quick reply buttons must not contain any emoji | | 32 | The template content is an authentication template; please change your syntax to match | | 33 | Unable to create this kind of template, please contact support for more information | | 35 | Permission denied to create templates, please contact our support | | 36 | `carouselMedia` is missing or invalid | | 37 | Wrong number of cards for `carouselCardX` (a carousel has 2 to 10 cards, numbered from 1 without gaps) | | 38 | `carouselCardX_body` is invalid (X can be 1 to 10) | | 39 | `carouselButtons` is missing or invalid | | 40 | A card variable is invalid: a card body can have one variable, `{{1}}`, on all the cards or none, and its sample (`carouselCardX_var`) can be up to 160 characters | | 41 | `carouselCardX_websiteText` / `_websiteType` / `_websiteURL` is invalid or wrong | | 42 | `carouselCardX_quickReply1` / `_quickReply2` is invalid or wrong | | 43 | `carouselCardX_callText` / `_callNumber` is invalid or wrong | ## Create an Authentication template An authentication code template is a different kind of template you can create. It is still a template, but it is different from the regular template creation, and it doesn't contain the normal structure: header, body, footer, buttons. An authentication code template is an OTP — a one-time password code that you can send to your clients over WhatsApp. It looks like this: ![An authentication template: the code, the security text, the expiration notice and a Copy code button](https://storage.99digital.online/docs/template7.png) ### Remarks - The template text is fixed and can't be changed (per language). - The "Copy code" button is fixed and can't be changed (per language). - The template will have "copy code", which copies the code from WhatsApp for easy usage. - You can only create an authentication template if your daily limit is 1000 or more. - When you send it, the authentication template can only be seen on a mobile phone. If your client uses WhatsApp Web, the template message with the code will not be visible to them. - You send the code itself with each message, with [Send a Template](https://docs.99digital.co.il/whatsapp-api/templates/send-a-template), in its `otp` field. ### Endpoint (same as regular template creation) | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/createTemplate` | | Method | JSON via POST | | Key | Value | | --- | --- | | apiKey | Your API key for the service | ### Body Each template needs to have a name and a language. | Content | Explanation | Mandatory | Example | Limit (characters) | Explanation | | --- | --- | --- | --- | --- | --- | | from | Your WhatsApp account number. International number without `+`. | yes | 972771234567 | | | | name | Name for your template, without spaces (use an underscore instead), lower case, English only. The template name must be unique. | yes | login_code | 512 | | | language | The language of the template: the code to use, from the table below. | yes | 1 | | The fixed text of the template is in this language. | | authentication | 1 (fixed, always) | yes | 1 | 1 | This is for our system to know you are building an authentication template | | add_security_text | 0 - no security message
1 - with security message
(default is 0) | no | 1 | 1 | This is a fixed text along with your code. As in the above screenshot, the text "For your security, do not share this code." will be added (based on your template language). | | code_expiration | 0-90 minutes for code expiration
(default is 0 - no expiration) | no | 5 | 2 | If you wish your code to expire, you can provide the code expiration in minutes, between 1 and 90. When the time is up, the "Copy code" button will not be available, and the text "the code has expired" will be shown instead. | | Language name | Code to use | | --- | --- | | Hebrew | 1 | | English | 2 | | Arabic | 3 | | Russian | 4 | | Spanish | 5 | | Chinese | 6 | | Hindi | 7 | | Thai | 8 | | French | 9 | ### Response ```json { "status": "OK", "name": "template name", "timestamp": 1710861707, "category": 3, "reason": 1 } ``` ### Response-Explain | Parameter | Description | | --- | --- | | status | `OK` (template submitted to Meta) or `FAIL` (template error) | | name | The template name you submitted | | timestamp | The timestamp (Unix time, in seconds) | | category | The category of the template — see the values below | | reason | The status explanation — see the table below | | Value | Meaning | | --- | --- | | 3 | Authentication template | | reason | Description | | --- | --- | | 1 | Not FAIL. The status is OK. | | 2 | `from` is missing, or JSON syntax error | | 3 | Wrong apiKey, or the "from" number is not registered with us | | 4 | `name` is either empty / too long / invalid / already exists in your account | | 5 | `language` code is incorrect | | 30 | Unknown error, please check your syntax | | 33 | `add_security_text` is wrong or invalid, or WhatsApp is unable to create this kind of template (please contact support) | | 34 | `code_expiration` is wrong, invalid or not in range (0 to 90) | | 35 | Permission denied to create templates, please contact our support | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | (one of: Utility or marketing) Your WhatsApp account. International number without `+`. Example: `972771234567`. | | `name` | string | Yes | (one of: Utility or marketing) Name for your template, without spaces (use an underscore instead), lower case, English only. The template name must be unique. Max length: 512. Example: `website_login_new_client`. | | `language` | integer | Yes | (one of: Utility or marketing) The language of the template — the code to use. One of: `1` — Hebrew; `2` — English; `3` — Arabic; `4` — Russian; `5` — Spanish; `6` — Chinese; `7` — Hindi; `8` — Thai; `9` — French. Example: `2`. | | `header` | integer | Yes | (one of: Utility or marketing) Header allows you to choose media to be sent as part of the template. WhatsApp reviews it with a sample file we provide; you send the real file with each template. One of: `1` — No media; `2` — Image; `3` — Video; `4` — Document; `5` — Carousel — set `carouselMedia`, `carouselButtons` and the cards. Example: `1`. | | `body` | string | Yes | (one of: Utility or marketing) Your template message goes here. Use `\n` for a new line, `*text*` for bold, `_text_` for italic, `~text~` for strikethrough, and `{{1}}` to `{{10}}` for variables. The limit of 1024 characters is for the total body, including the variables' data when sending the template (600 with a coupon code). Max length: 1024. Example: `Hello {{1}}, and welcome to our website! Thank you for buying {{2}}. Your order will be shipped on {{3}}.`. | | `bodyVariableSample1` | string | No | (one of: Utility or marketing) For any variable you used in `body`, you can provide a sample text: `bodyVariableSample1` for `{{1}}`, `bodyVariableSample2` for `{{2}}` and so on. WhatsApp reviews the template with the samples. If not provided, a sample is generated for you. Max length: 500. Example: `This is a sample text`. | | `footer` | string | No | (one of: Utility or marketing) Any footer you want to add. No emoji, no variables. Not for a carousel or a coupon code template. Max length: 60. Example: `This is footer, optional`. | | `buttons` | integer | No | (one of: Utility or marketing) The buttons of the template. If you wish to use buttons, choose between "call to action" or "quick reply", or use both (a total of 10 buttons is allowed from the two kinds). You must select 1, 2, 3 or 4 — except for a carousel (`header` 5), whose buttons are set with `carouselButtons`. One of: `1` — No buttons; `2` — Call to action only — set `callToAction`; `3` — Quick reply only — set `quickReply1` and on; `4` — Both call to action and quick reply. Example: `1`. | | `callToAction` | integer | No | (one of: Utility or marketing) Required if `buttons` is 2 or 4: how you want to set up the call to action buttons. One of: `1` — One website button only; `2` — Call button only; `3` — One website + call button; `4` — Two websites + call button; `5` — Two websites only. Example: `3`. | | `callToActionWebsiteText` | string | No | (one of: Utility or marketing) The text of the first website button — the text to show for the link. No variables. Required with `callToAction` 1, 3, 4 and 5. Max length: 20. Example: `Click here for my website`. | | `callToActionWebsiteType` | integer | No | (one of: Utility or marketing) The first website link type. Required with `callToAction` 1, 3, 4 and 5. One of: `1` — Static URL (no variable); `2` — Dynamic — one variable is automatically added at the end of the URL. Example: `1`. | | `callToActionWebsiteURL` | string | No | (one of: Utility or marketing) The link of the first website button — the link to your website. Required with `callToAction` 1, 3, 4 and 5. You can't use WhatsApp groups, WhatsApp links for opening a conversation, or short URL services such as bitly. For a dynamic link (`callToActionWebsiteType` 2), write it without the variable: it is added at the end automatically — `https://www.amazon.com/` becomes `https://www.amazon.com/{{1}}`, and you provide the `{{1}}` when you send the template. Max length: 2000. Example: `https://www.google.com/`. | | `callToActionWebsiteText2` | string | No | (one of: Utility or marketing) The text of the second website button, in case you want to use a second website button. No variables. Required with `callToAction` 4 and 5. Max length: 20. Example: `Click here for my second website`. | | `callToActionWebsiteType2` | integer | No | (one of: Utility or marketing) The second website link type. Required with `callToAction` 4 and 5. One of: `1` — Static URL (no variable); `2` — Dynamic — one variable is automatically added at the end of the URL. Example: `1`. | | `callToActionWebsiteURL2` | string | No | (one of: Utility or marketing) The link of the second website button. Required with `callToAction` 4 and 5. The same rules as `callToActionWebsiteURL`: no WhatsApp groups, WhatsApp links for opening a conversation or short URL services such as bitly. For a dynamic link (`callToActionWebsiteType2` 2), write it without the variable: it is added at the end automatically (`https://www.amazon.com/{{1}}`), and you provide the `{{1}}` when you send the template. Max length: 2000. Example: `https://www.amazon.com/`. | | `callToActionCallText` | string | No | (one of: Utility or marketing) The text of the call button — the text to show for the dial button. No variables. Required with `callToAction` 2, 3 and 4. Max length: 20. Example: `Click here to call me`. | | `callToActionCallNumber` | string | No | (one of: Utility or marketing) The number the call button dials — a fixed number, with the country code and `+`. Required with `callToAction` 2, 3 and 4. Max length: 20. Example: `+972501234567`. | | `useCoupon` | integer | No | (one of: Utility or marketing) Adds a coupon code button — another type of call to action — to the `callToAction` options 1, 3, 4 or 5. The client gets a "copy code" coupon message, and the code can have an expiration time. If a coupon code button is used: the body can only have 600 characters; the header can only be none, image or video, not a document; at least one website URL is required; a footer can't be used; and only mobile phones using WhatsApp can see this template, not WhatsApp Web. Send it as the number `1`, not the text `"1"`. One of: `0` — No coupon button; `1` — A coupon code button. Default: `0`. | | `couponTitle` | string | No | (one of: Utility or marketing) Required with `useCoupon` 1: the title of the coupon code, shown next to the code in the template. No variables. Max length: 16. Example: `Special offer!`. | | `couponExpiration` | integer | No | (one of: Utility or marketing) With `useCoupon` 1: whether the coupon has a time limit. If it does, you provide the expiration time when sending the template, and the template shows the timer. Send it as a number. One of: `0` — A coupon without a time limit; `1` — A coupon with a time limit. | | `quickReply1` | string | No | (one of: Utility or marketing) The quick reply buttons, up to 10: `quickReply1`, `quickReply2` and so on. Required if `buttons` is 3 or 4. When the client clicks one, your webhook gets the button's text and ID. A quick reply must not contain variables, new lines, emoji or any design symbols. Max length: 25. Example: `Customer service`. | | `carouselMedia` | integer | No | (one of: Utility or marketing) Required if `header` is 5: the media of the cards — images for all cards, or videos for all cards. One of: `1` — Image cards; `2` — Video cards. | | `carouselButtons` | integer | No | (one of: Utility or marketing) Required if `header` is 5 — the buttons of every card. One of: `1` — One website only; `2` — One quick reply only; `3` — Two quick replies only; `4` — Website + quick reply; `5` — Phone + website; `6` — Phone + quick reply. | | `carouselCard1_body` | string | No | (one of: Utility or marketing) In case the header is a carousel (`header` 5): the text of card 1, with up to 2 new lines and one variable, `{{1}}`. Optional, but all or none: if one card has a text, all of them must. Max length: 160. Example: `Here is my first product, named: {{1}}. Click to buy`. | | `carouselCard1_var` | string | No | (one of: Utility or marketing) A sample for the `{{1}}` of card 1's text, for WhatsApp's review. If not provided, a sample is generated for you. Max length: 160. Example: `Leather wallet`. | | `carouselCard1_websiteText` | string | No | (one of: Utility or marketing) With `carouselButtons` 1, 4 or 5 — the text of card 1's website button. No variables. Max length: 25. Example: `Click here`. | | `carouselCard1_websiteType` | integer | No | (one of: Utility or marketing) With `carouselButtons` 1, 4 or 5 — the website link type, the same for all cards. One of: `1` — Static URL; `2` — Dynamic — a variable is added at the end. | | `carouselCard1_websiteURL` | string | No | (one of: Utility or marketing) With `carouselButtons` 1, 4 or 5 — the website URL of card 1. For a dynamic link the variable is added at the end automatically (`https://www.amazon.com/{{1}}`), and you provide it when you send the template. Max length: 2000. Example: `https://www.amazon.com/`. | | `carouselCard1_quickReply1` | string | No | (one of: Utility or marketing) With `carouselButtons` 2, 3, 4 or 6 — the first quick reply button of card 1. No variables. Max length: 25. Example: `Click here`. | | `carouselCard1_quickReply2` | string | No | (one of: Utility or marketing) With `carouselButtons` 3 — the second quick reply button of card 1. No variables. Max length: 25. Example: `Click here 2`. | | `carouselCard1_callText` | string | No | (one of: Utility or marketing) With `carouselButtons` 5 or 6 — the text of card 1's call button. No variables. Max length: 25. Example: `Call now`. | | `carouselCard1_callNumber` | string | No | (one of: Utility or marketing) With `carouselButtons` 5 or 6, and `carouselCard1_callText` provided — the phone number card 1's call button dials, with the country code and `+`. Max length: 20. Example: `+972501234567`. | | `from` | string | Yes | (one of: Authentication) Your WhatsApp account. International number without `+`. Example: `972771234567`. | | `name` | string | Yes | (one of: Authentication) Name for your template, without spaces (use an underscore instead), lower case, English only. The template name must be unique. Max length: 512. Example: `login_code`. | | `language` | integer | Yes | (one of: Authentication) The language of the template — the code to use. The fixed text of the authentication template is in this language. One of: `1` — Hebrew; `2` — English; `3` — Arabic; `4` — Russian; `5` — Spanish; `6` — Chinese; `7` — Hindi; `8` — Thai; `9` — French. Example: `2`. | | `authentication` | integer | Yes | (one of: Authentication) Always 1. This is how our system knows you are building an authentication template. Always `1`. | | `add_security_text` | integer | No | (one of: Authentication) A fixed text added to your code: "For your security, do not share this code." (in your template's language), as in the picture above. One of: `0` — No security message; `1` — With the security message. Default: `0`. | | `code_expiration` | integer | No | (one of: Authentication) If you wish your code to expire: the code expiration in minutes, between 1 and 90 (0 — no expiration). When the time is up, the "Copy code" button is no longer available, and the text "the code has expired" is shown instead. Default: `0`. Minimum: 0. Maximum: 90. Example: `5`. | ### Example: Text only A transportation update template, in English. The template contains: - no header; - a body with no variables; - a footer; - no buttons. The template submission will look like this: ![The template: a bold title, two lines of text with bus emoji, and a footer](https://storage.99digital.online/docs/template5.png) ```json { "from": "972771234567", "name": "the_bus_is_coming", "language": 2, "header": 1, "body": "*Dear NetBus user*\nYour bus is on its way.\nStay sharp. 🚍🚍🚍🚍", "footer": "The wheels on the bus go round and round", "buttons": 1 } ``` ### Example: Variables with samples An order update with 2 variables, each with a sample for WhatsApp's review. `bodyVariableSample1` is a sample for `{{1}}` and `bodyVariableSample2` for `{{2}}`. WhatsApp reviews the template with these samples; without them, samples are generated for you. You provide the real values when you send the template (`bodyVariable1`, `bodyVariable2`). ```json { "from": "972771234567", "name": "order_received", "language": 2, "header": 1, "body": "Hi {{1}}, your order {{2}} was received. We will let you know when it ships.", "bodyVariableSample1": "Dana", "bodyVariableSample2": "4711", "footer": "Thank you for shopping with us", "buttons": 1 } ``` ### Example: Quick replies (Hebrew) A Hebrew template (`language` 1) with two quick reply buttons. `buttons` 3 means quick reply buttons only. When the client clicks one, your webhook gets the button's text (and the id you give it when you send the template). ```json { "from": "972771234567", "name": "hebrew_order_received", "language": 1, "header": 1, "body": "שלום {{1}}, ההזמנה שלך מספר {{2}} התקבלה בהצלחה. נעדכן אותך כשהיא תישלח.", "bodyVariableSample1": "דנה", "bodyVariableSample2": "4711", "footer": "תודה שקניתם אצלנו", "buttons": 3, "quickReply1": "מעקב משלוח", "quickReply2": "דברו איתי" } ``` ### Example: Image header An appointment reminder, in English. The template contains: - an image header; - a body with 2 variables; - a footer; - call to action buttons: one website button and one call button (`callToAction` 3). The template submission will look like this: ![The template: an image, the reminder text, the footer, and "Click for navigation" and "Call Us" buttons](https://storage.99digital.online/docs/template3.png) ```json { "from": "972771234567", "name": "friday_appointment_reminder", "language": 2, "header": 2, "body": "*Hello {{1}}* we would like to remind you of the appointment you have with us on {{2}}.\nPlease arrive with your ID card.", "footer": "Our address: 51D street.", "buttons": 2, "callToAction": 3, "callToActionWebsiteText": "Click for navigation", "callToActionWebsiteType": 1, "callToActionWebsiteURL": "https://waze.com/ul", "callToActionCallText": "Call Us", "callToActionCallNumber": "+972779111111" } ``` ### Example: Video header A product video with three quick reply buttons. `header` 3 is a video. When you send the template, you provide the video itself (`headerType` 4 and `headerLink` in Send a Template). ```json { "from": "972771234567", "name": "promo_video", "language": 2, "header": 3, "body": "Hi {{1}}, watch our new {{2}} in action. Interested? Pick an option below.", "bodyVariableSample1": "Dana", "bodyVariableSample2": "espresso machine", "buttons": 3, "quickReply1": "Tell me more", "quickReply2": "Book a demo", "quickReply3": "Not interested" } ``` ### Example: Document header A payment reminder, in English, with the invoice attached. The template contains: - a document header; - a body with 2 variables; - no footer; - a call to action button: a dynamic website (`callToAction` 1, `callToActionWebsiteType` 2). The variable is added at the end of `https://paypal.com/`; you provide it when you send the template (`websiteVariable`). The template submission will look like this: ![The template: a document, the payment text, and a "Click to pay" button](https://storage.99digital.online/docs/template4.png) ```json { "from": "972771234567", "name": "payment_reminder_1", "language": 2, "header": 4, "body": "*Dear {{1}}*\nYour invoice for December 2021 is attached. Total amount is {{2}} USD.\nPlease pay as soon as you can.\nThe invoice is due in a week. 💳", "buttons": 2, "callToAction": 1, "callToActionWebsiteText": "Click to pay", "callToActionWebsiteType": 2, "callToActionWebsiteURL": "https://paypal.com/" } ``` ### Example: Call button A single call button (`callToAction` 2). ```json { "from": "972771234567", "name": "delivery_call_us", "language": 2, "header": 1, "body": "Hi {{1}}, your delivery is on its way. Questions about it? Give us a call.", "bodyVariableSample1": "Dana", "buttons": 2, "callToAction": 2, "callToActionCallText": "Call us", "callToActionCallNumber": "+97231234567" } ``` ### Example: Two websites Two website buttons (`callToAction` 5); the second one is dynamic. ```json { "from": "972771234567", "name": "booking_links", "language": 2, "header": 1, "body": "Hi {{1}}, your table for {{2}} is booked. You can view the menu or manage your booking below.", "bodyVariableSample1": "Dana", "bodyVariableSample2": "Friday 20:00", "buttons": 2, "callToAction": 5, "callToActionWebsiteText": "View menu", "callToActionWebsiteType": 1, "callToActionWebsiteURL": "https://www.example.com/menu", "callToActionWebsiteText2": "My booking", "callToActionWebsiteType2": 2, "callToActionWebsiteURL2": "https://www.example.com/booking/" } ``` ### Example: All button kinds A welcome template, in English, with every kind of button. The template contains: - no header; - a body with 6 variables; - no footer; - 2 website buttons and 1 call button (`callToAction` 4); - 5 quick reply buttons (`buttons` 4 — both kinds). The template submission will look like this: ![The template: the welcome text, two website buttons, a call button and five quick reply buttons](https://storage.99digital.online/docs/template2.png) When you send the template to your client, you need to fill `{{1}}`, `{{2}}`, `{{3}}`, `{{4}}`, `{{5}}` and `{{6}}`. ```json { "from": "972771234567", "name": "website_welcome", "language": 2, "header": 1, "body": "*Hello {{1}}* and thank you for joining our exclusive website store!\nOur company has many secrets to discover.\nFor future connection, we received your phone number: {{2}} and your email address: {{3}}.\nYou can find shirts, hats, shoes and gloves at discounted prices. Hold on, wait a minute, i found something interesting! just for this week we offer: {{4}} at discounted price: {{5}} only when you buy it online or in-store shop at: {{6}}.\nWhat would you like to discover?", "buttons": 4, "callToAction": 4, "callToActionWebsiteText": "Our Website", "callToActionWebsiteType": 1, "callToActionWebsiteURL": "https://www.example.com", "callToActionWebsiteText2": "Our second website", "callToActionWebsiteType2": 1, "callToActionWebsiteURL2": "https://www.example-second-website.com", "callToActionCallText": "Click to call us", "callToActionCallNumber": "+972522222222", "quickReply1": "Shirts", "quickReply2": "Hats", "quickReply3": "Shoes", "quickReply4": "Gloves", "quickReply5": "Something else" } ``` ### Example: Coupon code A weekend sale, in English, with a coupon code that expires. The template contains: - no header; - a body with 2 variables; - 1 website button (static website); - 1 call button; - 1 coupon code button with an expiration time. The template submission will look like this: ![The template: the sale text, the "Weekend Sale!" offer with a timer, and "Copy offer code", website and call buttons](https://storage.99digital.online/docs/template6.png) The "Copy offer code" text is fixed and can't be changed; each template language shows its translation. When the client clicks it, the code is copied. When you send the template, you provide the code and its expiration time, and the template shows the timer. ```json { "from": "972771234567", "name": "weekend_sale", "language": 2, "header": 1, "body": "*Hello {{1}}*\nWe value our VIP clients very much and would like to offer you {{2}} off for the weekend sale only!", "buttons": 2, "callToAction": 3, "callToActionWebsiteText": "Click here for more", "callToActionWebsiteType": 1, "callToActionWebsiteURL": "https://www.amazon.com/store/", "callToActionCallText": "Call Us", "callToActionCallNumber": "+972501122334", "useCoupon": 1, "couponTitle": "Weekend Sale!", "couponExpiration": 1 } ``` ### Example: Carousel A carousel template, in English, with 3 image cards. - image cards (`carouselMedia` 1); - 3 cards; - each card has 1 static website button and 1 quick reply button (`carouselButtons` 4). This is how it will look like — the client can switch between the 3 cards: ![A carousel template: the message, then image cards side by side, each with a website and a quick reply button](https://storage.99digital.online/docs/carousel_template.png) ```json { "from": "972771234567", "name": "carousel_1", "language": 2, "header": 5, "carouselMedia": 1, "carouselButtons": 4, "body": "Hello! See all my cards below", "carouselCard1_body": "Card 1 body text", "carouselCard1_websiteText": "My website", "carouselCard1_websiteType": 1, "carouselCard1_websiteURL": "https://www.amazon.com", "carouselCard1_quickReply1": "Contact us", "carouselCard2_body": "Card 2 body text", "carouselCard2_websiteText": "My website 2", "carouselCard2_websiteType": 1, "carouselCard2_websiteURL": "https://www.google.com", "carouselCard2_quickReply1": "Contact us 2", "carouselCard3_body": "Card 3 body text", "carouselCard3_websiteText": "My website 3", "carouselCard3_websiteType": 1, "carouselCard3_websiteURL": "https://www.wikipedia.com", "carouselCard3_quickReply1": "Contact us 3" } ``` ### Example: Carousel with variables A carousel whose cards each have a variable and a dynamic website button. Each card text has one variable, `{{1}}`, with its sample in `carouselCardX_var`. The website buttons are dynamic (`carouselCardX_websiteType` 2): when you send the template, you provide each card's variable and website variable. ```json { "from": "972771234567", "name": "products_carousel", "language": 2, "header": 5, "carouselMedia": 1, "carouselButtons": 4, "body": "Hi {{1}}, here are this week's picks for you - swipe to see them all.", "bodyVariableSample1": "Dana", "carouselCard1_body": "Our {{1}} - premium quality, in stock now.", "carouselCard1_var": "Leather wallet", "carouselCard1_websiteText": "View product", "carouselCard1_websiteType": 2, "carouselCard1_websiteURL": "https://www.example.com/p/", "carouselCard1_quickReply1": "I want this", "carouselCard2_body": "Our {{1}} - our best seller this month.", "carouselCard2_var": "Canvas backpack", "carouselCard2_websiteText": "View product", "carouselCard2_websiteType": 2, "carouselCard2_websiteURL": "https://www.example.com/p/", "carouselCard2_quickReply1": "I want this", "carouselCard3_body": "Our {{1}} - limited edition, few left.", "carouselCard3_var": "Travel mug", "carouselCard3_websiteText": "View product", "carouselCard3_websiteType": 2, "carouselCard3_websiteURL": "https://www.example.com/p/", "carouselCard3_quickReply1": "I want this" } ``` ### Example: Carousel (video) Video cards (`carouselMedia` 2) with two quick replies each and no card text. ```json { "from": "972771234567", "name": "workshop_video_carousel", "language": 2, "header": 5, "carouselMedia": 2, "carouselButtons": 3, "body": "Hi {{1}}, two short clips from our workshop - which one would you like to join?", "bodyVariableSample1": "Dana", "carouselCard1_quickReply1": "Join Sunday", "carouselCard1_quickReply2": "Send details", "carouselCard2_quickReply1": "Join Tuesday", "carouselCard2_quickReply2": "Send details" } ``` ### Example: Carousel (call + website) Each card has a call button and a website button (`carouselButtons` 5). ```json { "from": "972771234567", "name": "branches_carousel", "language": 2, "header": 5, "carouselMedia": 1, "carouselButtons": 5, "body": "Find the branch nearest to you.", "carouselCard1_body": "Tel Aviv - Herzl 1", "carouselCard1_callText": "Call the branch", "carouselCard1_callNumber": "+97231234567", "carouselCard1_websiteText": "Directions", "carouselCard1_websiteType": 1, "carouselCard1_websiteURL": "https://www.example.com/branches/tel-aviv", "carouselCard2_body": "Haifa - Hanamal 10", "carouselCard2_callText": "Call the branch", "carouselCard2_callNumber": "+97241234567", "carouselCard2_websiteText": "Directions", "carouselCard2_websiteType": 1, "carouselCard2_websiteURL": "https://www.example.com/branches/haifa" } ``` ### Example: Authentication An authentication (OTP) template, with the security text and a code that expires after 5 minutes. The text and the "Copy code" button are fixed per language; you choose only whether to add the security text (`add_security_text`) and when the code expires (`code_expiration`, in minutes). You send the code itself with each message, in Send a Template's `otp`. ![An authentication template: "123456 is your verification code", the security text, the expiration notice and a Copy code button](https://storage.99digital.online/docs/template7.png) ```json { "from": "972771234567", "name": "login_code", "language": 2, "authentication": 1, "add_security_text": 1, "code_expiration": 5 } ``` ## Responses ### 200 — The request was processed. Both a successful and a failed request answer with HTTP 200 — check `status`, and `reason` when it is FAIL. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) OK — the template was submitted to WhatsApp (Meta) for approval. Always `OK`. | | `name` | string | (one of: OK) The template name you submitted. | | `timestamp` | integer | (one of: OK) The timestamp (Unix time, in seconds). Example: `1710861707`. | | `body` | string | (one of: OK) The body message you submitted (not for an authentication template). | | `category` | integer | (one of: OK) The template category, temporarily: until the template is approved, Meta can change the category. The final, actual category is set when the template is approved, and you can get it with [Get Templates](https://docs.99digital.co.il/whatsapp-api/templates/get-templates). One of: `1` — Utility template; `2` — Marketing template; `3` — Authentication template. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `status` | string | (one of: FAIL) FAIL — the request was not carried out (template error): the template was not submitted. `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `2` — 'from' is missing, or JSON syntax error; `3` — Wrong apiKey, or the "from" number is not registered with us; `4` — 'name' is either empty, too long, invalid, or already exists in your account; `5` — 'language' code is incorrect; `6` — 'header' code is incorrect (with a coupon code, the header can't be a document); `7` — The 'body' has one of the following issues: it has more than 10 variables; the text is too long; the same variable appears more than once; there are only parameters and no regular text; it has more than two consecutive new lines (\n\n\n); `8` — 'footer' is too long or incorrect (a coupon code template can't have a footer); `9` — 'buttons' is missing or not 1, 2, 3 or 4 (2 or 4 with a coupon code); `10` — You used call to action or quick reply buttons, but didn't provide a correct callToAction code or a quick reply button; `11` — callToActionWebsiteText is invalid or too long; `12` — callToActionWebsiteType must be 1 or 2; `13` — callToActionWebsiteURL is invalid or too long (write it without the variable — it is added for you); `14` — callToActionCallText is invalid or too long; `15` — callToActionCallNumber is invalid or too long; `16` — You used quick reply buttons, but did not provide any buttons; `17` — You used more than 10 buttons; `18` — The body variables must be numbered in order, from `{{1}}` and without gaps, and the number of bodyVariableSample fields must match the variables in 'body'; `19` — WhatsApp rejected the header's sample file. Please try again or contact support; `20` — A dynamic website button (callToActionWebsiteType 2) needs its callToActionWebsiteURL; `21` — The quick reply buttons are too long; `22` — The template contains too many variables compared to the length of the rest of the text. Decrease the number of variables or increase the body length; `23` — callToActionWebsiteText2 is invalid or too long, or two buttons are the same; `24` — callToActionWebsiteType2 must be 1 or 2; `25` — callToActionWebsiteURL2 is invalid or too long; `26` — couponTitle is required, too long or wrong; `27` — couponExpiration is invalid (it must be the number 0 or 1); `30` — Unknown error, please check your syntax; `31` — Quick reply buttons must not contain any emoji; `32` — The template content is an authentication template; please change your syntax to match; `33` — add_security_text is wrong or invalid (authentication template), or WhatsApp is unable to create this kind of template — please contact support; `34` — code_expiration is wrong, invalid or not between 0 and 90 (authentication template); `35` — Permission denied to create templates, please contact our support; `36` — carouselMedia is missing or invalid; `37` — Wrong number of cards: a carousel has 2 to 10 cards, numbered from 1 without gaps; `38` — carouselCardX_body is invalid (X can be 1 to 10); `39` — carouselButtons is missing or invalid; `40` — A card variable is invalid: a card text can have one variable, `{{1}}`, on all the cards or none, and its sample (carouselCardX_var) can be up to 160 characters; `41` — carouselCardX_websiteText, _websiteType or _websiteURL is invalid or wrong; `42` — carouselCardX_quickReply1 or _quickReply2 is invalid or wrong; `43` — carouselCardX_callText or _callNumber is invalid or wrong. | #### Example: OK The template was submitted to WhatsApp for approval. ```json { "status": "OK", "name": "website_welcome", "timestamp": 1710861707, "body": "*Hello {{1}}* and thank you for joining our exclusive website store!", "category": 1, "reason": 1 } ``` #### Example: OK — carousel A carousel template is a marketing template. ```json { "status": "OK", "name": "carousel_1", "timestamp": 1788784106, "body": "Hello! See all my cards below", "category": 2, "reason": 1 } ``` #### Example: OK — authentication An authentication template has no `body` in the response. ```json { "status": "OK", "name": "login_code", "timestamp": 1710861707, "category": 3, "reason": 1 } ``` #### Example: Reason 4 The name is empty, invalid or already exists. ```json { "status": "FAIL", "reason": 4 } ``` #### Example: Reason 34 The code expiration is not between 0 and 90 minutes. ```json { "status": "FAIL", "reason": 34 } ``` --- # Send a Template Source: https://docs.99digital.co.il/whatsapp-api/templates/send-a-template Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/templates/send-a-template.md Section: WhatsApp API › Templates `POST https://api.99digital.co.il/whatsapp/v2/sendTemplate` Send a template message that you created with Create a Template, and fill in its variables, media and buttons. :::info You can use the "Send Template" API anytime you want to send a message to a client if it is more than 24 hours since the client's last message, or if you send a message to a new client. You can even send the template during the 24-hour session time if you wish. ::: ## More Remarks - You can only send template messages to private people, not groups. - If you send a template message to the client, and the client did not reply yet, and you want to send another message to them, you must use the template message again. - The billing is per "conversation". A conversation means a 24-hour session between you and the client (this 24-hour conversation session is unrelated to the 24-hour timer for template messages). - You can send unlimited template messages within the 24-hour session time of a conversation. - The 24-hour conversation session starts when you send a message to the client. - Every time the user replies, the template message session resets, which means that you don't have to use a template message during this 24-hour template message session. - If your template has variables, you must provide all the variables' data (inside the `bodyVariable` parameters). - The entire template body + variables should not exceed 1024 characters. - For a carousel template, `headerType` should be 1. - The template must be approved first — see [Create a Template](https://docs.99digital.co.il/whatsapp-api/templates/create-a-template) and [Get Templates](https://docs.99digital.co.il/whatsapp-api/templates/get-templates). Fill in only what your template has: its variables, its header media, its dynamic website buttons, its coupon code or its authentication code. ## Settings | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/sendTemplate` | | Method | JSON via POST | | Key | Value | | --- | --- | | apiKey | Your API key for the service | ## Body | Parameter | Description / Example | Mandatory | | --- | --- | --- | | from | Your WhatsApp account. International number without `+`. For example: `972771234567` | yes | | to | The number you want to send the message to. For example: `972501234567`
or
The user id you want to send the message to. For example: `IL.1605856887361213` — for a client who hides their number behind a WhatsApp [username](https://docs.99digital.co.il/whatsapp-api/information/username); it arrives as `from_id` in your webhook. | yes | | name | The template name | yes | | headerType | `1` for none
`2` for text with a variable
`3` for image
`4` for video
`5` for document | yes | | headerVariable | In case your template has a text header with a variable (`headerType` 2), this is the value of that variable, without special characters such as `**`. | only if you used `2` as headerType | | headerLink | In case you used an image/video/document header, this is the link to the image, video or document.
Limits:
image - 5 MB
document - 100 MB
video - 16 MB | only if you used `3`/`4`/`5` as headerType | | bodyVariable1-10 | In case you used variables `{{1}}` to `{{10}}` in your body when submitting the template, this is where you provide them. Each item as a variable (1 to 10), not an array.
Two important rules:
1. You can't use `\n` (a new line) inside a variable.
2. You can't use 4 or more consecutive spaces inside a variable. | only if you used variables in the 'body' | | websiteVariable | In case you used a call to action button, and you chose a dynamic "website" with the variable `{{1}}`, this is where you use it. You should put the variable information, not the full website address. | no | | websiteVariable2 | In case you used a second website for the call to action button, and you used a dynamic variable, this is where you provide the `{{1}}` for the second website. You should put the variable information, not the full website address. | no | | couponCode | In case you used a coupon code in the template, here you put the code. 15 characters maximum. | no | | couponExpiration | In case you used a coupon code in the template, and set 'true' for code expiration, here you put the Unix timestamp (seconds) of the date and time that the code will no longer be available. A Unix timestamp is the same in every time zone, so convert your local time (for example Israel time, GMT+2 or GMT+3) to it. | no | | pdfFilename | In case you used `headerType` as document, and provided a document link in `headerLink`, here you can put the file name that will show for the end user when receiving the PDF file.
Priority:
1. If `pdfFilename` is provided, it will be used.
2. If `pdfFilename` is not provided by you, we will use the PDF file name from the `headerLink` URL directly.
3. If the `headerLink` file name is not available for any reason, we will put the default text: "קובץ מצורף - לחץ כאן" | no | | showRequest | You can get back in the response an object with all the request you sent (without the `apiKey`).
Default is off (`0`).
`1` - enable | no | | otp | If your template is an authentication template, here is where you provide the code.
Maximum 15 characters (can be a combination of numbers, letters, special characters etc.)
Note: an authentication template is visible only on a mobile phone. If the end user is using WhatsApp Web, the code will not be available to them. | Only if an authentication template is used | | localStorage | Whenever you provide a `headerLink` URL or carousel card URLs, we deliver this URL to WhatsApp. They download the link in order to deliver it with your template.
If for any reason your file link is not accessible by Meta and open to the internet, you can request our servers to download the file and upload it to WhatsApp, so WhatsApp doesn't need your own link.
Default value is `0` (disable).
`1` - enable.
Please note that using this feature may delay the response from our server, due to the operation described above. | no | | quickReplyX_id | If you used quickReply (1-10) buttons during the template creation, you can provide an ID for each button, which will be returned on the webhook if a client clicks it.
Example: you created two quick reply buttons in the template, using quickReply1 = "Yes" and quickReply2 = "No". You can send `quickReply1_id` and `quickReply2_id` as strings; the id and the template name together can be up to 252 characters.
This will return as the `caption` when the incoming message arrives, if the end user clicked that button. | no | | carouselCardX_headerLink | X represents the card number (for example `carouselCard1_headerLink`).
You must provide the full URL of either the image (up to 5 MB) or the video (up to 16 MB) to send for the card.
You must provide this URL for every card you used when creating the template. | Only if you send a carousel template | | carouselCardX_bodyVariable | X represents the card number (for example `carouselCard1_bodyVariable`).
The card text, with the variable in it, must be up to 160 characters.
You must provide this for each of the cards. | Only if you send a carousel template, and you added a variable in the card | | carouselCardX_websiteVariable | X represents the card number (for example `carouselCard1_websiteVariable`).
Provide only the variable, not the full website.
You must provide this for each of the cards. | Only if you send a carousel template, and you added a dynamic website button | | carouselCardX_quickReply1_id | X represents the card number (for example `carouselCard1_quickReply1_id`).
If a client clicks a quick reply button in a carousel, you can provide the button id and get it back on the webhook. | no | | carouselCardX_quickReply2_id | X represents the card number (for example `carouselCard1_quickReply2_id`).
If a client clicks a quick reply button in a carousel, you can provide the button id and get it back on the webhook. | no | ## Body example On the Create a Template page, in the first example, we created a template named "website_welcome", in English, without a header, and with 6 variables in the body, which looks like this: ```text *Hello {{1}}* and thank you for joining our exclusive website store!\nOur company has many secrets to discover.\nFor future connection, we received your phone number: {{2}} and your email address: {{3}}.\nYou can find shirts, hats, shoes and gloves at discounted prices. Hold on, wait a minute, i found something interesting! just for this week we offer: {{4}} at discounted price: {{5}} only when you buy it online or in-store shop at: {{6}}.\nWhat would you like to discover? ``` This is how you should send the template to your customer: ```json { "from": "972771234567", "to": "972509876543", "name": "website_welcome", "headerType": 1, "bodyVariable1": "John", "bodyVariable2": "0509876543", "bodyVariable3": "john@example.com", "bodyVariable4": "Shoes and Hats", "bodyVariable5": "50% off", "bodyVariable6": "Israel", "showRequest": 0 } ``` ## Another body example For a template named "website_signup_image_logo", in Hebrew, with an image header, and 2 variables in the body, which looks like this: ```text תודה שהצטרפת אלינו. קוד הכניסה שלך הוא: {{1}} אנחנו רוצים להודות לך ולברך אותך בברכת התחלה חדשה. בברכה, צוות {{2}} ``` the request will look like this: ```json { "from": "972771234567", "to": "972509876543", "name": "website_signup_image_logo", "headerType": 3, "headerLink": "https://storage.99digital.online/samples/hello.png", "bodyVariable1": "43143", "bodyVariable2": "קידום אתרים" } ``` ## Response ```json { "status": "OK", "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "timestamp": 1600115719, "from": "972771234567", "to": "972509876543", "body": "Hello John Thank you for joining our exclusive website", "templateTimeLeft": 400, "conversationTimeLeft": 0, "reason": 1 } ``` ## Response-Explain | Parameter | Description | | --- | --- | | status | `OK` or `FAIL`.
**Note:** an OK status doesn't mean the message arrived to the end user. It only means that the system received your request. You should listen to [webhooks](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) to see the status of your message. | | unique | Unique ID for any message. The webhooks about this message carry the same ID. | | timestamp | Time stamp (Unix time, in seconds) | | from | Your WhatsApp account | | to | The number or the user id that the message was sent to | | body | The body of the template, including the variables | | templateTimeLeft | Amount of minutes left since the client's last message. If passed, you must use a template message. This value resets every time the client sends you a message.
Even though you sent a template now, if the templateTimeLeft value is more than 0, it means that you don't have to use a template. | | conversationTimeLeft | No longer in use: the conversation time left is part of the webhook instead. Until it is removed in a future update, it is always `0`. | | originalRequest | Original request object, if you enabled this in `showRequest` when sending the request. Empty fields are left out. | | reason | The status explanation — see the table below. | | reason | Description | | --- | --- | | 1 | Not FAIL. The status is OK. | | 2 | `from` is missing, or JSON syntax error | | 3 | Wrong apiKey, or the "from" number is not registered with us | | 4 | `to` is either empty or in a wrong number format | | 6 | WhatsApp error or template rejected | | 12 | The template name does not exist | | 14 | `headerType` is missing or not `1`, `2`, `3`, `4` or `5` | | 15 | You must provide `headerVariable` for this template, without special characters such as `**` | | 17 | The number of `bodyVariable` fields must be equal to the number of variables used when creating the template, and they must not be empty | | 18 | You must provide `websiteVariable` for this template | | 19 | A body variable is too long: the template body with its variables must not exceed 1024 characters | | 20 | The coupon code is too long (more than 15 characters) or invalid | | 21 | WhatsApp has rejected the sending of the template due to high-volume sending. Please try to send again. | | 22 | Rate limit error, try again | | 23 | `otp` is required for an authentication template and must not exceed 15 characters | | 24 | When `localStorage` is used, the `headerLink` provided is incorrect or access is denied | | 28 | A `quickReplyX_id` is invalid or too long | | 29 | The cards you provided in `carouselCardX` don't match the cards of the template — for example, a card number higher than the number of cards the template was created with | | 30 | `carouselCardX_bodyVariable` is missing or invalid (relevant for any of the cards) | | 31 | `carouselCardX_headerLink` is missing, invalid or wrong | | 32 | `carouselCardX_websiteVariable` is missing, invalid or wrong | | 33 | `carouselCardX_quickReply1_id` or `carouselCardX_quickReply2_id` is invalid or wrong | | 34 | When `localStorage` is used, a `carouselCardX_headerLink` provided is incorrect or access is denied | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | Your WhatsApp account. International number without `+`. Example: `972771234567`. | | `to` | string | Yes | The number you want to send the message to, in international format, digits only — or the user id you want to send the message to, for a client who hides their number behind a WhatsApp username (it arrives as `from_id` in your webhook). Example: `972501234567`. | | `name` | string | Yes | The template name. Example: `website_welcome`. | | `headerType` | integer | Yes | The template's header. One of: `1` — None — also for a carousel template; `2` — Text, with a variable — provide `headerVariable`; `3` — Image — provide `headerLink`; `4` — Video — provide `headerLink`; `5` — Document — provide `headerLink`. Example: `1`. | | `headerVariable` | string | No | For a template with a text header that has a variable (`headerType` 2): the value of that variable, without special characters such as `**`. Example: `Order 4711`. | | `headerLink` | string (uri) | No | In case your template has an image, video or document header, this is the link to the image, video or document. Limits: image — 5 MB; document — 100 MB; video — 16 MB. Required only when `headerType` is 3, 4 or 5. Example: `https://storage.99digital.online/samples/hello.png`. | | `pdfFilename` | string | No | In case you used `headerType` 5 (document) and provided a document link in `headerLink`, here you can put the file name that the client sees when receiving the PDF file. Priority: 1. if `pdfFilename` is provided, it is used; 2. if you don't provide it, the PDF file name from the `headerLink` URL is used; 3. if the `headerLink` file name is not available for any reason, the default text "קובץ מצורף - לחץ כאן" is used. Example: `Invoice 4711 - August 2026`. | | `bodyVariable1` | string | No | In case you used variables `{{1}}` to `{{10}}` in your body when submitting the template, this is where you provide them — one field per variable, `bodyVariable1` to `bodyVariable10`, not an array. Two important rules: you can't use `\n` (a new line) inside a variable, and you can't use 4 or more consecutive spaces inside a variable. Example: `John`. | | `websiteVariable` | string | No | In case your template has a dynamic website button (with the variable `{{1}}`), this is where you provide it. Put the variable information, not the full website address. Example: `inv-4711`. | | `websiteVariable2` | string | No | In case your template has a second website button that is dynamic (with the variable `{{1}}`), this is where you provide the `{{1}}` of the second website. Put the variable information, not the full website address. Example: `bk-88213`. | | `couponCode` | string | No | In case your template has a coupon code button, here you put the code. Up to 15 characters. Max length: 15. Example: `SAVE20`. | | `couponExpiration` | integer | No | In case your template has a coupon code button with an expiration time: the moment the code is no longer available, as a Unix timestamp in seconds. A Unix timestamp is the same in every time zone — convert your local time (for example Israel time, GMT+2 or GMT+3) to it. Example: `1790500000`. | | `otp` | string | No | If your template is an authentication template, here is where you provide the code — up to 15 characters (any combination of numbers, letters, special characters etc.). Note: an authentication template is visible only on a mobile phone; if the client uses WhatsApp Web, the code will not be available to them. Max length: 15. Example: `482913`. | | `quickReply1_id` | string | No | If your template has quick reply buttons (`quickReply1` to `quickReply10` when you created it), you can give each button an id that is returned on the webhook, as the `caption`, when the client clicks it: `quickReply1_id` to `quickReply10_id`. For example, for the buttons "Yes" and "No", send `quickReply1_id` and `quickReply2_id`. The id and the template name together can be up to 252 characters. Example: `CONFIRM`. | | `carouselCard1_headerLink` | string (uri) | No | For a carousel template: the full link to the image (up to 5 MB) or video (up to 16 MB) of card 1. You must provide it for every card of the template: `carouselCard1_headerLink`, `carouselCard2_headerLink` and so on. Example: `https://storage.99digital.online/samples/hello.png`. | | `carouselCard1_bodyVariable` | string | No | For a carousel template whose cards have a variable: the variable of card 1. The card text with it can be up to 160 characters. You must provide it for each of the cards. Example: `Leather wallet`. | | `carouselCard1_websiteVariable` | string | No | For a carousel template with a dynamic website button: the variable of card 1 — only the variable, not the full website. You must provide it for each of the cards. Example: `wallet-01`. | | `carouselCard1_quickReply1_id` | string | No | For a carousel template with quick reply buttons: an id for the first quick reply button of card 1, returned on the webhook when the client clicks it. Example: `WANT_WALLET`. | | `carouselCard1_quickReply2_id` | string | No | For a carousel template with quick reply buttons: an id for the second quick reply button of card 1, returned on the webhook when the client clicks it. Example: `MORE_WALLET`. | | `localStorage` | integer | No | We deliver your `headerLink` (or carousel card links) to WhatsApp, and WhatsApp downloads the file in order to deliver it with your template. If your link is not accessible to WhatsApp or not open to the internet, enable this: we download the file ourselves and upload it to WhatsApp, so WhatsApp doesn't need your link. Please note that using this feature may delay the response from our server. One of: `0` — Off — WhatsApp downloads the file from your link; `1` — Enable — we upload the file to WhatsApp for you. Default: `0`. | | `showRequest` | integer | No | You can get back in the response an object with the request you sent (without the `apiKey`). One of: `0` — Off; `1` — Enable — the response includes `originalRequest`. Default: `0`. | ### Example: Body variables A template with 6 variables in the body, and no header. The Create a Template example `website_welcome` is a template in English, without a header, and with 6 variables in the body: > \*Hello {{1}}\* and thank you for joining our exclusive website store! Our company has many secrets to discover. For future connection, we received your phone number: {{2}} and your email address: {{3}}. You can find shirts, hats, shoes and gloves at discounted prices. Hold on, wait a minute, i found something interesting! just for this week we offer: {{4}} at discounted price: {{5}} only when you buy it online or in-store shop at: {{6}}. What would you like to discover? This is how you send it to your customer: ```json { "from": "972771234567", "to": "972509876543", "name": "website_welcome", "headerType": 1, "bodyVariable1": "John", "bodyVariable2": "0509876543", "bodyVariable3": "john@example.com", "bodyVariable4": "Shoes and Hats", "bodyVariable5": "50% off", "bodyVariable6": "Israel", "showRequest": 0 } ``` ### Example: Image header (Hebrew) A Hebrew template with an image header and 2 variables. A template named `website_signup_image_logo`, in Hebrew, with an image header and 2 variables in the body: > תודה שהצטרפת אלינו. > > קוד הכניסה שלך הוא: {{1}} > > אנחנו רוצים להודות לך ולברך אותך בברכת התחלה חדשה. > > בברכה, צוות {{2}} The request looks like this: ```json { "from": "972771234567", "to": "972509876543", "name": "website_signup_image_logo", "headerType": 3, "headerLink": "https://storage.99digital.online/samples/hello.png", "bodyVariable1": "43143", "bodyVariable2": "קידום אתרים" } ``` ### Example: No variables A text template without variables. ```json { "from": "972771234567", "to": "972501234567", "name": "store_open_today", "headerType": 1 } ``` ### Example: Video + quick reply ids A video header, and an id for each quick reply button — the id of the button the client clicks comes back in the webhook. ```json { "from": "972771234567", "to": "972501234567", "name": "promo_video", "headerType": 4, "headerLink": "https://storage.99digital.online/samples/meditation.mp4", "bodyVariable1": "Dana", "bodyVariable2": "espresso machine", "quickReply1_id": "MORE_INFO", "quickReply2_id": "BOOK_DEMO", "quickReply3_id": "NOT_INTERESTED" } ``` ### Example: Document + dynamic website A PDF header with the file name the client sees, and the variable of a dynamic website button. ```json { "from": "972771234567", "to": "972501234567", "name": "invoice_pdf", "headerType": 5, "headerLink": "https://storage.99digital.online/samples/headerSample.pdf", "pdfFilename": "Invoice 4711 - August 2026", "bodyVariable1": "Dana Levi", "bodyVariable2": "August 2026", "bodyVariable3": "350 USD", "websiteVariable": "inv-4711" } ``` ### Example: Two websites A template with two website buttons, where only the second one is dynamic — so only `websiteVariable2` is sent. ```json { "from": "972771234567", "to": "972501234567", "name": "booking_links", "headerType": 1, "bodyVariable1": "Dana", "bodyVariable2": "Friday 20:00", "websiteVariable2": "bk-88213" } ``` ### Example: Coupon code A coupon code button, with the time the code expires. ```json { "from": "972771234567", "to": "972501234567", "name": "weekend_coupon", "headerType": 3, "headerLink": "https://storage.99digital.online/samples/hello.png", "bodyVariable1": "Dana", "bodyVariable2": "20%", "couponCode": "SAVE20", "couponExpiration": 1790500000 } ``` ### Example: Authentication code An authentication template — the code goes in `otp`. ```json { "from": "972771234567", "to": "972501234567", "name": "login_code", "headerType": 1, "otp": "482913" } ``` ### Example: Carousel A carousel template with 3 image cards: a link, a variable, a website variable and a quick reply id for every card. ```json { "from": "972771234567", "to": "972501234567", "name": "products_carousel", "headerType": 1, "bodyVariable1": "Dana", "carouselCard1_headerLink": "https://storage.99digital.online/samples/hello.png", "carouselCard1_bodyVariable": "Leather wallet", "carouselCard1_websiteVariable": "wallet-01", "carouselCard1_quickReply1_id": "WANT_WALLET", "carouselCard2_headerLink": "https://storage.99digital.online/samples/hello.png", "carouselCard2_bodyVariable": "Canvas backpack", "carouselCard2_websiteVariable": "backpack-02", "carouselCard2_quickReply1_id": "WANT_BACKPACK", "carouselCard3_headerLink": "https://storage.99digital.online/samples/hello.png", "carouselCard3_bodyVariable": "Travel mug", "carouselCard3_websiteVariable": "mug-03", "carouselCard3_quickReply1_id": "WANT_MUG" } ``` ### Example: Carousel (video) A carousel template with 2 video cards and two quick reply buttons on each card, with `localStorage`. ```json { "from": "972771234567", "to": "972501234567", "name": "workshop_video_carousel", "headerType": 1, "localStorage": 1, "bodyVariable1": "Dana", "carouselCard1_headerLink": "https://storage.99digital.online/samples/meditation.mp4", "carouselCard1_quickReply1_id": "JOIN_SUN", "carouselCard1_quickReply2_id": "DETAILS_SUN", "carouselCard2_headerLink": "https://storage.99digital.online/samples/meditation.mp4", "carouselCard2_quickReply1_id": "JOIN_TUE", "carouselCard2_quickReply2_id": "DETAILS_TUE" } ``` ### Example: Text header A template with a text header that has a variable (a template created in WhatsApp Manager). ```json { "from": "972771234567", "to": "972501234567", "name": "your_template_with_text_header", "headerType": 2, "headerVariable": "Order 4711", "bodyVariable1": "Dana" } ``` ### Example: To user id For a client who hides their number behind a WhatsApp username: send to the user id from your webhook. ```json { "from": "972771234567", "to": "IL.1605856887361213", "name": "order_received", "headerType": 1, "bodyVariable1": "Dana", "bodyVariable2": "4711" } ``` ### Example: localStorage We upload the header image to WhatsApp for you, for a link that WhatsApp can't reach. ```json { "from": "972771234567", "to": "972501234567", "name": "summer_offer_image", "headerType": 3, "headerLink": "https://storage.99digital.online/samples/hello.png", "localStorage": 1, "bodyVariable1": "Dana", "bodyVariable2": "20%" } ``` ### Example: showRequest Get the request back in the response, as `originalRequest`. ```json { "from": "972771234567", "to": "972501234567", "name": "order_received", "headerType": 1, "bodyVariable1": "Dana", "bodyVariable2": "4711", "showRequest": 1 } ``` ## Responses ### 200 — The request was processed. Both a successful and a failed request answer with HTTP 200 — check `status`, and `reason` when it is FAIL. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) OK status doesn't mean the message arrived to the end user, it only means that the system received your request. You should listen to [webhooks](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) to see the status of your message. Always `OK`. | | `unique` | string | (one of: OK) Unique ID for any message. The webhooks about this message carry the same ID. Example: `19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ`. | | `timestamp` | integer | (one of: OK) Time stamp of the message (Unix time, in seconds). Example: `1600115719`. | | `from` | string | (one of: OK) Your WhatsApp account. Example: `972771234567`. | | `to` | string | (one of: OK) The number or the user id that the message was sent to. Example: `972501234567`. | | `body` | string | (one of: OK) The body of the template, including the variables. | | `templateTimeLeft` | integer | (one of: OK) Amount of minutes left since the client's last message. If passed, you must use a template message. This value resets every time the client sends you a message. Even though you sent a template now, if templateTimeLeft is more than 0, you don't have to use a template. Example: `0`. | | `conversationTimeLeft` | integer | (one of: OK) **Deprecated.** This value is no longer in use: the conversation time left is part of the webhook instead. Until it is removed in a future update, it is always 0. Example: `0`. | | `originalRequest` | object | (one of: OK) Original request object, if you enabled this in `showRequest` when sending the request. Empty fields are left out. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `status` | string | (one of: FAIL) FAIL — the request was not carried out. `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `2` — 'from' is missing, or JSON syntax error; `3` — Wrong apiKey, or the "from" number is not registered with us; `4` — 'to' is either empty or wrong number format; `6` — WhatsApp error or template rejected; `12` — The template name does not exist; `14` — 'headerType' is missing or not 1, 2, 3, 4 or 5; `15` — You must provide headerVariable for this template, without special characters such as **; `17` — The number of bodyVariable fields must be equal to the number of variables used when creating the template, and they must not be empty; `18` — You must provide websiteVariable for this template; `19` — A body variable is too long — the template body with its variables must not exceed 1024 characters; `20` — The coupon code is too long or invalid; `21` — WhatsApp has rejected the sending of the template due to high volume sending. Please try to send again; `22` — Rate limit error, try again; `23` — otp is required for an authentication template and must not exceed 15 characters; `24` — When localStorage is used: the headerLink provided is incorrect or access is denied; `28` — A quickReplyX_id is invalid or too long; `29` — The cards you provided in carouselCardX don't match the cards of the template — for example, a card number higher than the number of cards the template was created with; `30` — carouselCardX_bodyVariable is missing or invalid (for any of the cards); `31` — carouselCardX_headerLink is missing, invalid or wrong; `32` — carouselCardX_websiteVariable is missing, invalid or wrong; `33` — carouselCardX_quickReply1_id or _quickReply2_id is invalid or wrong; `34` — When localStorage is used: a carouselCardX_headerLink provided is incorrect or access is denied. | #### Example: OK The system received your request. `body` is the template text with your variables. ```json { "status": "OK", "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "timestamp": 1600115719, "from": "972771234567", "to": "972509876543", "body": "*Hello John* and thank you for joining our exclusive website store!\nOur company has many secrets to discover.\nFor future connection, we received your phone number: 0509876543 and your email address: john@example.com.\nYou can find shirts, hats, shoes and gloves at discounted prices. Hold on, wait a minute, i found something interesting! just for this week we offer: Shoes and Hats at discounted price: 50% off only when you buy it online or in-store shop at: Israel.\nWhat would you like to discover?", "templateTimeLeft": 0, "conversationTimeLeft": 0, "reason": 1 } ``` #### Example: OK + showRequest With `showRequest` set to 1, the response includes `originalRequest`. ```json { "status": "OK", "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "timestamp": 1600115719, "from": "972771234567", "to": "972501234567", "body": "Hi Dana, your order 4711 was received. We will let you know when it ships.", "templateTimeLeft": 0, "conversationTimeLeft": 0, "originalRequest": { "from": "972771234567", "to": "972501234567", "name": "order_received", "headerType": 1, "bodyVariable1": "Dana", "bodyVariable2": "4711" }, "reason": 1 } ``` #### Example: Reason 12 The template name does not exist. ```json { "status": "FAIL", "reason": 12 } ``` #### Example: Reason 17 The number of variables doesn't match the template. ```json { "status": "FAIL", "reason": 17 } ``` #### Example: Reason 23 The authentication template needs its code in `otp`. ```json { "status": "FAIL", "reason": 23 } ``` --- # Send Multi Template Source: https://docs.99digital.co.il/whatsapp-api/templates/send-multi-template Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/templates/send-multi-template.md Section: WhatsApp API › Templates `POST https://api.99digital.co.il/whatsapp/v2/sendMultiTemplate` Send the same template to many clients in one request, with the personal variables of each client. The Send Multi Template endpoint allows you to send the same template to multiple destinations in a single request. This endpoint is very similar to [Send a Template](https://docs.99digital.co.il/whatsapp-api/templates/send-a-template); the only difference is that some body parameters are now part of an array, allowing you to send them all at once. What is the same for everyone — the template, its header and its carousel cards — is sent once; what is personal — the number, the body variables, the website variables, the coupon code and the quick reply ids — goes in each destination. This page assumes you know how to handle `bodyVariable1`-`10`, `websiteVariable`/`2` and `couponCode` and what they mean. For more reference, see the [Send a Template](https://docs.99digital.co.il/whatsapp-api/templates/send-a-template) endpoint first. ## More Remarks - You can only send template messages to private people, not groups. - If you send a template message to the client, and the client did not reply yet, and you want to send another message to them, you must use the template message again. - If your template has variables, you must provide all the variables' data (inside the `bodyVariable` parameters inside the destinations). - The entire template body + variables should not exceed 1024 characters. - The sendMultiTemplate endpoint doesn't allow you to send an authentication code template. - For a carousel template, `headerType` should be 1. - A destination with a mistake (a wrong number, a too long coupon code) is rejected on its own, with its `reason`; the other destinations are sent. ## Settings | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/sendMultiTemplate` | | Method | JSON via POST | | Key | Value | | --- | --- | | apiKey | Your API key for the service | ## Body | Parameter | Description / Example | Mandatory | | --- | --- | --- | | from | Your WhatsApp account. International number without `+`. For example: `972771234567` | yes | | name | The template name | yes | | destinations | An array of objects that contain: `to`, `bodyVariable1`-`10`, `websiteVariable`, `websiteVariable2`, `couponCode` and `quickReplyX_id`.
It should be sent as in the example below, depending on the variables you used when you created the template. `to` is required (the number in international format, digits only, or the user id of a client who hides their number behind a WhatsApp username). | yes | | headerType | `1` for none
`2` for text with a variable
`3` for image
`4` for video
`5` for document | yes | | headerVariable | In case your template has a text header with a variable (`headerType` 2), this is the value of that variable — the same for every destination — without special characters such as `**`. | only if you used `2` as headerType | | headerLink | In case you used an image/video/document header, this is the link to the image, video or document.
Limits:
image - 5 MB
document - 100 MB
video - 16 MB | only if you used `3`/`4`/`5` as headerType | | couponExpiration | In case you used a coupon code in the template, and set 'true' for code expiration, here you put the Unix timestamp (seconds) of the date and time that the code will no longer be available. A Unix timestamp is the same in every time zone, so convert your local time (for example Israel time, GMT+2 or GMT+3) to it. | no | | pdfFilename | In case you used `headerType` as document, and provided a document link in `headerLink`, here you can put the file name that will show for the end user when receiving the PDF file.
Priority:
1. If `pdfFilename` is provided, it will be used.
2. If `pdfFilename` is not provided by you, we will use the PDF file name from the `headerLink` URL directly.
3. If the `headerLink` file name is not available for any reason, we will put the default text: "קובץ מצורף - לחץ כאן" | no | | showRequest | You can get back in the response an object with all the request you sent (without the `apiKey`).
Default is off (`0`).
`1` - enable | no | | localStorage | Whenever you provide a `headerLink` URL (or carousel card URLs), we deliver this URL to WhatsApp. They download the link in order to deliver it with your template.
If for any reason your file link is not accessible by Meta and open to the internet, you can request us to download the file and upload it to WhatsApp, so WhatsApp doesn't need your own link. The file is uploaded once and used for every destination; if the upload fails, your link is used.
Default value is `0` (disable).
`1` - enable.
Please note that using this feature may delay the response from our server, due to the operation described above. | no | | showBody | Whether or not to show the body in every item of the `destinations` array of the response.
`1` = show
`0` = don't show
Default is `0`.
For a long list, the entire `body` in the response can be long, and the full response might reach a very high size in MB. So consider carefully whether to enable the body in your response or not. | no | | carouselCardX_headerLink | X represents the card number (for example `carouselCard1_headerLink`).
You must provide the full URL of either the image (up to 5 MB) or the video (up to 16 MB) to send for the card.
You must provide this URL for every card you used when creating the template. | Only if you send a carousel template | | carouselCardX_bodyVariable | X represents the card number (for example `carouselCard1_bodyVariable`).
The card text, with the variable in it, must be up to 160 characters. You must provide this for each of the cards. | Only if you send a carousel template, and you added a variable in the card | | carouselCardX_websiteVariable | X represents the card number (for example `carouselCard1_websiteVariable`).
Provide only the variable, not the full website.
You must provide this for each of the cards. | Only if you send a carousel template, and you added a dynamic website button | | carouselCardX_quickReply1_id | X represents the card number (for example `carouselCard1_quickReply1_id`).
If a client clicks a quick reply button in a carousel, you can provide the button id and get it back on the webhook. | no | | carouselCardX_quickReply2_id | X represents the card number (for example `carouselCard1_quickReply2_id`).
If a client clicks a quick reply button in a carousel, you can provide the button id and get it back on the webhook. | no | The `destinations` array should be sent like this, depending on the variables you used when you created the template (`to` is required): ```json [ { "to": "972501234567", "bodyVariable1": "Hello John", "bodyVariable2": "Special offer", "websiteVariable": "value1", "websiteVariable2": "value2", "couponCode": "SAVE20", "quickReply1_id": "button-id" }, { "to": "972501234568", "bodyVariable1": "Hello Jane", "bodyVariable2": "Different offer", "websiteVariable": "param1=value2", "websiteVariable2": "param1=value2", "couponCode": "SAVE30", "quickReply1_id": "button-id" } ] ``` ## Body example A sample request to send a multi template, with 3 body variables, to 2 numbers: ```json { "from": "972771234567", "name": "welcome_to_the_jungle", "headerType": 1, "destinations": [ { "to": "972501234567", "bodyVariable1": "one", "bodyVariable2": "two", "bodyVariable3": "three", "quickReply1_id": "button-1-id" }, { "to": "972509875654", "bodyVariable1": "four", "bodyVariable2": "five", "bodyVariable3": "six" } ], "showRequest": 0, "showBody": 1 } ``` ## Response ```json { "status": "OK", "timestamp": 1757610296, "from": "972771234567", "accepted": 2, "rejected": 0, "failed": 0, "destinations": [ { "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "to": "972501234567", "body": "שלום one! *מבצע חדש* על המוצרים שבחרת.\nבדקו two מחיר, דברו איתנו, או בחרו three אפשרות מהירה." }, { "unique": "5ec46920d615aa3-x3c15a2dff350a1-3SIZZq8h9JVdA53", "to": "972509875654", "body": "שלום four! *מבצע חדש* על המוצרים שבחרת.\nבדקו five מחיר, דברו איתנו, או בחרו six אפשרות מהירה." } ], "reason": 1 } ``` ## Response-Explain | Parameter | Description | | --- | --- | | status | `OK` or `FAIL`.
**Note:** an OK status doesn't mean the messages arrived to the end users. It only means that the system received your request. You should listen to [webhooks](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) to see the status of your messages. | | from | Your WhatsApp account | | accepted | How many destinations the request was processed for successfully. Integer. | | rejected | How many destinations the request was rejected for (wrong number, wrong `to`, wrong variables). Fix them and try again. Integer. | | failed | How many destinations the request failed for (system error, WhatsApp error). Try again. Integer. | | timestamp | Timestamp of the sending (Unix time, in seconds) | | destinations | An array, one item per destination in the order you sent them, that contains 3 keys:
`unique` - the unique ID of the message sent
`to` - the number that the message was sent to
`body` - the body of the template, including the variables (only with `showBody` set to `1`)
A destination that was rejected or failed has `to` and a `reason` instead (no `unique`). | | originalRequest | Original request object, if you enabled this in `showRequest` when sending the request. | | reason | The status explanation — see the table below. | | reason | Description | | --- | --- | | 1 | Not FAIL. The status is OK. | | 2 | `from` is missing, or JSON syntax error | | 3 | Wrong apiKey, or the "from" number is not registered with us | | 6 | WhatsApp error or template rejected | | 12 | The template name does not exist | | 14 | `headerType` is missing or not `1`, `2`, `3`, `4` or `5` | | 15 | You must provide `headerVariable` for this template, without special characters such as `**` | | 21 | WhatsApp has rejected the sending of the template due to high-volume sending. Please try to send again. | | 22 | The message to this destination could not be sent — try again. This error is per destination, in `destinations`. | | 23 | The `destinations` array is required and must be a non-empty array | | 24 | At least one destination is required | | 25 | One of the destinations is not an object. This error is per destination. | | 26 | One of the destinations is missing the `to` field, or `to` is empty or in a wrong format. This error is per destination, not for the entire list — unless all the destinations have it: then the whole request fails with reason 26, and the response also carries `timestamp`, `from` and `destinations` (every destination with its `to` and `reason`). | | 27 | You provided a `couponCode` in the destination, but it's too long (15 characters maximum). This error is per destination. | | 28 | A `quickReplyX_id` of the destination is invalid or too long. This error is per destination. | | 29 | The carousel cards don't match the template created | | 30 | `carouselCardX_bodyVariable` is missing or invalid (relevant for any of the cards) | | 31 | `carouselCardX_headerLink` is missing, invalid or wrong | | 32 | `carouselCardX_websiteVariable` is missing, invalid or wrong | | 33 | `carouselCardX_quickReply1_id` or `carouselCardX_quickReply2_id` is invalid or wrong | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | Your WhatsApp account. International number without `+`. Example: `972771234567`. | | `name` | string | Yes | The template name. Example: `welcome_to_the_jungle`. | | `destinations` | array of object | Yes | An array of objects, one per client, that contain `to`, `bodyVariable1`-`10`, `websiteVariable`, `websiteVariable2`, `couponCode` and the `quickReplyX_id` fields — depending on the variables you used when you created the template. `to` is required. Min items: 1. | | `destinations[].to` | string | Yes | The number you want to send the template to, in international format, digits only — or the user id, for a client who hides their number behind a WhatsApp username. Example: `972501234567`. | | `destinations[].bodyVariable1` | string | No | The body variables of this destination, `bodyVariable1` to `bodyVariable10` — as in Send a Template. Example: `Hello John`. | | `destinations[].websiteVariable` | string | No | In case your template has a dynamic website button (with the variable `{{1}}`): the variable for this destination. Put the variable information, not the full website address. Example: `value1`. | | `destinations[].websiteVariable2` | string | No | In case your template has a second website button that is dynamic: the `{{1}}` of the second website for this destination. Put the variable information, not the full website address. Example: `value2`. | | `destinations[].couponCode` | string | No | The coupon code for this destination — up to 15 characters. Max length: 15. Example: `SAVE20`. | | `destinations[].quickReply1_id` | string | No | The quick reply button ids for this destination, `quickReply1_id` to `quickReply10_id` — as in Send a Template. Example: `button-id`. | | `headerType` | integer | Yes | The template's header, the same for every destination. One of: `1` — None — also for a carousel template; `2` — Text, with a variable — provide `headerVariable`; `3` — Image — provide `headerLink`; `4` — Video — provide `headerLink`; `5` — Document — provide `headerLink`. Example: `1`. | | `headerVariable` | string | No | For a template with a text header that has a variable (`headerType` 2): the value of that variable, the same for every destination, without special characters such as `**`. Example: `Order 4711`. | | `headerLink` | string (uri) | No | In case your template has an image, video or document header, this is the link to the image, video or document, the same for every destination. Limits: image — 5 MB; document — 100 MB; video — 16 MB. Required only when `headerType` is 3, 4 or 5. Example: `https://storage.99digital.online/samples/hello.png`. | | `pdfFilename` | string | No | In case you used `headerType` 5 (document) and provided a document link in `headerLink`, here you can put the file name that the client sees when receiving the PDF file. Priority: 1. if `pdfFilename` is provided, it is used; 2. if you don't provide it, the PDF file name from the `headerLink` URL is used; 3. if the `headerLink` file name is not available for any reason, the default text "קובץ מצורף - לחץ כאן" is used. Example: `Invoice August 2026`. | | `couponExpiration` | integer | No | In case your template has a coupon code button with an expiration time: the moment the codes are no longer available, as a Unix timestamp in seconds — the same for every destination. A Unix timestamp is the same in every time zone — convert your local time (for example Israel time, GMT+2 or GMT+3) to it. Example: `1790500000`. | | `carouselCard1_headerLink` | string (uri) | No | For a carousel template: the full link to the image (up to 5 MB) or video (up to 16 MB) of card 1, the same for every destination. You must provide it for every card of the template: `carouselCard1_headerLink`, `carouselCard2_headerLink` and so on. Example: `https://storage.99digital.online/samples/hello.png`. | | `carouselCard1_bodyVariable` | string | No | For a carousel template whose cards have a variable: the variable of card 1, the same for every destination. The card text with it can be up to 160 characters. You must provide it for each of the cards. Example: `Leather wallet`. | | `carouselCard1_websiteVariable` | string | No | For a carousel template with a dynamic website button: the variable of card 1 — only the variable, not the full website. You must provide it for each of the cards. Example: `wallet-01`. | | `carouselCard1_quickReply1_id` | string | No | For a carousel template with quick reply buttons: an id for the first quick reply button of card 1, returned on the webhook when the client clicks it. Example: `WANT_WALLET`. | | `carouselCard1_quickReply2_id` | string | No | For a carousel template with quick reply buttons: an id for the second quick reply button of card 1, returned on the webhook when the client clicks it. Example: `MORE_WALLET`. | | `localStorage` | integer | No | We deliver your `headerLink` to WhatsApp, and WhatsApp downloads the file in order to deliver it with your template. If your link is not accessible to WhatsApp or not open to the internet, enable this: we download the file ourselves and upload it to WhatsApp, so WhatsApp doesn't need your link. Please note that using this feature may delay the response from our server. If the upload fails, your link is used. One of: `0` — Off — WhatsApp downloads the file from your link; `1` — Enable — we upload the file to WhatsApp for you. Default: `0`. | | `showBody` | integer | No | Whether or not to show the body in every item of the `destinations` array of the response. For a long list, the entire `body` of every destination can make the full response very large (it might reach many MB), so consider carefully whether to enable it. One of: `0` — Don't show; `1` — Show. Default: `0`. | | `showRequest` | integer | No | You can get back in the response an object with the request you sent (without the `apiKey`). One of: `0` — Off; `1` — Enable — the response includes `originalRequest`. Default: `0`. | ### Example: Body variables A template with 3 body variables, sent to 2 numbers. ```json { "from": "972771234567", "name": "welcome_to_the_jungle", "headerType": 1, "destinations": [ { "to": "972501234567", "bodyVariable1": "one", "bodyVariable2": "two", "bodyVariable3": "three", "quickReply1_id": "button-1-id" }, { "to": "972509875654", "bodyVariable1": "four", "bodyVariable2": "five", "bodyVariable3": "six" } ], "showRequest": 0, "showBody": 1 } ``` ### Example: Video + quick reply ids The same video header for everyone, with `localStorage`, and quick reply ids per destination. ```json { "from": "972771234567", "name": "promo_video", "headerType": 4, "headerLink": "https://storage.99digital.online/samples/meditation.mp4", "localStorage": 1, "destinations": [ { "to": "972501234567", "bodyVariable1": "Dana", "bodyVariable2": "espresso machine", "quickReply1_id": "MORE_INFO", "quickReply2_id": "BOOK_DEMO", "quickReply3_id": "NOT_INTERESTED" }, { "to": "IL.1605856887361213", "bodyVariable1": "Yossi", "bodyVariable2": "espresso machine", "quickReply1_id": "MORE_INFO", "quickReply2_id": "BOOK_DEMO", "quickReply3_id": "NOT_INTERESTED" } ] } ``` ### Example: Document + personal website The same PDF for everyone, with a personal dynamic website variable per destination. ```json { "from": "972771234567", "name": "invoice_pdf", "headerType": 5, "headerLink": "https://storage.99digital.online/samples/headerSample.pdf", "pdfFilename": "Invoice August 2026", "destinations": [ { "to": "972501234567", "bodyVariable1": "Dana Levi", "bodyVariable2": "August 2026", "bodyVariable3": "350 USD", "websiteVariable": "inv-4711" }, { "to": "IL.1605856887361213", "bodyVariable1": "Yossi Cohen", "bodyVariable2": "August 2026", "bodyVariable3": "120 USD", "websiteVariable": "inv-4712" } ] } ``` ### Example: Coupon codes A personal coupon code per destination, with the same expiration for all. ```json { "from": "972771234567", "name": "weekend_coupon", "headerType": 3, "headerLink": "https://storage.99digital.online/samples/hello.png", "couponExpiration": 1790500000, "destinations": [ { "to": "972501234567", "bodyVariable1": "Dana", "bodyVariable2": "20%", "couponCode": "DANA20" }, { "to": "IL.1605856887361213", "bodyVariable1": "Yossi", "bodyVariable2": "15%", "couponCode": "YOSSI15" } ] } ``` ### Example: Carousel The same carousel cards for everyone, with a personal body variable per destination. ```json { "from": "972771234567", "name": "products_carousel", "headerType": 1, "carouselCard1_headerLink": "https://storage.99digital.online/samples/hello.png", "carouselCard1_bodyVariable": "Leather wallet", "carouselCard1_websiteVariable": "wallet-01", "carouselCard1_quickReply1_id": "WANT_WALLET", "carouselCard2_headerLink": "https://storage.99digital.online/samples/hello.png", "carouselCard2_bodyVariable": "Canvas backpack", "carouselCard2_websiteVariable": "backpack-02", "carouselCard2_quickReply1_id": "WANT_BACKPACK", "carouselCard3_headerLink": "https://storage.99digital.online/samples/hello.png", "carouselCard3_bodyVariable": "Travel mug", "carouselCard3_websiteVariable": "mug-03", "carouselCard3_quickReply1_id": "WANT_MUG", "destinations": [ { "to": "972501234567", "bodyVariable1": "Dana" }, { "to": "IL.1605856887361213", "bodyVariable1": "Yossi" } ] } ``` ## Responses ### 200 — The request was processed. Both a successful and a failed request answer with HTTP 200 — check `status`, and `reason` when it is FAIL. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) OK status doesn't mean the messages arrived to the end users, it only means that the system received your request. You should listen to [webhooks](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook) to see the status of your messages. Always `OK`. | | `timestamp` | integer | (one of: OK) Timestamp of the sending (Unix time, in seconds). Example: `1757610296`. | | `from` | string | (one of: OK) Your WhatsApp account. Example: `972771234567`. | | `accepted` | integer | (one of: OK) How many destinations were processed successfully. | | `rejected` | integer | (one of: OK) How many destinations were rejected (wrong number, wrong `to`, wrong variables). Fix them and try again. | | `failed` | integer | (one of: OK) How many destinations failed (system error, WhatsApp error). Try again. | | `destinations` | array of object | (one of: OK) One item per destination, in the order you sent them: `unique` and `to` for each one that was sent (and its `body`, if you enabled `showBody`), or `to` and a `reason` for each one that was rejected or failed. | | `destinations[].unique` | string | (one of: OK) The unique ID of the message to this destination. | | `destinations[].to` | string | (one of: OK) The number or user id the message was sent to. | | `destinations[].body` | string | (one of: OK) The body of the template, including the variables (with `showBody` set to 1). | | `destinations[].reason` | integer | (one of: OK) For a destination that was rejected or failed: why (25, 26, 27, 28 or 22 — see the reasons below). | | `originalRequest` | object | (one of: OK) Original request object, if you enabled this in `showRequest` when sending the request. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `status` | string | (one of: FAIL) FAIL — the request was not carried out. `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. Reasons 22 and 25–28 are given per destination, in `destinations`; when every destination is rejected, the whole request fails with reason 26. One of: `2` — 'from' is missing, or JSON syntax error; `3` — Wrong apiKey, or the "from" number is not registered with us; `6` — WhatsApp error or template rejected; `12` — The template name does not exist; `14` — 'headerType' is missing or not 1, 2, 3, 4 or 5; `15` — You must provide headerVariable for this template, without special characters such as **; `21` — WhatsApp has rejected the sending of the template due to high volume sending. Please try to send again; `22` — The message to this destination could not be sent — try again (per destination); `23` — The destinations array is required and must be a non-empty array; `24` — At least one destination is required; `25` — One of the destinations is not an object (per destination); `26` — One of the destinations is missing the 'to' field, or 'to' is empty or in a wrong format. This error is per destination, not for the entire list — unless all the destinations have it; `27` — You provided a couponCode in the destination, but it's too long (15 characters maximum); `28` — A quickReplyX_id of the destination is invalid or too long (per destination); `29` — The carousel cards don't match the template created; `30` — carouselCardX_bodyVariable is missing or invalid (for any of the cards); `31` — carouselCardX_headerLink is missing, invalid or wrong; `32` — carouselCardX_websiteVariable is missing, invalid or wrong; `33` — carouselCardX_quickReply1_id or _quickReply2_id is invalid or wrong. | | `timestamp` | integer | (one of: FAIL) With reason 26 — the time of the request. | | `from` | string | (one of: FAIL) With reason 26 — your WhatsApp account. | | `destinations` | array of object | (one of: FAIL) With reason 26 — every destination, with its `to` and `reason`. | | `destinations[].to` | string | (one of: FAIL) The `to` of this destination, as you sent it. | | `destinations[].reason` | integer | (one of: FAIL) Why this destination was rejected (25, 26, 27 or 28 — see the reasons above). | #### Example: OK Both destinations were sent; `showBody` is 1, so each has its body. ```json { "status": "OK", "timestamp": 1757610296, "from": "972771234567", "accepted": 2, "rejected": 0, "failed": 0, "destinations": [ { "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "to": "972501234567", "body": "Welcome to the jungle! Your picks today are one, two and three." }, { "unique": "5ec46920d615aa3-x3c15a2dff350a1-3SIZZq8h9JVdA53", "to": "972509875654", "body": "Welcome to the jungle! Your picks today are four, five and six." } ], "reason": 1 } ``` #### Example: OK — one rejected Two destinations were sent; the third has a local number and was rejected with reason 26. ```json { "status": "OK", "timestamp": 1757610296, "from": "972771234567", "accepted": 2, "rejected": 1, "failed": 0, "destinations": [ { "unique": "19545c3deca25da-0a504082ac7ad12-oiksAeQWvDMRtBQ", "to": "972501234567" }, { "unique": "5ec46920d615aa3-x3c15a2dff350a1-3SIZZq8h9JVdA53", "to": "IL.1605856887361213" }, { "to": "0501234", "reason": 26 } ], "reason": 1 } ``` #### Example: Reason 23 `destinations` is missing or empty. ```json { "status": "FAIL", "reason": 23 } ``` #### Example: Reason 26 Every destination was rejected, so nothing was sent. ```json { "status": "FAIL", "reason": 26, "timestamp": 1757610296, "from": "972771234567", "destinations": [ { "to": "0501234", "reason": 26 }, { "to": "05099", "reason": 26 } ] } ``` --- # Delete a Template Source: https://docs.99digital.co.il/whatsapp-api/templates/delete-a-template Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/templates/delete-a-template.md Section: WhatsApp API › Templates `POST https://api.99digital.co.il/whatsapp/v2/deleteTemplate` Delete a template from your WhatsApp account, by its name. Delete a Template allows you to delete a template from your account. Editing a template is not possible, so in order to change a template, you need to create a new one (and delete the old one if you wish). ## More Remarks - You can't use the name of a deleted template again for 30 days (when creating a template). - The template is deleted in every language you created it in. - A template whose name starts with `reserved_` can't be deleted (reason 7). See [Create a Template](https://docs.99digital.co.il/whatsapp-api/templates/create-a-template). ## Settings | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/deleteTemplate` | | Method | JSON via POST | | Key | Value | | --- | --- | | apiKey | Your API key for the service | ## Body | Parameter | Description / Example | Mandatory | | --- | --- | --- | | from | Your WhatsApp account. International number without `+`. For example: `972771234567` | yes | | name | The template name you want to delete | yes | ## Response ```json { "status": "OK", "name": "template_name", "reason": 1 } ``` ## Response-Explain | Parameter | Description | | --- | --- | | status | `OK` or `FAIL` | | name | The name of the template you deleted | | reason | The status explanation — see the table below. | | reason | Description | | --- | --- | | 1 | Not FAIL. The status is OK. | | 2 | `from` is missing, or JSON syntax error | | 3 | Wrong apiKey, or the "from" number is not registered with us | | 4 | The template name is missing or does not exist | | 6 | WhatsApp error | | 7 | This template can't be deleted — its name starts with `reserved_` | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | Your WhatsApp account. International number without `+`. Example: `972771234567`. | | `name` | string | Yes | The template name you want to delete. Example: `website_welcome`. | ### Example (generated from the schema) ```json { "from": "972771234567", "name": "website_welcome" } ``` ## Responses ### 200 — The request was processed. Both a successful and a failed request answer with HTTP 200 — check `status`, and `reason` when it is FAIL. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) OK — the template is deleted from your account. Always `OK`. | | `name` | string | (one of: OK) The name of the template you deleted. Example: `website_welcome`. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `status` | string | (one of: FAIL) FAIL — the request was not carried out. `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `2` — 'from' is missing, or JSON syntax error; `3` — Wrong apiKey, or the "from" number is not registered with us; `4` — The template name is missing or does not exist; `6` — WhatsApp error; `7` — This template can't be deleted — its name starts with `reserved_`. | #### Example: OK The template is deleted. ```json { "status": "OK", "name": "website_welcome", "reason": 1 } ``` #### Example: Reason 4 The template name does not exist. ```json { "status": "FAIL", "reason": 4 } ``` #### Example: Reason 7 A `reserved_` template can't be deleted. ```json { "status": "FAIL", "reason": 7 } ``` --- # Get Profile Source: https://docs.99digital.co.il/whatsapp-api/profile/get-profile Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/profile/get-profile.md Section: WhatsApp API › Profile `POST https://api.99digital.co.il/whatsapp/v2/getProfile` Get Profile allows you to see all the settings within your WhatsApp account. You can change these settings with [Set Profile](https://docs.99digital.co.il/whatsapp-api/profile/set-profile). A new display name sent with Set Profile shows in `displayName` only after it has been approved. ## Settings | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/getProfile` | | Method | JSON via POST | | Key | Value | | --- | --- | | apiKey | Your API key for the service | ## Body | Parameter | Description / Example | | --- | --- | | from | Your WhatsApp account. International number without `+`. For example: `972771234567` | ## Response ```json { "status": "OK", "from": "972771234567", "displayName": "WhatsApp Display Name", "address": "business address", "description": "business description and the things we do", "email": "info@example.com", "type": 13, "website": "https://www.example.com", "about": "Hey there! I am using WhatsApp.", "conversations": 180, "dailyLimit": 1000, "profilePic": "https://storage.99digital.online/files/1789900000aB3dE9fGh1.jpg", "isVerifiedBusiness": 1, "reason": 1 } ``` ## Response-Explain | Parameter | Description | | --- | --- | | status | `OK` or `FAIL` | | from | Your WhatsApp number | | displayName | WhatsApp display name that users see | | address | Business address. Empty when not set. | | description | Business description. Empty when not set. | | email | Company email address. Empty when not set. | | type | Business type number:
`1` - Automotive
`2` - Beauty, Spa and Salon
`3` - Clothing and Apparel
`4` - Education
`5` - Entertainment
`6` - Event Planning and Service
`7` - Finance and Banking
`8` - Food and Grocery
`9` - Public Service / Government
`10` - Hotel and Lodging
`11` - Medical and Health
`12` - Non-profit Organization
`13` - Professional Services
`14` - Shopping and Retail
`15` - Travel and Transportation
`16` - Restaurant
`17` - Other (also when no business type is set) | | website | Website address (URL). Empty when not set. | | about | The 'about' info from the WhatsApp profile | | conversations | Total count of all conversations for the current month. The number of conversations resets on the first day of every month at 4am Israel time. | | dailyLimit | The daily limit for new conversations in a rolling 24 hours: `250`, `1000`, `2000`, `10000` or `100000`; `1000000` means unlimited. | | profilePic | WhatsApp profile picture: a link to a copy of the current profile picture. Empty when there is no profile picture. | | isVerifiedBusiness | Shows if the business manager (from Meta) that manages this WhatsApp account is verified or not. Values:
`0` - Business status is unknown
`1` - The business is verified
`2` - The business is not verified
`3` - More information is needed to verify the business
`4` - Business is under review
`5` - Business verification has not been submitted yet
`6` - Business verification was rejected | | reason | The status explanation — see the table below. | | reason | Description | | --- | --- | | 1 | Not FAIL. The status is OK. | | 2 | `from` is missing, JSON syntax error, or the profile could not be read (try again) | | 3 | Wrong apiKey, or the "from" number is not registered with us | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | Your WhatsApp account. International number without `+`. Example: `972771234567`. | ### Example (generated from the schema) ```json { "from": "972771234567" } ``` ## Responses ### 200 — The request was processed. Both a successful and a failed request answer with HTTP 200 — check `status`, and `reason` when it is FAIL. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) OK — the response holds the settings of your WhatsApp account. Always `OK`. | | `from` | string | (one of: OK) Your WhatsApp number. Example: `972771234567`. | | `displayName` | string | (one of: OK) WhatsApp display name that users see. Example: `My Business Ltd`. | | `address` | string | (one of: OK) Business address. Empty when not set. Example: `Herzl 1, Tel Aviv`. | | `description` | string | (one of: OK) Business description. Empty when not set. Example: `Online store for gadgets`. | | `email` | string | (one of: OK) Company email address. Empty when not set. Example: `info@example.com`. | | `type` | integer | (one of: OK) Business type number. One of: `1` — Automotive; `2` — Beauty, Spa and Salon; `3` — Clothing and Apparel; `4` — Education; `5` — Entertainment; `6` — Event Planning and Service; `7` — Finance and Banking; `8` — Food and Grocery; `9` — Public Service / Government; `10` — Hotel and Lodging; `11` — Medical and Health; `12` — Non-profit Organization; `13` — Professional Services; `14` — Shopping and Retail; `15` — Travel and Transportation; `16` — Restaurant; `17` — Other (also when no business type is set). Example: `14`. | | `website` | string | (one of: OK) Website address (URL). Empty when not set. Example: `https://www.example.com`. | | `about` | string | (one of: OK) The 'about' info from the WhatsApp profile. Example: `Hey there! I am using WhatsApp.`. | | `conversations` | integer | (one of: OK) Total count of all conversations for the current month. The number of conversations resets on the first day of every month at 4am Israel time. Example: `180`. | | `dailyLimit` | integer | (one of: OK) The daily limit for new conversations in a rolling 24 hours: 250, 1000, 2000, 10000 or 100000; 1000000 means unlimited. Example: `1000`. | | `profilePic` | string | (one of: OK) WhatsApp profile picture: a link to a copy of the current profile picture. Empty when there is no profile picture. Example: `https://storage.99digital.online/files/1789900000aB3dE9fGh1.jpg`. | | `isVerifiedBusiness` | integer | (one of: OK) Shows if the business manager (from Meta) that manages this WhatsApp account is verified or not. One of: `0` — Business status is unknown; `1` — The business is verified; `2` — The business is not verified; `3` — More information is needed to verify the business; `4` — Business is under review; `5` — Business verification has not been submitted yet; `6` — Business verification was rejected. Example: `1`. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `status` | string | (one of: FAIL) FAIL — the request was not carried out. `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `2` — 'from' is missing, JSON syntax error, or the profile could not be read (try again); `3` — Wrong apiKey, or the "from" number is not registered with us. | #### Example: OK All the settings of your WhatsApp account. ```json { "status": "OK", "from": "972771234567", "displayName": "My Business Ltd", "address": "Herzl 1, Tel Aviv", "description": "Online store for gadgets", "email": "info@example.com", "type": 14, "website": "https://www.example.com", "about": "Hey there! I am using WhatsApp.", "conversations": 180, "dailyLimit": 1000, "profilePic": "https://storage.99digital.online/files/1789900000aB3dE9fGh1.jpg", "isVerifiedBusiness": 1, "reason": 1 } ``` #### Example: Reason 2 The profile could not be read — try again. ```json { "status": "FAIL", "reason": 2 } ``` #### Example: Reason 3 Wrong apiKey, or the "from" number is not registered with us. ```json { "status": "FAIL", "reason": 3 } ``` --- # Set Profile Source: https://docs.99digital.co.il/whatsapp-api/profile/set-profile Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/profile/set-profile.md Section: WhatsApp API › Profile `POST https://api.99digital.co.il/whatsapp/v2/setProfile` Set Profile allows you to change one or multiple settings within your WhatsApp account. ## More Remarks - None of the parameters (except `from`) is mandatory: you can set only the ones you need. Everything you leave out stays as it is. - You can't change or set the profile settings for [Coexistence](https://docs.99digital.co.il/whatsapp-api/information/coexistence) WhatsApp accounts: the profile can only be changed directly by the client in the mobile app. - You can see the current settings with [Get Profile](https://docs.99digital.co.il/whatsapp-api/profile/get-profile). ## Settings | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/setProfile` | | Method | JSON via POST | | Key | Value | | --- | --- | | apiKey | Your API key for the service | ## Body | Parameter | Description / Example | Maximum length | Remarks | | --- | --- | --- | --- | | from | Your WhatsApp account. International number without `+`. For example: `972771234567` | | | | address | The address of your business.
`\n` for a new line
`*text*` for bold
`_text_` for italic
`~text~` for strikethrough | 256 | If you need to clear this data, you can send `" "` (a space). | | description | Description of your business.
`\n` for a new line
`*text*` for bold
`_text_` for italic
`~text~` for strikethrough | 256 | If you need to clear this data, you can send `" "` (a space). | | email | `info@example.com` | 128 | Must be a valid email format. If you need to clear this data, you can send `" "` (a space). | | type | You must choose a business category type:
`1` - Automotive
`2` - Beauty, Spa and Salon
`3` - Clothing and Apparel
`4` - Education
`5` - Entertainment
`6` - Event Planning and Service
`7` - Finance and Banking
`8` - Food and Grocery
`9` - Public Service / Government
`10` - Hotel and Lodging
`11` - Medical and Health
`12` - Non-profit Organization
`13` - Professional Services
`14` - Shopping and Retail
`15` - Travel and Transportation
`16` - Restaurant
`17` - Other | 2 | This parameter can be changed, but cannot be empty. | | website | `https://www.example.com` | 256 | Must be a valid website format. If you need to clear this data, you can send `" "` (a space). Must include `http` or `https`. The value can be a business website, Facebook page, Instagram, YouTube link etc. | | profilePic | `https://storage.99digital.online/samples/hello.png` | - | Must be a jpeg / jpg / png image link; the URL must be https.
The image needs to be square, with a max edge of 640px and a maximum file size of 5MB.
It is recommended to use 640x640; images smaller than 192px will not be approved. | | about | `Hi There, I'm using WhatsApp` | 139 | About section in the business profile. Can't be empty. | | displayName | `My New WhatsApp Name` | 75 | This is the WhatsApp number display name change. A few points for you to know:
• Minimum 3 characters, maximum 75 characters.
• The name will be sent to Meta for approval: an OK response means the name was submitted, not changed yet. You can check with [Get Profile](https://docs.99digital.co.il/whatsapp-api/profile/get-profile) whether the name has been approved (or you can see it in WhatsApp directly). It can take around 2-4 days.
• The name must be as similar as possible to your business name, or Meta will reject it.
• You can request a name change 10 times during 30 days.
• If your WhatsApp number has the green/blue official checkmark, this will not work, and you must contact support to change the name.
• This will not work for coexistence WhatsApp accounts, as they can change the `displayName` directly on the mobile phone.
• Don't include this parameter if you don't wish to change it. Sending your current name again does nothing (no new request to Meta, and no `displayName` in `returnedData`).
• If a request is sent, you can't request again until the new name is either approved or rejected. Wait a few days between requests.
• You can send `displayName` together with the other parameters. They are saved first, so if the name gets reason 14, the other settings were already saved. | ## Response ```json { "status": "OK", "reason": 1, "returnedData": { "address": "The address you provided" } } ``` ## Response-Explain | Parameter | Description | | --- | --- | | status | `OK` or `FAIL` | | returnedData | An object that will show all the parameters you sent (`address`, `description`, `email`, `type`, `website`, `about`, `profilePic`, and `displayName` when a new name was submitted). A field you cleared shows as an empty string. Left out when you sent no parameter to change. | | reason | The status explanation — see the table below. | | reason | Description | | --- | --- | | 1 | Not FAIL. The status is OK. | | 2 | `from` is missing, or invalid JSON | | 3 | Wrong apiKey, or the "from" number is not registered with us | | 4 | `address` is too long | | 5 | `description` is too long | | 6 | `email` is too long, or invalid email address | | 7 | `type` must be an integer from 1 to 17 | | 8 | `website` is too long, or invalid website address | | 10 | `profilePic` URL is invalid, or the image could not be downloaded from it | | 11 | `about` is invalid or too long | | 12 | Unknown error - please contact support | | 13 | `displayName` value is invalid or wrong | | 14 | `displayName` received an error on Meta's side; the other profile settings (if sent) were saved successfully | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | Your WhatsApp account. International number without `+`. Example: `972771234567`. | | `address` | string | No | The address of your business. Use `\n` for a new line, `*text*` for bold, `_text_` for italic and `~text~` for strikethrough. If you need to clear this data, you can send `" "` (a space). Max length: 256. Example: `Herzl 1, Tel Aviv`. | | `description` | string | No | Description of your business. Use `\n` for a new line, `*text*` for bold, `_text_` for italic and `~text~` for strikethrough. If you need to clear this data, you can send `" "` (a space). Max length: 256. Example: `Online store for gadgets. Free delivery over 200 NIS.`. | | `email` | string (email) | No | Company email address. Must be a valid email format. If you need to clear this data, you can send `" "` (a space). Max length: 128. Example: `info@example.com`. | | `type` | integer | No | The business category type. This parameter can be changed, but it can't be cleared. One of: `1` — Automotive; `2` — Beauty, Spa and Salon; `3` — Clothing and Apparel; `4` — Education; `5` — Entertainment; `6` — Event Planning and Service; `7` — Finance and Banking; `8` — Food and Grocery; `9` — Public Service / Government; `10` — Hotel and Lodging; `11` — Medical and Health; `12` — Non-profit Organization; `13` — Professional Services; `14` — Shopping and Retail; `15` — Travel and Transportation; `16` — Restaurant; `17` — Other. Example: `14`. | | `website` | string (uri) | No | Must be a valid website address, including `http://` or `https://`. The value can be a business website, Facebook page, Instagram, YouTube link etc. If you need to clear this data, you can send `" "` (a space). Max length: 256. Example: `https://www.example.com`. | | `profilePic` | string (uri) | No | A link to a jpeg / jpg / png image; the URL must be https. The image needs to be square, with a max edge of 640px and a maximum file size of 5MB. It is recommended to use 640x640; images smaller than 192px will not be approved. Example: `https://storage.99digital.online/samples/hello.png`. | | `about` | string | No | About section in the business profile. Can't be empty. Max length: 139. Example: `Available Sun-Thu 09:00-17:00`. | | `displayName` | string | No | This is the WhatsApp number display name change. A few points for you to know: - Minimum 3 characters, maximum 75 characters. - The name will be sent to Meta for approval: an OK response means the name was submitted, not changed yet. You can check with [Get Profile](https://docs.99digital.co.il/whatsapp-api/profile/get-profile) whether the name has been approved (or you can see it in WhatsApp directly). It can take around 2-4 days. - The name must be as similar as possible to your business name, or Meta will reject it. - You can request a name change 10 times during 30 days. - If your WhatsApp number has the green/blue official checkmark, this will not work, and you must contact support to change the name. - This will not work for coexistence WhatsApp accounts, as they can change the display name directly on the mobile phone. - Don't include this parameter if you don't wish to change it. Sending your current name again does nothing. - If a request is sent, you can't request again until the new name is either approved or rejected. Wait a few days between requests. Min length: 3. Max length: 75. Example: `My Business Store`. | ### Example: Profile texts Update the texts of the profile — send only the ones you want to change. ```json { "from": "972771234567", "address": "Herzl 1, Tel Aviv", "description": "Online store for gadgets. Free delivery over 200 NIS.", "email": "info@example.com", "website": "https://www.example.com", "about": "Available Sun-Thu 09:00-17:00" } ``` ### Example: Business type Only the business category, a number from 1 to 17. ```json { "from": "972771234567", "type": 14 } ``` ### Example: Display name Submit a new display name to Meta for approval. ```json { "from": "972771234567", "displayName": "My Business Store" } ``` ### Example: Profile picture A new profile picture: a link to a square jpg / png image, up to 640x640 and 5MB. ```json { "from": "972771234567", "profilePic": "https://storage.99digital.online/samples/hello.png" } ``` ### Example: Clear fields A single space clears `address`, `description`, `email` or `website`. ```json { "from": "972771234567", "address": " ", "website": " " } ``` ## Responses ### 200 — The request was processed. Both a successful and a failed request answer with HTTP 200 — check `status`, and `reason` when it is FAIL. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) OK — the settings you sent were saved (a new `displayName` was submitted to Meta for approval). Always `OK`. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `returnedData` | object | (one of: OK) An object that shows all the parameters you sent (`address`, `description`, `email`, `type`, `website`, `about`, `profilePic`, and `displayName` when a new name was submitted). A field you cleared shows as an empty string. Left out when you sent no parameter to change. | | `returnedData.address` | string | (one of: OK) The business address you sent. An empty string when you cleared it. | | `returnedData.description` | string | (one of: OK) The business description you sent. An empty string when you cleared it. | | `returnedData.email` | string | (one of: OK) The company email address you sent. An empty string when you cleared it. | | `returnedData.type` | integer | (one of: OK) The business category type you sent (1 to 17). | | `returnedData.website` | string | (one of: OK) The website address you sent. An empty string when you cleared it. | | `returnedData.profilePic` | string | (one of: OK) The link to the profile picture image you sent. | | `returnedData.about` | string | (one of: OK) The 'about' text you sent. | | `returnedData.displayName` | string | (one of: OK) The name submitted to Meta for approval — not changed yet. | | `status` | string | (one of: FAIL) FAIL — the request was not carried out. `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `2` — 'from' is missing, or invalid JSON; `3` — Wrong apiKey, or the "from" number is not registered with us; `4` — 'address' is too long; `5` — 'description' is too long; `6` — 'email' is too long, or invalid email address; `7` — 'type' must be an integer from 1 to 17; `8` — 'website' is too long, or invalid website address; `10` — 'profilePic' URL is invalid, or the image could not be downloaded from it; `11` — 'about' is invalid or too long; `12` — Unknown error — please contact support; `13` — 'displayName' value is invalid or wrong; `14` — 'displayName' received an error on Meta's side; the other profile settings (if sent) were saved successfully. | #### Example: OK The profile texts were updated. ```json { "status": "OK", "reason": 1, "returnedData": { "address": "Herzl 1, Tel Aviv", "description": "Online store for gadgets. Free delivery over 200 NIS.", "email": "info@example.com", "website": "https://www.example.com", "about": "Available Sun-Thu 09:00-17:00" } } ``` #### Example: Display name The new display name was submitted to Meta for approval. ```json { "status": "OK", "reason": 1, "returnedData": { "displayName": "My Business Store" } } ``` #### Example: Clear fields The cleared fields show as empty strings. ```json { "status": "OK", "reason": 1, "returnedData": { "address": "", "website": "" } } ``` #### Example: Reason 6 'email' is too long, or invalid email address. ```json { "status": "FAIL", "reason": 6 } ``` #### Example: Reason 10 'profilePic' URL is invalid, or the image could not be downloaded. ```json { "status": "FAIL", "reason": 10 } ``` #### Example: Reason 14 Meta refused the display name request; the other settings you sent were saved. ```json { "status": "FAIL", "reason": 14 } ``` --- # Explanation - Start here Source: https://docs.99digital.co.il/whatsapp-api/whatsapp-calls/explanation-start-here Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/whatsapp-calls/explanation-start-here.md Section: WhatsApp API › WhatsApp Calls **WhatsApp Calling** lets your WhatsApp API line receive incoming voice calls from end users, directly through WhatsApp. :::info This feature is not available for [Coexistence](https://docs.99digital.co.il/whatsapp-api/information/coexistence) accounts — for those, incoming calls go to the linked personal WhatsApp app instead, so this feature doesn't apply. ::: Once enabled, a call icon appears at the top of the chat for end users on that WhatsApp line. When they tap it, the call is routed to the SIP trunk address you provide — connecting directly to your own call center system or PBX, where you can implement IVR, call forwarding, or any routing logic you choose. To enable this feature for your WhatsApp account, please contact support first. Once enabled, you can configure and manage your line through the `/setCall` endpoint. | Endpoint | What it does | | --- | --- | | [Set Call Configuration](https://docs.99digital.co.il/whatsapp-api/whatsapp-calls/set-call-configuration) | Set your SIP server, turn calling on or off, and set the hours when customers can call you. | | [Get Call Settings](https://docs.99digital.co.il/whatsapp-api/whatsapp-calls/get-call-settings) | See your current calling settings. | ## How a call reaches you - The call is sent to your SIP server as `sip:@:;transport=` — your WhatsApp number without `+`, for example `sip:972771234567@sip.your-company.com:5060;transport=udp`. - Calls are forwarded only once `sip_host`, `sip_port` and `sip_transport` are all set with [Set Call Configuration](https://docs.99digital.co.il/whatsapp-api/whatsapp-calls/set-call-configuration). - All incoming calls (SIP signaling and RTP media) come from IP **34.165.246.158**, so don't forget to whitelist it. - Calling is only available for numbers whose daily limit is at least 2000 conversations (see [Rate Limit](https://docs.99digital.co.il/whatsapp-api/information/rate-limit)). - By default, you can have 1 concurrent call; calls above your limit are rejected. If you need to upgrade your plan, please contact support. --- # Set Call Configuration Source: https://docs.99digital.co.il/whatsapp-api/whatsapp-calls/set-call-configuration Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/whatsapp-calls/set-call-configuration.md Section: WhatsApp API › WhatsApp Calls `POST https://api.99digital.co.il/whatsapp/v2/setCall` Set your SIP server, turn WhatsApp calling on or off, and set the hours when customers can call you. Set Call allows you to set the SIP trunk information where you wish to get the incoming calls. This can only work once our support team has enabled the WhatsApp calling feature for your account (see [Explanation - Start here](https://docs.99digital.co.il/whatsapp-api/whatsapp-calls/explanation-start-here)). ## Important information - In this endpoint you need to provide the SIP server information and enable the calling feature. - The WhatsApp calling feature is only available for numbers whose daily limit is at least 2000 conversations (`dailyLimit` in [Get Profile](https://docs.99digital.co.il/whatsapp-api/profile/get-profile)). - Your SIP server must be reachable from the internet at the public hostname or public IPv4. - All incoming calls (SIP signaling and RTP media) will be coming from IP **34.165.246.158**, so don't forget to whitelist it. - Calls are forwarded to your SIP server only once `sip_host`, `sip_port` and `sip_transport` are all set. - Default codecs are PCMU and PCMA (G.711). You can change them with the `codec_pref` parameter. - By default, you can have 1 concurrent call. If you need to upgrade your plan, please contact support. Calls above your limit are rejected. - Only the `from` in the body is mandatory. Send only what you want to change: everything you leave out stays as it is. - You can see your current settings with [Get Call Settings](https://docs.99digital.co.il/whatsapp-api/whatsapp-calls/get-call-settings). ## Settings | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/setCall` | | Method | JSON via POST | | Key | Value | | --- | --- | | apiKey | Your API key for the service | ## Body | Parameter | Description / Example | Maximum length | Remarks | | --- | --- | --- | --- | | from | Your WhatsApp account. International number without `+`. For example: `972771234567` | | Mandatory | | status | Boolean.
`true` to enable calling (show the calling icon)
`false` to disable calling | | Your settings are kept. This is purely the call icon at the top of the chat. | | sip_host | Public hostname or IPv4 of your SIP server. Can't be empty. Private / internal addresses (and IPv6) are refused. | 253 | Hostname or IP. For example: `sip.your-company.com` or `153.65.210.52` | | sip_port | The port number of your SIP host. | 5 | Must be between 1-65535. Usually the default is 5060 (UDP/TCP) or 5061 (TLS). Can't be empty. | | sip_transport | The SIP transport value. Available values: `udp` / `tcp` / `tls` | 3 | Can't be empty. | | client_auth | `{"username": "some-username", "password": "some-password"}`
This is the username and password for digest authentication. Letters, digits and `. _ - @ ! # % * + = ~ : / ?` | 128 each | This value is in case your server requires authentication. It is not mandatory, but if `username` is provided, `password` must be provided too (and the other way around). Send `{}` to remove them. | | codec_pref | Comma-separated codecs in order of preference. Default is `PCMU,PCMA`. Letters, digits and `@ . _ -` | 50 per codec, 200 in total | Can't be empty. For example: `PCMU,PCMA,OPUS` | | call_hours | See "Call hours" below | See below | See below | ## Call hours - The `call_hours` parameter controls when customers can call you. - Without call hours, customers will see the call icon 24/7 and will be able to call you. - Call hours allow you to hide this icon at specific times when you can't take those calls in your call center. WhatsApp will show that you are not available and show your call availability in the app. - The default is call hours off, so the call button is available 24/7. - A day you leave out is closed all day. In the example below, Saturday is closed. - Every `call_hours` you send in a new request replaces the entire object you previously provided, including the holidays. Always send the complete object if you wish to update this parameter. - To remove the hours so customers can call you 24/7, you can simply send `"call_hours": {}`. To keep the hours saved but not enforce them, send the complete `call_hours` object with `"status": "DISABLED"`. - Common mistakes: write the times as `HHMM`, e.g. `"0900"` (`"09:00"` is accepted too, and saved as `"0900"`). Don't write `"2400"`, write `"2359"`. Don't write `"SUN"`, write `"SUNDAY"` (capitals). Don't write holiday dates in the past, otherwise you will get an error with reason 13. The `call_hours` is an object that contains the status, time zone, working hours and holidays. When you enable it, the call button shows only during the provided hours. Example of the `call_hours` object: ```json "call_hours": { "status": "ENABLED", "timezone_id": "Asia/Jerusalem", "weekly_operating_hours": [ { "day_of_week": "SUNDAY", "open_time": "0900", "close_time": "1700" }, { "day_of_week": "MONDAY", "open_time": "0900", "close_time": "1700" }, { "day_of_week": "TUESDAY", "open_time": "0900", "close_time": "1700" }, { "day_of_week": "WEDNESDAY", "open_time": "0900", "close_time": "1700" }, { "day_of_week": "THURSDAY", "open_time": "0900", "close_time": "1700" }, { "day_of_week": "FRIDAY", "open_time": "0900", "close_time": "1300" } ], "holiday_schedule": [ { "date": "2027-04-22", "start_time": "0000", "end_time": "2359" } ] } ``` ### call_hours explained | Parameter | Description / Example | What to provide | Example | | --- | --- | --- | --- | | status | `ENABLED` (default)
or
`DISABLED` (this keeps the saved data but accepts calls 24/7) | Optional — when left out, the status is `ENABLED`. | `ENABLED` | | timezone_id | IANA format time zone. | The time zone you wish the hours to take effect in. Required when `status` is `ENABLED`. | `Asia/Jerusalem` | | weekly_operating_hours | Array of hours and days | 1–14 entries. `day_of_week` = `MONDAY` … `SUNDAY`. `open_time` / `close_time` = 24-hour `HHMM` with no colon (`0900`, `1730`; the end of the day is `2359`). Open must be before close. Up to 2 non-overlapping entries per day for split shifts, e.g. `0800`–`1200` and `1600`–`2000`. Required when `status` is `ENABLED`. | `{ "day_of_week": "SUNDAY", "open_time": "0900", "close_time": "1700" }`,
`{ "day_of_week": "MONDAY", "open_time": "0900", "close_time": "1700" }`,
`{ "day_of_week": "TUESDAY", "open_time": "0900", "close_time": "1700" }`,
`{ "day_of_week": "WEDNESDAY", "open_time": "0900", "close_time": "1700" }`,
`{ "day_of_week": "THURSDAY", "open_time": "0900", "close_time": "1700" }`,
`{ "day_of_week": "FRIDAY", "open_time": "0900", "close_time": "1300" }` | | holiday_schedule | Array of selected dates that will be closed | Optional, up to 20 dates that override the weekly hours. `date` = `YYYY-MM-DD`, today or later; `start_time` / `end_time` in `HHMM` (start before end). `0000`–`2359` closes the whole day. | `{ "date": "2027-04-22", "start_time": "0000", "end_time": "2359" }` | ## Full setCall example request ```json { "from": "972771234567", "sip_host": "sip.your-company.com", "sip_port": 5060, "sip_transport": "udp", "codec_pref": "PCMU,PCMA", "client_auth": { "username": "whatsapp", "password": "Str0ng-Pass!" } } ``` ## Response ```json { "status": "OK", "from": "972771234567", "calling": { "status": true, "sip_host": "sip.your-company.com", "sip_port": 5060, "sip_transport": "udp", "client_auth": null, "codec_pref": "PCMU,PCMA", "call_hours": null, "concurrency_limit": 1 }, "reason": 1 } ``` The response always carries the complete current settings, also when nothing needed to change. When the status is FAIL, nothing was saved. ## Response-Explain | Parameter | Description | | --- | --- | | status | `OK` or `FAIL` | | from | Your WhatsApp account | | calling | Your returned settings: always the complete current settings, not only what you sent. Anything never set is `null`. The fields are the same as in [Get Call Settings](https://docs.99digital.co.il/whatsapp-api/whatsapp-calls/get-call-settings), including the read-only `concurrency_limit`. | | reason | The status explanation — see the table below. | | reason | Description | | --- | --- | | 1 | Not FAIL. The status is OK. | | 2 | `from` is missing, invalid JSON, or a temporary error — try again | | 3 | Wrong apiKey, or the "from" number is not registered with us | | 4 | `status` must be true / false | | 5 | `sip_host` is empty, invalid, or a private / internal address | | 6 | `sip_port` is empty, invalid, or not between 1 and 65535 | | 7 | `sip_transport` must be udp / tcp / tls | | 8 | `client_auth` is missing the username / password, or has characters that are not allowed | | 9 | `codec_pref` is empty or invalid | | 10 | `call_hours` is not an object, or its status is not ENABLED / DISABLED | | 11 | `timezone_id` is missing for `call_hours`, or is not a valid IANA time zone | | 12 | `weekly_operating_hours` is missing or empty, or one of its entries is invalid (day, time, open not before close, more than 2 or overlapping entries in a day, more than 14 entries) | | 13 | `holiday_schedule` is invalid (or a date is in the past) | | 14 | Calling can't be enabled: the daily limit of the number must be at least 2000 conversations | | 15 | Calling is temporarily disabled for this number (call quality or spam) | | 16 | The support team did not enable calling for your number, please contact support | | 17 | Settings rejected, please contact support | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | Your WhatsApp account. International number without `+`. Example: `972771234567`. | | `status` | boolean | No | `true` to enable calling (show the calling icon), `false` to disable calling. Your settings are kept: this is purely the call icon at the top of the chat. Example: `true`. | | `sip_host` | string | No | Public hostname or IPv4 of your SIP server, for example `sip.your-company.com` or `153.65.210.52`. Can't be empty. Private / internal addresses and IPv6 are refused. Max length: 253. Example: `sip.your-company.com`. | | `sip_port` | integer | No | The port number of your SIP host, between 1 and 65535. Usually 5060 (UDP / TCP) or 5061 (TLS). Can't be empty. Minimum: 1. Maximum: 65535. Example: `5060`. | | `sip_transport` | string | No | The SIP transport value — `udp`, `tcp` or `tls`. Can't be empty. One of: `udp` — SIP over UDP (the usual port is 5060); `tcp` — SIP over TCP (the usual port is 5060); `tls` — SIP over TLS (the usual port is 5061). Example: `udp`. | | `client_auth` | object | No | `{"username": "some-username", "password": "some-password"}` — the username and password for digest authentication. This value is in case your SIP server requires authentication. It is not mandatory, but if `username` is provided, `password` must be provided too (and the other way around). Send `{}` to remove them. | | `client_auth.username` | string | No | The username for digest authentication. Letters, digits and `. _ - @ ! # % * + = ~ : / ?`, up to 128 characters. Max length: 128. Pattern: `^[A-Za-z0-9._@!#%*+=~:/?-]{1,128}$`. Example: `whatsapp`. | | `client_auth.password` | string | No | The password for digest authentication. Letters, digits and `. _ - @ ! # % * + = ~ : / ?`, up to 128 characters. Max length: 128. Pattern: `^[A-Za-z0-9._@!#%*+=~:/?-]{1,128}$`. Example: `Str0ng-Pass!`. | | `codec_pref` | string | No | Comma-separated codecs in order of preference, for example `PCMU,PCMA,OPUS`. Default is `PCMU,PCMA`. Letters, digits and `@ . _ -`, up to 50 characters per codec. Can't be empty. Default: `PCMU,PCMA`. Max length: 200. Example: `PCMU,PCMA`. | | `call_hours` | object | No | When customers can call you: an object that contains the status, time zone, working hours and holidays — see "Call hours" above. Every `call_hours` you send replaces the entire object you previously provided, including the holidays. Send `{}` to remove the hours, so customers can call you 24/7. | | `call_hours.status` | string | No | `ENABLED` (default) shows the call button only during the hours. `DISABLED` keeps the saved data but accepts calls 24/7. Optional — when left out, the status is `ENABLED`. One of: `ENABLED` — The call button shows only during the provided hours (default); `DISABLED` — The hours stay saved, but customers can call you 24/7. Send the complete object with this status to keep the hours. Default: `ENABLED`. Example: `ENABLED`. | | `call_hours.timezone_id` | string | No | IANA format time zone: the time zone you wish the hours to take effect in. Required when `status` is `ENABLED`. Example: `Asia/Jerusalem`. | | `call_hours.weekly_operating_hours` | array of object | No | Array of days and hours, 1–14 entries. Required when `status` is `ENABLED`. Up to 2 non-overlapping entries per day for split shifts, e.g. `0800`–`1200` and `1600`–`2000`. A day you leave out is closed all day. Min items: 1. Max items: 14. | | `call_hours.weekly_operating_hours[].day_of_week` | string | Yes | The day of the week, in capitals (`SUNDAY`, not `SUN`). A day you leave out is closed all day. One of: `MONDAY` — Monday; `TUESDAY` — Tuesday; `WEDNESDAY` — Wednesday; `THURSDAY` — Thursday; `FRIDAY` — Friday; `SATURDAY` — Saturday; `SUNDAY` — Sunday. Example: `SUNDAY`. | | `call_hours.weekly_operating_hours[].open_time` | string | Yes | 24-hour `HHMM` with no colon (`0900`, `1730`). Open must be before close. Example: `0900`. | | `call_hours.weekly_operating_hours[].close_time` | string | Yes | 24-hour `HHMM` with no colon; the end of the day is `2359`. Example: `1700`. | | `call_hours.holiday_schedule` | array of object | No | Array of selected dates that will be closed. Optional, up to 20 dates that override the weekly hours. `0000`–`2359` closes the whole day. Max items: 20. | | `call_hours.holiday_schedule[].date` | string (date) | Yes | `YYYY-MM-DD`, today or later. Example: `2027-04-22`. | | `call_hours.holiday_schedule[].start_time` | string | Yes | The time the closing starts, `HHMM`. Start must be before end. Example: `0000`. | | `call_hours.holiday_schedule[].end_time` | string | Yes | The time the closing ends, `HHMM` (`2359` for the end of the day). Example: `2359`. | ### Example: Enable calling Turn calling on and forward the calls to your SIP server. ```json { "from": "972771234567", "status": true, "sip_host": "sip.your-company.com", "sip_port": 5060, "sip_transport": "udp", "codec_pref": "PCMU,PCMA" } ``` ### Example: Digest auth Your SIP server, with the username and password your server asks for (digest authentication). ```json { "from": "972771234567", "sip_host": "sip.your-company.com", "sip_port": 5060, "sip_transport": "udp", "codec_pref": "PCMU,PCMA", "client_auth": { "username": "whatsapp", "password": "Str0ng-Pass!" } } ``` ### Example: Call hours Sunday to Thursday 09:00–17:00 and Friday 09:00–13:00; Saturday (left out) and the holiday are closed. ```json { "from": "972771234567", "call_hours": { "status": "ENABLED", "timezone_id": "Asia/Jerusalem", "weekly_operating_hours": [ { "day_of_week": "SUNDAY", "open_time": "0900", "close_time": "1700" }, { "day_of_week": "MONDAY", "open_time": "0900", "close_time": "1700" }, { "day_of_week": "TUESDAY", "open_time": "0900", "close_time": "1700" }, { "day_of_week": "WEDNESDAY", "open_time": "0900", "close_time": "1700" }, { "day_of_week": "THURSDAY", "open_time": "0900", "close_time": "1700" }, { "day_of_week": "FRIDAY", "open_time": "0900", "close_time": "1300" } ], "holiday_schedule": [ { "date": "2027-04-22", "start_time": "0000", "end_time": "2359" } ] } } ``` ### Example: Split shifts Two entries a day: 08:00–12:00 and 16:00–20:00, Sunday to Thursday. No holidays are sent, so the holidays saved before are removed. ```json { "from": "972771234567", "call_hours": { "status": "ENABLED", "timezone_id": "Asia/Jerusalem", "weekly_operating_hours": [ { "day_of_week": "SUNDAY", "open_time": "0800", "close_time": "1200" }, { "day_of_week": "SUNDAY", "open_time": "1600", "close_time": "2000" }, { "day_of_week": "MONDAY", "open_time": "0800", "close_time": "1200" }, { "day_of_week": "MONDAY", "open_time": "1600", "close_time": "2000" }, { "day_of_week": "TUESDAY", "open_time": "0800", "close_time": "1200" }, { "day_of_week": "TUESDAY", "open_time": "1600", "close_time": "2000" }, { "day_of_week": "WEDNESDAY", "open_time": "0800", "close_time": "1200" }, { "day_of_week": "WEDNESDAY", "open_time": "1600", "close_time": "2000" }, { "day_of_week": "THURSDAY", "open_time": "0800", "close_time": "1200" }, { "day_of_week": "THURSDAY", "open_time": "1600", "close_time": "2000" } ] } } ``` ### Example: Keep hours, accept 24/7 The complete `call_hours` object with status `DISABLED`: the hours stay saved, but customers can call you 24/7. ```json { "from": "972771234567", "call_hours": { "status": "DISABLED", "timezone_id": "Asia/Jerusalem", "weekly_operating_hours": [ { "day_of_week": "SUNDAY", "open_time": "0900", "close_time": "1700" }, { "day_of_week": "MONDAY", "open_time": "0900", "close_time": "1700" }, { "day_of_week": "TUESDAY", "open_time": "0900", "close_time": "1700" }, { "day_of_week": "WEDNESDAY", "open_time": "0900", "close_time": "1700" }, { "day_of_week": "THURSDAY", "open_time": "0900", "close_time": "1700" }, { "day_of_week": "FRIDAY", "open_time": "0900", "close_time": "1300" } ] } } ``` ### Example: Remove call hours An empty `call_hours` removes the hours — customers can call you 24/7. ```json { "from": "972771234567", "call_hours": {} } ``` ### Example: Disable calling Remove the call icon. Your SIP settings and call hours stay saved; `status: true` turns calling back on with them. ```json { "from": "972771234567", "status": false } ``` ## Responses ### 200 — The request was processed. Both a successful and a failed request answer with HTTP 200 — check `status`, and `reason` when it is FAIL. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) OK — your settings were saved; `calling` shows them. Always `OK`. | | `from` | string | (one of: OK) Your WhatsApp account. Example: `972771234567`. | | `calling` | object | (one of: OK) Your returned settings: always the complete current settings, not only what you sent. Anything never set is `null`. | | `calling.status` | boolean | (one of: OK) `true` when calling is enabled (the call icon is shown); `false` when it is disabled or was never enabled. Example: `true`. | | `calling.sip_host` | string \| null | (one of: OK) The SIP host you provided (SIP trunk). Example: `sip.your-company.com`. | | `calling.sip_port` | integer \| null | (one of: OK) The SIP port you provided. Example: `5060`. | | `calling.sip_transport` | string \| null | (one of: OK) The transport you provided. Example: `udp`. | | `calling.client_auth` | object \| null | (one of: OK) The `username` / `password` you provided, if any; `null` when there is no authentication. | | `calling.client_auth.username` | string | (one of: OK) The username for digest authentication, as you set it. | | `calling.client_auth.password` | string | (one of: OK) The password for digest authentication, as you set it. | | `calling.codec_pref` | string | (one of: OK) The codecs in use — `PCMU,PCMA` until you set your own. Example: `PCMU,PCMA`. | | `calling.call_hours` | object \| null | (one of: OK) The call hours you provided, as saved (times as `HHMM`, days in capitals); `null` when there are no call hours. | | `calling.concurrency_limit` | integer | (one of: OK) The number of concurrent calls allowed for your account (1 by default). Read-only: contact support if you need more. Example: `1`. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `status` | string | (one of: FAIL) FAIL — the request was not carried out and nothing was saved. `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `2` — 'from' is missing, invalid JSON, or a temporary error — try again; `3` — Wrong apiKey, or the "from" number is not registered with us; `4` — 'status' must be true / false; `5` — 'sip_host' is empty, invalid, or a private / internal address; `6` — 'sip_port' is empty, invalid, or not between 1 and 65535; `7` — 'sip_transport' must be udp / tcp / tls; `8` — 'client_auth' is missing the username / password, or has characters that are not allowed; `9` — 'codec_pref' is empty or invalid; `10` — 'call_hours' is not an object, or its status is not ENABLED / DISABLED; `11` — 'timezone_id' is missing for call_hours, or is not a valid IANA time zone; `12` — 'weekly_operating_hours' is missing or empty, or one of its entries is invalid (day, time, open not before close, more than 2 or overlapping entries in a day, more than 14 entries); `13` — 'holiday_schedule' is invalid (or a date is in the past); `14` — Calling can't be enabled: the daily limit of the number must be at least 2000 conversations; `15` — Calling is temporarily disabled for this number (call quality or spam); `16` — The support team did not enable calling for your number, please contact support; `17` — Settings rejected, please contact support. | #### Example: OK Calling is on, and the calls are forwarded to your SIP server. ```json { "status": "OK", "from": "972771234567", "calling": { "status": true, "sip_host": "sip.your-company.com", "sip_port": 5060, "sip_transport": "udp", "client_auth": null, "codec_pref": "PCMU,PCMA", "call_hours": null, "concurrency_limit": 1 }, "reason": 1 } ``` #### Example: OK + digest auth The response to the "Digest auth" request, on a number where calling was enabled before. ```json { "status": "OK", "from": "972771234567", "calling": { "status": true, "sip_host": "sip.your-company.com", "sip_port": 5060, "sip_transport": "udp", "client_auth": { "username": "whatsapp", "password": "Str0ng-Pass!" }, "codec_pref": "PCMU,PCMA", "call_hours": null, "concurrency_limit": 1 }, "reason": 1 } ``` #### Example: OK + call hours The response to the "Call hours" request, on a number whose SIP server was set before. ```json { "status": "OK", "from": "972771234567", "calling": { "status": true, "sip_host": "sip.your-company.com", "sip_port": 5060, "sip_transport": "udp", "client_auth": null, "codec_pref": "PCMU,PCMA", "call_hours": { "status": "ENABLED", "timezone_id": "Asia/Jerusalem", "weekly_operating_hours": [ { "day_of_week": "SUNDAY", "open_time": "0900", "close_time": "1700" }, { "day_of_week": "MONDAY", "open_time": "0900", "close_time": "1700" }, { "day_of_week": "TUESDAY", "open_time": "0900", "close_time": "1700" }, { "day_of_week": "WEDNESDAY", "open_time": "0900", "close_time": "1700" }, { "day_of_week": "THURSDAY", "open_time": "0900", "close_time": "1700" }, { "day_of_week": "FRIDAY", "open_time": "0900", "close_time": "1300" } ], "holiday_schedule": [ { "date": "2027-04-22", "start_time": "0000", "end_time": "2359" } ] }, "concurrency_limit": 1 }, "reason": 1 } ``` #### Example: Reason 5 'sip_host' is empty, invalid, or a private / internal address. ```json { "status": "FAIL", "reason": 5 } ``` #### Example: Reason 13 'holiday_schedule' is invalid — for example, a date in the past. ```json { "status": "FAIL", "reason": 13 } ``` #### Example: Reason 14 The daily limit of the number is below 2000 conversations. ```json { "status": "FAIL", "reason": 14 } ``` #### Example: Reason 16 Calling was not enabled for your number yet — contact support. ```json { "status": "FAIL", "reason": 16 } ``` --- # Get Call Settings Source: https://docs.99digital.co.il/whatsapp-api/whatsapp-calls/get-call-settings Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/whatsapp-calls/get-call-settings.md Section: WhatsApp API › WhatsApp Calls `POST https://api.99digital.co.il/whatsapp/v2/getCall` See your current WhatsApp calling settings: your SIP server, call hours and concurrent call limit. The Get Call endpoint allows you to see the settings you provided on [`/setCall`](https://docs.99digital.co.il/whatsapp-api/whatsapp-calls/set-call-configuration), plus the number of concurrent calls allowed for your account. Anything you never set is `null`, `status` is `false` until you enable calling, and `codec_pref` shows the default `PCMU,PCMA` until you set your own. ## Settings | Setting | Value | | --- | --- | | URL | `https://api.99digital.co.il/whatsapp/v2/getCall` | | Method | JSON via POST | | Key | Value | | --- | --- | | apiKey | Your API key for the service | ## Body | Parameter | Description / Example | | --- | --- | | from | Your WhatsApp account. International number without `+`. For example: `972771234567` | ## Response ```json { "status": "OK", "from": "972771234567", "calling": { "status": true, "sip_host": "sip.your-company.com", "sip_port": 5060, "sip_transport": "udp", "client_auth": null, "codec_pref": "PCMU,PCMA", "call_hours": null, "concurrency_limit": 1 }, "reason": 1 } ``` ## Response-Explain | Parameter | Description | | --- | --- | | status | `OK` or `FAIL` | | from | Your WhatsApp account | | calling->status | `true` or `false`: `true` when calling is enabled (the call icon is shown) | | calling->sip_host | The SIP host you provided (SIP trunk) | | calling->sip_port | The SIP port you provided | | calling->sip_transport | The transport you provided | | calling->client_auth | The `username` / `password`, if provided; `null` when there is no authentication | | calling->codec_pref | The codecs in use — `PCMU,PCMA` until you set your own | | calling->call_hours | The call hours you provided, as saved; `null` when there are no call hours | | calling->concurrency_limit | The number of concurrent calls allowed for your account (1 by default). Contact support if you need more. | | reason | The status explanation — see the table below. | | reason | Description | | --- | --- | | 1 | Not FAIL. The status is OK. | | 2 | `from` is missing, or invalid JSON | | 3 | Wrong apiKey, or the "from" number is not registered with us | ## Authentication `apiKey` in the header — Your API key for the service. ## Request body Content type: `application/json` (required) | Field | Type | Required | Description | | --- | --- | --- | --- | | `from` | string | Yes | Your WhatsApp account. International number without `+`. Example: `972771234567`. | ### Example (generated from the schema) ```json { "from": "972771234567" } ``` ## Responses ### 200 — The request was processed. Both a successful and a failed request answer with HTTP 200 — check `status`, and `reason` when it is FAIL. Content type: `application/json` | Field | Type | Description | | --- | --- | --- | | `status` | string | (one of: OK) OK — the response carries your calling settings. Always `OK`. | | `from` | string | (one of: OK) Your WhatsApp account. Example: `972771234567`. | | `calling` | object | (one of: OK) Your calling settings. | | `calling.status` | boolean | (one of: OK) `true` or `false`: `true` when calling is enabled (the call icon is shown). Example: `true`. | | `calling.sip_host` | string \| null | (one of: OK) The SIP host you provided (SIP trunk). Example: `sip.your-company.com`. | | `calling.sip_port` | integer \| null | (one of: OK) The SIP port you provided. Example: `5060`. | | `calling.sip_transport` | string \| null | (one of: OK) The transport you provided. Example: `udp`. | | `calling.client_auth` | object \| null | (one of: OK) The `username` / `password`, if provided; `null` when there is no authentication. | | `calling.client_auth.username` | string | (one of: OK) The username your SIP server accepts for digest authentication, as you set it with Set Call. | | `calling.client_auth.password` | string | (one of: OK) The password your SIP server accepts for digest authentication, as you set it with Set Call. | | `calling.codec_pref` | string | (one of: OK) The codecs in use — `PCMU,PCMA` until you set your own. Example: `PCMU,PCMA`. | | `calling.call_hours` | object \| null | (one of: OK) The call hours you provided, as saved; `null` when there are no call hours. | | `calling.concurrency_limit` | integer | (one of: OK) The number of concurrent calls allowed for your account (1 by default). Contact support if you need more. Example: `1`. | | `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. | | `status` | string | (one of: FAIL) FAIL — the request was not carried out. `reason` says why. Always `FAIL`. | | `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `2` — 'from' is missing, or invalid JSON; `3` — Wrong apiKey, or the "from" number is not registered with us. | #### Example: OK Calling is on, and the calls are forwarded to your SIP server. ```json { "status": "OK", "from": "972771234567", "calling": { "status": true, "sip_host": "sip.your-company.com", "sip_port": 5060, "sip_transport": "udp", "client_auth": null, "codec_pref": "PCMU,PCMA", "call_hours": null, "concurrency_limit": 1 }, "reason": 1 } ``` #### Example: All settings With digest authentication and call hours. ```json { "status": "OK", "from": "972771234567", "calling": { "status": true, "sip_host": "sip.your-company.com", "sip_port": 5061, "sip_transport": "tls", "client_auth": { "username": "whatsapp", "password": "Str0ng-Pass!" }, "codec_pref": "PCMU,PCMA", "call_hours": { "status": "ENABLED", "timezone_id": "Asia/Jerusalem", "weekly_operating_hours": [ { "day_of_week": "SUNDAY", "open_time": "0900", "close_time": "1700" }, { "day_of_week": "MONDAY", "open_time": "0900", "close_time": "1700" }, { "day_of_week": "TUESDAY", "open_time": "0900", "close_time": "1700" }, { "day_of_week": "WEDNESDAY", "open_time": "0900", "close_time": "1700" }, { "day_of_week": "THURSDAY", "open_time": "0900", "close_time": "1700" }, { "day_of_week": "FRIDAY", "open_time": "0900", "close_time": "1300" } ], "holiday_schedule": [ { "date": "2027-04-22", "start_time": "0000", "end_time": "2359" } ] }, "concurrency_limit": 1 }, "reason": 1 } ``` #### Example: Not set yet Nothing was set yet — calling is off. ```json { "status": "OK", "from": "972771234567", "calling": { "status": false, "sip_host": null, "sip_port": null, "sip_transport": null, "client_auth": null, "codec_pref": "PCMU,PCMA", "call_hours": null, "concurrency_limit": 1 }, "reason": 1 } ``` #### Example: Reason 3 Wrong apiKey, or the "from" number is not registered with us. ```json { "status": "FAIL", "reason": 3 } ``` --- # Template, Conversation and Message Source: https://docs.99digital.co.il/whatsapp-api/information/template-conversation-and-message Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/information/template-conversation-and-message.md Section: WhatsApp API › Information This page is here to explain the difference between template session time, conversation session time and regular messages, just in case you are still confused. **Template and messages explanation** ## Outgoing | Message type | When you can use it | Opens a 24-hour session? | Counted? | Billed? | | --- | --- | --- | --- | --- | | Regular message ([sendMessage](https://docs.99digital.co.il/whatsapp-api/send-message), [sendFile](https://docs.99digital.co.il/whatsapp-api/send-file), [sendButtons](https://docs.99digital.co.il/whatsapp-api/send-buttons), etc.) | Only if the client sent a message in the last 24 hours | No | No | No | | Marketing template | Anytime you want.
Better not to use it if a 24-hour incoming session is already open. | No | Yes, every template message | Yes | | Utility template | Anytime you want | No | If a 24-hour session is open between you and the client (meaning that the client sent you a message), we don't count.
If the 24-hour session is closed, we count every template message. | A utility template is billed only if there is no 24-hour session open between you and the client | | Authentication template | Anytime you want | No | Yes, every template message | Yes | ## Incoming | Message type | Opens a 24-hour session? | Counted? | Billed? | | --- | --- | --- | --- | | Incoming message for the first time in 24 hours (no session is open) | Yes | Yes | Depends on your contract terms with 99 Digital | | Incoming message within 24 hours of the message that opened the session | No, the session is still open | No | No | ## Counted vs. billed "Counted" means that our system counts the session or the template and shows it to you on the webhook (`isNewConversation` on an incoming message, `isBilledTemplate` on a status update). The counting makes it easier for you to know when there is a new interaction between the business and the client. This is mostly for statistics and usage transparency. "Billed" means that our system is billing your business for this event. This is what we charge you on the monthly usage invoice. The counting for an **incoming message** happens when the client sends a message (and this is unrelated to any template messages you sent to the client prior to that). This opens an incoming message conversation session. The session lasts 24 hours from that message; the client's first message after that opens, and is counted as, a new session. The counting for the **templates** only happens when the business sends a billed template to the user and the status of the template is either "read" or "delivered". There is no billing or counting if the status remains "sent" or changes to "failed". ## Easy examples for incoming messages and business messages | Scenario | Counted as | Billed? | | --- | --- | --- | | Client sends a new message to the business, and the business replies with a utility template right away | Incoming message session | Depends on your contract | | Client sends a new message to the business, and the business replies with a marketing template (not recommended) | 1 incoming message session + 1 marketing template | Yes | | Client sends a new message to the business, and the business replies with a regular message | Incoming message session | Depends on your contract | | Client sends a new message to the business, and the business replies back after more than 24 hours with a utility template | 1 incoming message session + 1 utility template | Yes | | Client sends 1 new message to the business, and then sends another 100 different messages to the business within 24 hours | 1 incoming session | Depends on your contract | | Client sends a message to the business (a 24-hour session is open), and the business replies with either a utility template or a regular message | No count | No | | Business sends a utility template, the client replies back, and the business sends another utility template message | 1 utility template + 1 incoming session | Yes | | Business sends a utility template, the client did not reply back, and the business sends another utility template message | 2 utility templates | Yes | | Business sends a utility template, the client replies back, and the business sends a marketing template | 1 utility template + 1 incoming session + 1 marketing template | Yes | | Business sends an authentication template | 1 authentication template | Yes | \*\* "Client sends a new message" means a new message after 24 hours: a message sent when no session is open, more than 24 hours after the message that opened the previous session. ![A client message starts a 24-hour session. Inside the session, regular messages (text, file, buttons) and utility templates are free to send. After 24 hours the session is closed: regular messages are not allowed, and marketing and utility templates are billed.](https://storage.99digital.online/docs/information1.png) If you have more questions regarding this, please contact support. --- # Rate Limit Source: https://docs.99digital.co.il/whatsapp-api/information/rate-limit Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/information/rate-limit.md Section: WhatsApp API › Information The WhatsApp API (v2) has rate limits (from Meta/Facebook's side). Please read the following information carefully so you can better prepare your code while building the solution for your customers. ## Daily rate limit rules 1. Every new phone number starts with a daily limit of 250 _business-initiated_ conversations. This means that you can start up to 250 new conversations with WhatsApp numbers in 24 hours. If a customer starts the conversation, and not your business, you can reply to unlimited conversations. The 250 per 24 hours only applies when you start the conversation with your customers (in other words, it's 250 conversations per 24 hours that started with a template message). 2. You can move from 250 per day to 2,000 per day if one of the following happens: - You verify your business on Facebook. If your business is already verified, you will move to 2,000 automatically. You can send the link for business verification if you wish to help your client verify their business, but this process must be done by the business itself. [Go to the business verification page](https://business.facebook.com/settings/security). - You start 1,000 business-initiated conversations with unique customers over 7 consecutive days, without getting spam reports. Once you meet _one_ of them, you will be switched to 2,000 conversations per 24 hours. 3. You can move from 2,000 / 24 hours to 10,000 / 24 hours if you open at least 1,000 new business-initiated conversations in 7 consecutive days. After reaching this limit, wait 6 hours and 10,000 will be opened for you (assuming, of course, that you keep high-quality templates without spam reports). 4. You can move from 10,000 / 24 hours to 100,000 / 24 hours if you open at least 5,000 new business-initiated conversations in 7 consecutive days. After reaching this limit, wait 6 hours and 100,000 will be opened for you (assuming, of course, that you keep high-quality templates without spam reports). 5. You can move from 100,000 / 24 hours to UNLIMITED / 24 hours if you open at least 50,000 new business-initiated conversations in 7 consecutive days. After reaching this limit, wait 6 hours and unlimited will be opened for you (assuming, of course, that you keep high-quality templates without spam reports). Moving forward in the daily rate limit is done automatically 24 hours after reaching the threshold. :::tip Your number's current daily limit is the `dailyLimit` field of [Get Profile](https://docs.99digital.co.il/whatsapp-api/profile/get-profile). ::: :::info[Important note] Starting November 2025, Meta counts the limit _per business_ and not _per phone number_. What does it mean for you? All your phone numbers under the same business manager are counted together to reach the daily limit that moves you to the next tier (250 → 2,000 → 10,000 → 100,000 → unlimited), so once you reach it, all of the phone numbers in that business manager are upgraded. As a result, the daily limit is also shared between all the phone numbers in the business. If your business has two phone numbers, the business capability is 250 per day, and one phone number reached 250 in a given day, the other phone number won't be able to send new business templates until 24 hours have passed. To conclude: all phone numbers under the same business share the same limit, for the good and for the bad. ::: ## Messaging rate limit rules 1. Every WhatsApp API number has a default sending rate limit of 80 messages (of any kind: templates, messages, files) _per second_. This means that every WhatsApp number can send up to 80 messages per second in total (incoming messages don't count toward this limit). 2. You can move from 80 messages per second to 1,000 messages per second if all of the following happen: - You reach the UNLIMITED daily rate limit (as explained in item 5 of the [daily rate limit rules](#daily-rate-limit-rules) above). - You did not receive any spam reports in the last 7 days. You will get the 1,000 per second automatically when both of the above happen. 3. You can send up to 10 messages (of any kind: templates, messages, files) _per minute_ to the _same phone number_. This is to avoid sending too many messages to the same WhatsApp client. There is a small exception: you can "borrow" capacity from the next minutes, for _up to 45 messages_. For example, in normal scenarios you can send 10 messages in 1 minute to the same phone number. Let's assume you want to send 45 messages now: you will be able to do that, but after those 45 messages you will have to wait 4.5 minutes to send the next message. For easy calculations, you can consider the rate limit to be 0.17 messages per second to the same phone number. The rate limit error will be received as a webhook later on (`messageUpdate` 16). 4. You can send up to 2 marketing templates to the same phone number in 24 hours. Meta also counts all the marketing templates that an end user's WhatsApp number received recently (not only from you, but from anyone), and might even lower the 2 marketing templates for that end user, to keep WhatsApp users from receiving too much marketing on the WhatsApp platform. A webhook with an error will be received when this happens (`messageUpdate` 14). This doesn't apply to utility templates or to normal messages within the 24-hour session. :::note Error webhooks reach you only when system messages are turned on (`system: 1` in [Set Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook)). ::: ## Phone number limit rules 1. A verified business is allowed up to 20 phone numbers (20 WhatsApp API accounts). Most businesses don't need more than 3, so you have more than enough here. If you need more than 20, contact our support. 2. A non-verified business can only have 2 phone numbers under its business manager. If the business reaches 2,000 messages per day, it has the same limit as a verified business: up to 20 numbers. If you have more questions regarding this, please contact support. --- # Coexistence Source: https://docs.99digital.co.il/whatsapp-api/information/coexistence Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/information/coexistence.md Section: WhatsApp API › Information This feature allows your client to connect to the WhatsApp API with their own number and keep using their WhatsApp Business app together with it. Partners can create an onboarding link with this feature, which enables coexistence while the client completes the onboarding process. ## Important remarks Make sure you read and understand them all: 1. The client can only onboard numbers that are present in the WhatsApp Business app, not the regular WhatsApp app. If the client uses the regular WhatsApp app and wants to use the API, it is possible to migrate the number from one app to the other: just let the client download the official WhatsApp Business app and register the same number. WhatsApp will migrate everything, and then they can onboard. 2. The WhatsApp Business app version must be 2.24.17 or higher. 3. While onboarding, the client will be asked if they want to share their chat history with the API. If they accept, the system will extract 6 months of history, allowing you to get it (using [Get History](https://docs.99digital.co.il/whatsapp-api/get-history)) so you can show it in your system for a complete, user-friendly experience. It's completely up to you whether you want the history or not (after the client approves it). Media is not supported, only written messages. 4. Every incoming message (from end users) will arrive in the client's app (as it did before) and also to the API, so both of you get the same message. 5. Every outgoing message from the API will be visible inside the client's WhatsApp mobile app. 6. Every outgoing message that the client sends themselves from the WhatsApp app will trigger a webhook to tell you that the client sent an outgoing message from the app. 7. Groups are not supported. Incoming and outgoing group messages will only work in the mobile app and will not be visible in the API. 8. In order to create a better user experience, you are limited to 20 messages per second (outgoing) and not 80 messages per second as in an API-only account (see [Rate Limit](https://docs.99digital.co.il/whatsapp-api/information/rate-limit)). 9. Regarding pricing: everything that happens in the mobile app is free, as it was before the connection. Incoming and outgoing messages are all the same as they were (outgoing messages from the mobile app don't need a template). Everything that is done from the API keeps the same pricing as before: marketing and utility templates as they were. Example use case, so you better understand item 9: a client completed the coexistence onboarding, and their mobile app and the API are now synced. If you want to send a message to an end user from the API, you must send a template if there was no open session in the last 24 hours. The client, however, can send a message freely to new numbers: they don't "feel" the 24-hour session limitation in the WhatsApp app. If an end user sends a message to your client, you will get it through the API (as explained in item 4 above), and because of that it opens a 24-hour session, as it does today, so you can send free messages without templates from the API. 10. Disappearing messages (messages that disappear after some time) will be disabled in the mobile app (only groups can still use this feature). 11. "View once" messages (messages that can be opened only once) will be disabled in the mobile app (only groups can still use this feature). 12. All other special WhatsApp features will remain in the app only (such as channels, status, greeting messages, away messages, voice and video calls, broadcasts, live location messages, etc.). 13. Once the coexistence onboarding is completed, all linked devices (WhatsApp Web, the WhatsApp desktop app for Mac or Windows) will be disconnected, and they can be re-linked if needed. WhatsApp for Windows and Wear OS are currently not supported as linked devices for triggering the outgoing message webhook, so for Windows users it is better to re-link with WhatsApp Web instead. The client can use the Windows app as a linked device, but the API will not see any outgoing message that was sent from the Windows app or Wear OS. 14. During onboarding, the client will be required to scan a QR code or enter a code sent to their WhatsApp, to confirm the connection. 15. The client can stop using coexistence (on their side) directly from their app at any time. 16. The client must open the WhatsApp Business app (on their phone) at least once every 20 days to keep the connection active. These are similar rules to using WhatsApp Web. 17. The display name, profile picture and profile settings (website, email, description) can only be changed or set by the client from the WhatsApp Business app, not from the API. ## How to use and how to onboard a coexistence client 1. From the partners platform, create a new onboarding, setting the `whatsapp` parameter to `1`. This tells the system not to use an existing verified number. The system will generate a temporary WhatsApp number starting with 97257 until a real number is connected. 2. The client opens the onboarding link and selects "Connect a WhatsApp Business App" when asked to create a WhatsApp account. 3. The client will be asked for their WhatsApp phone number, and then they will get a WhatsApp message (on their WhatsApp number) from the system to accept the connection. Tell them to check their WhatsApp messages. Clicking the WhatsApp message opens the camera on their phone, and a QR code will be shown for them to scan. They can either scan the QR code on the onboarding page, or enter a code instead (if the camera is not working for any reason). 4. Once they do it, they can choose whether to share 6 months of chat history (no files) or not. 5. After the client finishes the onboarding, the partner will get the same webhooks as for setting up any account, with the WhatsApp number (the real number) and the `apiKey`. 6. Once the onboarding finishes, tell the client to open the WhatsApp app on their phone (in case it's not open in the foreground) to allow a quick history sync (if they accepted it). 7. 10 minutes after the onboarding is completed, you can use [Get History](https://docs.99digital.co.il/whatsapp-api/get-history) to see the 6 months of history that was extracted. If no history is there, it means that the client did not give permission to extract it: a clean slate. 8. Before you start onboarding coexistence clients, make sure you listen to 2 new webhooks: outgoing messages (`hook: outgoing`) and contact messages (`hook: contact`). They are described on the [Outgoing Messages](https://docs.99digital.co.il/whatsapp-api/webhook/outgoing-messages) and [Contacts Update](https://docs.99digital.co.il/whatsapp-api/webhook/contacts-update) pages. When the client sends a message directly from their mobile phone, you will get an `outgoing` webhook so you know this event happened. When the recipient receives the message, you will also get read status webhooks for that outgoing message (when `readStatus` is on in [Set Webhook](https://docs.99digital.co.il/whatsapp-api/webhook/set-webhook)). So you not only get notified about outgoing messages, you also get webhooks about their read status. 9. During onboarding (or right after it) you might start getting `contact` webhooks updating you about all the contacts the client added to their phone book. Alternatively, you can always use the [Get Contacts](https://docs.99digital.co.il/whatsapp-api/get-contacts) endpoint to see all contacts. 10. Remember: the client is in control. The client decides the display name, the profile settings, if and when to disconnect, and so on. If you have more questions regarding this, please contact support. --- # Username Source: https://docs.99digital.co.il/whatsapp-api/information/username Markdown: https://docs.99digital.co.il/markdown/whatsapp-api/information/username.md Section: WhatsApp API › Information ## Overview WhatsApp is introducing usernames: an optional feature that allows users to hide their phone number and communicate using a username instead (similar to Telegram). This is being rolled out gradually, starting late 2026. :::warning This is a critical update. If your system relies on phone numbers as the primary identifier for incoming messages, you must adapt your integration to support the new user id field. ::: ## What is this feature? Meta is allowing WhatsApp users who opt in to hide their phone number by choosing a username (e.g. `@john.smith`). Once a user enables this, their communication with new contacts and businesses will use this hidden identity. **Key point:** this is an opt-in feature. Users who don't adopt a username will continue to work exactly as they do today — no changes to your integration are required for those users. ## What changes in your webhooks? Currently, when you receive an incoming message via webhook, the sender's phone number is included in the payload (in the `from` field). Once a user enables usernames, their phone number may be hidden, and you will get a user id instead, which is a two-letter country code + dot + 16 digits. The user id arrives in the `from_id` field. When the phone number is hidden, `from` holds the user id as well, and `phone` is `null`. The phone number will still appear in your webhooks if you sent or received a message with this user's phone number within the last 30 days (evaluated per business phone number). ## Understanding the user id The user id is the new primary identifier for WhatsApp users. Think of it as the replacement for the phone number as your "primary key". ### Format The id consists of an ISO country code, a period, and a long numeric string. For example: `IL.1605856887361213`. The country code prefix lets you identify the user's country of origin (e.g. IL = Israel, US = United States). You can also use the `country` field that arrives in the webhook. ### Key characteristics - Automatically generated by Meta — you don't create or manage them. - Always present in webhooks, for every user, regardless of username adoption. - Permanent and stable — it will not change. - **Scoped to your business portfolio:** the same end user will have a different user id for each business portfolio they interact with. You cannot use the user id from one portfolio to message the user from a line in another portfolio. :::warning[Important] The user id is tied to your business portfolio, not to a single WhatsApp API line. All your lines in the same portfolio see the same user id for a user. If you have lines in different portfolios and the same user contacts both, they will have a different user id on each. ::: ## Sending messages You use the `to` field the same way as before: you can now send either the international phone number or the user id. **If you already know the user's phone number,** you can still send messages using the phone number — even if the user has enabled usernames. The username feature does not block outbound messages to known phone numbers. To ask a user who hides their phone number to share it with you, use [Request Phone](https://docs.99digital.co.il/whatsapp-api/request-phone). ## Frequently asked questions ### Can I send a message to a username (e.g. `@john.smith`)? No. Via the API, you can only send messages using a phone number or a user id. Usernames are for display and for person-to-person communication within the WhatsApp app. Users can search for each other by username in the app, but the API does not support addressing messages to a username. ### If I already know a user's phone number and they enable usernames, can I still message them? Yes. The username feature does not block messages sent to a known phone number. If you have the user's phone number from any source (a call, a form, a previous conversation), you can continue messaging them exactly as you do today. ### Will I still see the phone number for users who previously chatted with me? If the user interacted with your line after April 1, 2026, their phone number will be present permanently. You will continue to see their phone number in all webhooks, even if they later enable usernames. The phone number is also included if you had any interaction within the last 30 days. ### Can I use the same user id across different WhatsApp API lines? Only between lines in the same business portfolio: the user id is scoped to the portfolio level. If you have lines in different portfolios, the same user will have a different user id on each. Note: the user id is permanent and will never change (unlike the username, which the user can modify). The user cannot see or control their user id. ### Can a user hide their phone number without setting a username? No. Based on the current implementation, a user must adopt a username to hide their phone number. There is no standalone "hide phone number" toggle without a username. However, having a username does not automatically hide the phone number from your webhooks — the 30-day and previous interaction rules still apply. ### What happens to the user's display name (profile name)? The profile name is always present in webhooks (`senderName`), regardless of username adoption. It is not affected by this feature. ## Updates This document will be updated when more information is available. :::note Sending messages using a user id in the `to` field may not be supported on all WhatsApp accounts yet, as this feature is currently undergoing updates by Meta. :::