openapi: 3.2.0 info: title: Route Mobile Webhooks API x-refined-note: - x-logo differs across the merged source definitions and was not carried version: '1.0' description: 'Operations tagged Webhooks across 2 of this provider''s published API definitions: route-mobile-sendclean-email.yml, route-mobile-whatsapp-business.yml. Each path carries the servers of the definition it was published in.' servers: - url: https://api.sendclean.net/v1.0 description: Production API server - url: https://apis.rmlconnect.net tags: - name: Webhooks description: Configure event webhooks for email delivery events paths: /settings/addWebhook: post: tags: - Webhooks summary: Add a webhook description: 'Registers a new webhook URL to receive email event notifications. **Supported events:** `send`, `open`, `click`, `soft_bounce`, `hard_bounce`, `spam` **Important:** The webhook URL must respond with `God bless you, SendClean` to pass the validation check. SendClean signs webhook POST requests with an HMAC-SHA1 signature in the `X-SendCleanTES-SIGNATURE` header for optional verification. See the Webhook Authentication section for details. ' operationId: addWebhook requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/AddWebhookRequest' example: owner_id: example id token: example token url: https://example.com/webhook event: send,open,click,soft_bounce,hard_bounce,spam description: My event webhook store_log: Enable responses: '200': description: Webhook added content: application/json: schema: oneOf: - $ref: '#/components/schemas/SuccessResponse' - $ref: '#/components/schemas/ErrorResponse' examples: success: value: status: success message: Webhook Added servers: - url: https://api.sendclean.net/v1.0 description: Production API server /settings/editWebhook: post: tags: - Webhooks summary: Edit a webhook description: Updates the configuration of an existing webhook. operationId: editWebhook requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/EditWebhookRequest' example: owner_id: example id token: example token webhook_id: '424353445757557577457' url: https://example.com/webhook-v2 event: open,click responses: '200': description: Webhook updated content: application/json: schema: oneOf: - $ref: '#/components/schemas/SuccessResponse' - $ref: '#/components/schemas/ErrorResponse' examples: success: value: status: success message: Webhook Edited servers: - url: https://api.sendclean.net/v1.0 description: Production API server /settings/keyResetWebhook: post: tags: - Webhooks summary: Reset webhook authentication key description: 'Generates a new authentication/signing key for the specified webhook. **Note:** SendClean immediately begins using the new key. To avoid dropping webhook batches, return a non-200 status for any batches that fail signature verification, and update your application with the new key before retrying. ' operationId: keyResetWebhook requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/WebhookIdRequest' example: owner_id: example id token: example token webhook_id: '424353445757557577457' responses: '200': description: Webhook key reset content: application/json: schema: oneOf: - $ref: '#/components/schemas/KeyResetWebhookResponse' - $ref: '#/components/schemas/ErrorResponse' examples: success: value: status: success message: Webhook key reseted webhook_id: '424353445757557577457' key: 2fg345gy6r7 servers: - url: https://api.sendclean.net/v1.0 description: Production API server /settings/listWebhook: post: tags: - Webhooks summary: List all webhooks description: Returns all webhooks registered to the account. operationId: listWebhooks requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/AuthFields' example: owner_id: example id token: example token responses: '200': description: List of webhooks content: application/json: schema: oneOf: - $ref: '#/components/schemas/ListWebhookResponse' - $ref: '#/components/schemas/ErrorResponse' servers: - url: https://api.sendclean.net/v1.0 description: Production API server /settings/deleteWebhook: post: tags: - Webhooks summary: Delete a webhook description: Permanently removes a webhook from the account. operationId: deleteWebhook requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/WebhookIdRequest' example: owner_id: example id token: example token webhook_id: '424353445757557577457' responses: '200': description: Webhook deleted content: application/json: schema: oneOf: - $ref: '#/components/schemas/SuccessResponse' - $ref: '#/components/schemas/ErrorResponse' examples: success: value: status: success message: Webhook Deleted servers: - url: https://api.sendclean.net/v1.0 description: Production API server /settings/getWebhookInfo: post: tags: - Webhooks summary: Get webhook details description: Returns detailed information about a specific webhook, including delivery stats. operationId: getWebhookInfo requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/WebhookIdRequest' example: owner_id: example id token: example token webhook_id: '424353445757557577457' responses: '200': description: Webhook info content: application/json: schema: oneOf: - $ref: '#/components/schemas/WebhookInfoResponse' - $ref: '#/components/schemas/ErrorResponse' servers: - url: https://api.sendclean.net/v1.0 description: Production API server /callbacks: post: tags: - Webhooks summary: WhatsApp Client Callback description: "Client Callback APIs allow you to receive real-time notifications (callbacks) for events that occur on your WhatsApp Business account. These callbacks are triggered by events that occur on the WhatsApp server, and are delivered to a URL that you specify in your webhook configuration.\n\nFor more information, see the [Route Mobile WhatsApp OpenAPI Specifications](https://routemobile.github.io/WhatsApp-Business-API/WBS.html).\n\n## Callback Error Codes\n| **Code** | **Text** | **Description** |\n| --- | --- | --- |\n| 400 | Media download error | There was an error while downloading media. |\n| 401 | Group does not exist | The specified group does not exist. |\n| 402 | Others | An unspecified error occurred. |\n| 403 | Error code for blacklisting | The given number is blacklisted. |\n| 408 | Message is not valid | The message is not valid or malformed. |\n| 410 | Message expired | The message has expired and cannot be delivered. |\n| 429 | Rate limit hit | The rate limit for API calls has been reached. |\n| 430 - 433 | Others | Unspecified errors occurred. |\n| 470 | Re-engagement message | The message is a re-engagement message. |\n| 471 | Spam Rate limit | The rate limit for sending spam messages has been reached. |\n| 472 | User's number is part of an experiment | The user's number is part of an experiment and cannot be used. |\n| 500 | Unknown Error | An unknown or unexpected error occurred. |\n| 1000 | Others | Unspecified errors occurred. |\n| 1001 | Message too long | The message exceeds the maximum length allowed. |\n| 1002 | Invalid recipient type | The recipient type specified is not valid. |\n| 1003 | Not a group participant | The user is not a participant of the group. |\n| 1004 | Resource already exists | The resource being created already exists. |\n| 1005-1006 | Others | Unspecified errors occurred. |\n| 1008 | Required parameter is missing | A required parameter for the API call is missing. |\n| 1009 | Parameter value is not valid | The value provided for a parameter is not valid. |\n| 1010 | Parameter is not required | A parameter that was provided is not required for the API call. |\n| 1011-1011 | Others | Unspecified errors occurred. |\n| 1012 | Group is unknown | The specified group is unknown. |\n| 1013 | User is not valid | The specified user is not valid. |\n| 1014 | Corrupt Image | The image provided is corrupt or invalid. |\n| 1015-1018 | Others | Unspecified errors occurred. |\n| 1019 | Not a group admin | The user is not an admin of the group. |\n| 1020 | Bad group | The specified group is invalid or bad. |\n| 1021 | Bad User | The specified user is invalid or bad. |\n| 1022-1024 | Others | Unspecified errors occurred. |\n| 1025 | Invalid Request | The API request is invalid. |\n| 1026 | Receiver Incapable | The receiver is incapable of receiving the message. |\n| 2000 | Template Param Count Mismatch | The number of parameters provided for a template does not match the required count. |\n| 2001 | Template Missing | The specified template does not exist. |\n| 2002 | Template Fetch Failed | Failed to fetch the template. |\n| 2003 | Template Pack Missing | The template pack is missing. |\n| 2004 | Template Param Length Too Long | The length of a parameter in the template is too long. |\n| 2005 | Template Hydrated Text Too Long | The length of the hydrated text in the template is too long. |\n| 2006 | Template White Space Policy Violated | The template violates the white space policy. |\n| 2007 | Template Format Character Policy Violated | The template violates the format character policy. |\n| 2008 | Template Media Format Unsupported | The media format in the template is unsupported. |\n| 2009 | Template Required Component Missing | A required component in the template is missing. |\n| 2010 | Template Invalid Hydrated URL | The hydrated URL in the template is invalid. |\n| 2011 | Template Invalid Phone Number | The phone number in the template is invalid. |\n| 2012 | Template Parameter Format Mismatch | The format of a parameter in the template is mismatched. |\n| 2013 | Template Buttons Unsupported | The buttons in the template are unsupported. |\n| 0 | AuthException | An authentication exception occurred. |\n| 3 | API Method | An error occurred with the API method. |\n| 10 | Permission Denied | The user does not have the necessary permissions to perform the requested action. |\n| 190 | Access token has expired | The access token used for authentication has expired. |\n| 200-299 | API Permission | The API call requires specific permissions, and the user does not have them. |\n| 4 | API Too Many Calls | The API call limit has been exceeded. |\n| 80007 | Rate limit issues | There are issues with the rate limits for API calls. |\n| 130429 | Rate limit hit | The rate limit for API calls has been reached. |\n| 131048 | Spam rate limit hit | The rate limit for sending spam messages has been reached. |\n| 131056 | (Business Account, Consumer Account) pair rate limit hit | The rate limit for a specific pair of business and consumer accounts has been reached. |\n| 368 | Temporarily blocked for policy violations | The user or account has been temporarily blocked due to policy violations. |\n| 131031 | Account has been locked | The user's account has been locked. |\n| 1 | API Unknown | An unknown error occurred with the API. |\n| 2 | API Service | An error occurred with the API service. |\n| 33 | Parameter value is not valid | The value provided for a parameter is not valid. |\n| 100 | Invalid parameter | The parameter specified in the API call is invalid. |\n| 131000 | Something went wrong | An unspecified error occurred. |\n| 131005 | Access denied | Access to the requested resource is denied. |\n| 131008 | Required parameter is missing | A required parameter for the API call is missing. |\n| 131009 | Parameter value is not valid | The value provided for a parameter is not valid. |\n| 131016 | Service unavailable | The requested service is currently unavailable. |\n| 131021 | Recipient cannot be sender | The recipient of the message cannot be the sender. |\n| 131026 | Message Undeliverable | The message could not be delivered to the recipient. |\n| 131042 | Business eligibility payment issue | There is an issue with the payment for business eligibility. |\n| 131045 | Incorrect certificate | The certificate used for authentication is incorrect. |\n| 131047 | Re-engagement message | The message is a re-engagement message. |\n| 131051 | Unsupported message type | The message type is not supported. |\n| 131052 | Media download error | There was an error while downloading media. |\n| 131053 | Media upload error | There was an error while uploading media. |\n| 132000 | Template Param Count Mismatch | The number of parameters provided for a template does not match the required count. |\n| 132001 | Template does not exist | The specified template does not exist. |\n| 132005 | Template Hydrated Text Too Long | The length of the hydrated text in the template is too long. |\n| 132007 | Template Format Character Policy Violated | The template violates the format character policy. |\n| 132012 | Template Parameter Format Mismatch | The format of a parameter in the template is mismatched. |\n| 132015 | Template parameter invalid | The parameter in the template is invalid. |\n| 133000 | Incomplete Deregistration | The deregistration process is incomplete. |\n| 133004 | Server Temporarily Unavailable | The server is temporarily unavailable. |\n| 133005 | Two-step verification PIN Mismatch | The two-step verification PIN provided does not match. |\n| 133006 | Phone number re-verification needed | Phone number re-verification is required. |\n| 133008 | Too Many two-step verification PIN Guesses | Too many incorrect guesses for the two-step verification PIN. |\n| 133009 | Two-step verification PIN Guessed Too Fast | The two-step verification PIN was guessed too quickly. |\n| 133010 | Phone number Not Registered | The phone number is not registered. |\n| 135000 | Generic user error | A generic error occurred for the user. |\n## Template Status Logs\n| **Template Status**| **Logs** |\n| --- | --- | \n|Template Approved | {\"product\": \"whatsapp\", \"component\": \"whatsapp-callback-event-worker\", \"level\": \"debug\", \"timestamp\": \"2023-11-02 07:40:04.402735\", \"message\": {\"URL\": \"xxxxxxxxxxxxxxxxx\", \"data\": {\"statuses\": [{\"id\": \"xxxxxxxxxxxxxx\", \"template_name\": \"xxxxx\", \"template_id\": xxxxxxxxxxxxxx, \"template_language\": \"en\", \"reason\": \"NONE\", \"status\": \"APPROVED\", \"timestamp\": xxxxxxxx, \"type\": \"event\", \"information\": null}], \"brand_msisdn\": \"{phone}\"}, \"status\": 200, \"response_time\": 0.0xxxxxxxxxxxxxx, \"current_time\": \"xx:xx:xx.xxxxxx\", \"response\": \"{\\\"success\\\":true}\"}}|\n| Template Paused | {\"product\": \"whatsapp\", \"component\": \"whatsapp-callback-event-worker\", \"level\": \"debug\", \"timestamp\": \"2023-11-02 07:37:58.285408\", \"message\": {\"URL\": \"xxxxxxxxxxxxxxxxxxxxx\", \"data\": {\"statuses\": [{\"id\": \"xxxxxxxxxxxxxxx\", \"template_name\": \"abc__1\", \"template_id\": xxxxxxxxxxxxxxx, \"template_language\": \"en\", \"reason\": \"NONE\", \"status\": \"PAUSED\", \"timestamp\": xxxxxxxxxx, \"type\": \"event\", \"information\": {\"title\": \"FIRST_PAUSE\", \"description\": \"Your WhatsApp message template has been paused for x hours until xxx x at xx:xx AM UTC because it had issues.\"}}], \"brand_msisdn\": \"{phone}\"}, \"status\": 200, \"response_time\": 0.0xxxxxxxxxxxxxxx, \"current_time\": \"xxxx-xx-xx xx:xx:xx.xxxxxx\", \"response\": \"{\\\"success\\\":true}\"}} |\n|Template Disabled| {\"product\": \"whatsapp\", \"component\": \"whatsapp-callback-event-worker\", \"level\": \"debug\", \"timestamp\": \"2023-11-02 09:57:45.920074\", \"message\": {\"URL\": \"xxxxxxxxxxxxxxxxxxxxxx\", \"data\": {\"statuses\": [{\"id\": \"xxxxxxxxxxxxxxxxx\", \"template_name\": \"xxxxxxxxxxxxxxx\", \"template_id\": xxxxxxxxxxxxxx, \"template_language\": \"en_US\", \"reason\": \"NONE\", \"status\": \"FLAGGED\", \"timestamp\": xxxxxxxxxx, \"type\": \"event\", \"information\": null}], \"brand_msisdn\": \"{phone}\"}, \"status\": 200, \"response_time\": 0.011070728302001953, \"current_time\": \"xxxx-xx-xx xx:xx:xx.xxxxxx\", \"response\": \"{\\\"status\\\":\\\"ok\\\"}\\n\"}} |\n|Template Deleted |{\"product\": \"whatsapp\", \"component\": \"whatsapp-callback-event-worker\", \"level\": \"debug\", \"timestamp\": \"2023-11-02 10:36:44.798440\", \"message\": {\"URL\": \"xxxxxxxxxxxxxxxxxxxxxxxx\", \"data\": {\"statuses\": [{\"id\": \"xxxxxxxxxxxxxxxx\", \"template_name\": \"testing_02_2023\", \"template_id\": xxxxxxxxxxxxxx, \"template_language\": \"en_US\", \"reason\": \"NONE\", \"status\": \"PENDING_DELETION\", \"timestamp\": xxxxxxxxxxx, \"type\": \"event\", \"information\": null}], \"brand_msisdn\": \"{phone}\"}, \"status\": 200, \"response_time\": 0.0xxxxxxxxxxxxxxxxxx, \"current_time\": \"xxxx-xx-xx xx:xx:xx.xxxxxx\", \"response\": \"{\\\"status\\\":\\\"ok\\\"}\\n\"}}|" operationId: whatsappClientCallback requestBody: description: Webhook payload delivered by Route Mobile when events occur on your WhatsApp Business account. content: application/json: schema: oneOf: - $ref: '#/components/schemas/CallbackIncomingText' - $ref: '#/components/schemas/CallbackIncomingImage' - $ref: '#/components/schemas/CallbackIncomingAudio' - $ref: '#/components/schemas/CallbackIncomingVideo' - $ref: '#/components/schemas/CallbackIncomingDocument' - $ref: '#/components/schemas/CallbackIncomingLocation' - $ref: '#/components/schemas/CallbackIncomingInteractiveList' - $ref: '#/components/schemas/CallbackTemplateQuickReply' - $ref: '#/components/schemas/CallbackIncomingQuickReply' - $ref: '#/components/schemas/CallbackBusinessSingleProduct' - $ref: '#/components/schemas/CallbackSingleProductCart' - $ref: '#/components/schemas/CallbackMultiProductCart' - $ref: '#/components/schemas/CallbackSentDeliveryReport' - $ref: '#/components/schemas/CallbackReadReceipt' - $ref: '#/components/schemas/CallbackFailedDeliveryReport' examples: Incoming Text: value: messages: - id: 6af19ee2-72d9-11ed-88f4-0a58a9fxxxx2 from: '{phone}' type: text timestamp: '1670051363' text: body: Hi message_id: wamid.HBgMOTE3MDQ1MzQ1Mjg1FQIAEhggNEI0OUxxxxxxxxxxxzUxOEVGODBDMEE2QUFCQTg1ODkA contacts: - profile: name: Darryl wa_id: '{phone}' brand_msisdn: '{phone}' request_id: 6af19ee2-72d9-11ed-88f4-0a58xxxxxc02 Incoming Image: value: apiKey: IfgKh@jHkB5%232roUt20nhVgfb!ll*mxxxxxx messages: - from: 91994163xxxx id: ABGGFlA5FpafAgoxxxxxxxxxmuxx image: file: /usr/local/wamedia/shared/b1cf38-8734-4ad3-b4a1-ef0c10d0xxxx id: b1c68f38-8734-4ad3-b4a1-ef0c10xxxx mime_type: image/jpeg sha256: 29ed500fa64eb55fc19dc4124acb300e5dcca301ae99xxxxx caption: Check out my new phone! media_url: https://apis.rmlconnect.net/wba/v1/media?media_id=fc233119-733f-49c-bcbd-bxxxxxxxxxxx&username=demo timestamp: '1521497954' type: image brand_msisdn: '{phone}' request_id: aebeca32-f125-11eb-8c86-0242ac1xxxxx Incoming Audio: value: messages: - from: 91994163xxxx id: ABGGFlA5FpafAgo6tHcNmNjxxxxx timestamp: '1521827831' type: voice voice: file: /usr/local/wamedia/shared/463e/b7ec/ff4e4d9bb11cbdxxxxx id: 463eb7ec-ff4e-4d9b-b110-1879cbdxxxxx mime_type: audio/ogg; codecs=opus sha256: fa9e1807d936b7cebe63654ea3a7912923590521efxxxxxxx media_url: https://apis.rmlconnect.net/wba/v1/media?media_id=fc233119-733f-49c-bcbd-b2f68f7xxxxx&username=demo brand_msisdn: '{phone}' request_id: aebeca32-f125-11eb-8c86-0242acxxxxxx Incoming Video: value: messages: - from: 91994163xxxx id: ABGGFlA5FpafAgo6tHcNmNxxxxxx timestamp: '1521827831' type: voice voice: file: /usr/local/wamedia/shared/463e/b7ec/ff4e4d9bb11cbdxxxxx id: 463eb7ec-ff4e-4d9b-b110-1879cxxxxxxx mime_type: audio/ogg; codecs=opus sha256: fa9e1807d936b7cebe63654ea3a7912923590521exxxxxxxx media_url: https://apis.rmlconnect.net/wba/v1/media?media_id=fc233119-733f-49c-bcbd-b2f68fxxxxxx&username=demo brand_msisdn: '{phone}' request_id: aebeca32-f125-11eb-8c86-0242acxxxxxx Incoming Document: value: apiKey: IfgKh@jHkB5%232roUt20nhVgfb!ll*mvxxxxx messages: - from: 91994163xxxx id: ABGGFlA5FpafAgo6tHcNmNjXxxxx timestamp: '1522189546' type: document document: caption: 80skaraokesonglistaxxxst file: /usr/local/wamedia/shared/fc233119-733f-49c-bcbd-b2f68f79xxxx id: fc233119-733f-49c-bcbd-b2f68f7xxxxx mime_type: application/pdf sha256: 3b11fa6ef2bde1dd14726e09d3eda220f6484f32d5d5caa4xxx media_url: https://apis.rmlconnect.net/wba/v1/media?media_id=fc233119-733f-49c-bcbd-b2f6xxxxxxxx&username=demo brand_msisdn: '{phone}' request_id: aebeca32-f125-11eb-8c86-0242ac1xxxxx Incoming Location: value: contacts: - profile: name: User Name wa_id: '{phone}' messages: - from: 91994163xxxx id: ABGGFlA5FpafAgo6tHcNmNjxxxxx location: address: Main Street Beach, Santa Cruz, CA latitude: 38.9806263495 longitude: -131.9428612257 name: Main Street Beach url: https://foursquare.com/v/xxxxxxx35b5df7744 timestamp: '1521497875' type: location brand_msisdn: '{phone}' request_id: aebeca32-f125-11eb-8c86-0242ac12xxxx Incoming Interactive List: value: contacts: - profile: name: overw@tch wa_id: '{phone}' messages: - context: from: '{phone}' id: gBEGkXBFJzZxAgmfF7hnuD9xxxx from: '{phone}' id: b398502a-eea8-11eb-ac2a-0242ac12xxxx interactive: list_reply: description: yummy flavour id: rd133 title: Fish Masala type: list_reply timestamp: '1627369389' type: interactive brand_msisdn: '{phone}' request_id: b398502a-eea8-11eb-ac2a-0242ac12xxxx Incoming Template Quick Reply: value: contacts: - profile: name: '@@' wa_id: '{phone}' messages: - button: text: Buy Now context: from: '{phone}' id: b7e984f4-94ad-11ec-b1f4-0a58a9fezxxx from: '{phone}' id: d14b9dce-94ad-11ec-ad15-0242ac1xxxxx timestamp: '1645623480' type: button brand_msisdn: '{phone}' request_id: d14b9dce-94ad-11ec-ad15-0242ac12xxxx Incoming Session Quick Reply: value: contacts: - profile: name: overw@tch wa_id: '{phone}' messages: - context: from: '{phone}' id: gBEGkXBFJzZxAgnSloIcxxxxxxo from: '{phone}' id: c5e396fe-eea8-11eb-9e4e-0242ac12xxxx interactive: button_reply: id: aaaa title: 'Yes' type: button_reply timestamp: '1627369420' type: interactive Session Message Business for Single Product: value: contact_no: '{phone}' data: contacts: - profile: name: Justin Joy wa_id: '{phone}' messages: - context: referred_product: catalog_id: 965968xxxxxxxx2 product_retailer_id: 2xxxxxx1 from: '{phone}' id: ABEGkZgxxxxxxxxxxxxxFkqiBiDQ text: body: Hi timestamp: '1655377850' type: text brand_msisdn: '{phone}' time: '2022-06-16 11:10:50.560600' source: FROM_CALLBACK Add Single Product to Cart: value: contact_no: '{phone}' data: contacts: - profile: name: Justin Joy wa_id: '{phone}' messages: - from: 91983302xxxx id: ABEGkZgzAxxxxxxxxxxxxxxJmt4T order: catalog_id: 9659687340xxxxx product_items: - currency: AED item_price: 54 product_retailer_id: 20214xxx quantity: 1 timestamp: '1655377900' type: order brand_msisdn: '{phone}' time: '2022-06-16 11:11:41.204321' source: FROM_CALLBACK Add Multi Product to Cart: value: contact_no: '{phone}' data: contacts: - profile: name: Justin Joy wa_id: '{phone}' messages: - from: 91983302xxxx id: ABEGkZgzAmlUAgo635UDWxqRxxxx order: catalog_id: 9659687340xxxxx product_items: - currency: AED item_price: 54 product_retailer_id: 20xxxx01 quantity: 1 - currency: AED item_price: 40 product_retailer_id: 206xxx00 quantity: 1 timestamp: '1655377983' type: order brand_msisdn: '{phone}' time: '2022-06-16 11:13:03.900579' source: FROM_CALLBACK Sent/Delivery Report: value: statuses: - conversation: expiration_timestamp: 1644060900 id: d24f4c6e3xxxxxxxxxxxfcbd2822fa6a origin: type: user_initiated/business_initiated/referral_conversion id: 5a9f3040-85ae-11ec-8168-0xxxxxxxxxxx pricing: billable: true/false category: user_initiated/business_initiated/referral_conversion pricing_model: CBP recipient_id: '{phone}' status: sent/delivered timestamp: '1643974443' type: message extra: '' message_id: wamid.HBgMOTE3MDQ1MzxxxxxxxxxxxxxxxxxxxxxxxxxxNDA5QzRGRkRFAA== brand_msisdn: '{phone}' Read Report: value: display_no: '{phone}' statuses: - id: f8c7302e-4dfe-11ed-9b08-0xxxxxxxxxx2 recipient_id: xxxxxxxxxxxx status: read timestamp: '1665999302' type: message conversation: id: a58efe0xxxxxxxxxxx3b3015e1573769 origin: type: user_initiated/business_initiated/referral_conversion pricing: billable: true/false pricing_model: CBP category: user_initiated/business_initiated/referral_conversion extra: '{your value}' brand_msisdn: '{phone}' Failed Delivery Report: value: statuses: - errors: - code: 470 title: reason for failure id: c58c55a6cae6d1cb43d0c37efxxxxxb recipient_id: 1206400xxxx status: failed timestamp: '1533332775' extra: qwkfm9_606hxxx05 application/xml: schema: type: object examples: Incoming Text: value: "{\n \"messages\": [\n {\n \"id\": \"6axxxxx2-72d9-11ed-88f4xxxxxxxxxxc02\",\n \"from\": \"{phone}\",\n \"type\": \"text\",\n \"timestamp\": \"1670051363\",\n \"text\": {\n \"body\": \"Hi\"\n },\n \"message_id\": \"xxxid.HBgMOTE3MDQ1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxYxMzUxOEVGODBDMEE2QUFCQTg1ODkA\"\n }\n ],\n \"contacts\": [\n {\n \"profile\": {\n \"name\": \"Darryl\"\n },\n \"wa_id\": \"{phone}\"\n }\n ],\n \"brand_msisdn\": \"{phone}\",\n \"request_id\": \"6af19ee2-72d9-11ed-88f4-0xxxxxxxxxxx\"\n}" Incoming Image: value: "{\n \"apiKey\": \"xxxxxxxxxxxxxxxxxxxxxnhVgfb!ll*mv12lSt\",\n \"messages\": [\n {\n \"from\": \"{phone}\",\n \"id\": \"ABxxxxxxxxxxxxxxxxxxxNjXmuSf\",\n \"image\": {\n \"file\": \"/usr/local/wamedia/shared/b1cf38-8734-4ad3-b4a1-xxxxxxxxxxxx\",\n \"id\": \"xxxxxxxx-8734-4ad3-b4a1-efxxxxd683\",\n \"mime_type\": \"image/jpeg\",\n \"sha256\": \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxdcca301ae99944db\",\n \"caption\": \"Check out my new phone!\",\n \"media_url\": \"https://apis.rmlconnect.net/wba/v1/media?media_id=fc233119-733f-49c-bcbd-xxxxxxxxxxxx&username=demo\"\n },\n \"timestamp\": \"1521497954\",\n \"type\": \"image\"\n }\n ],\n \"brand_msisdn\": \"{phone}\",\n \"request_id\": \"aebeca32-f125-11eb-8c86-xxxxxxxxxxxx\"\n}" Incoming Audio: value: "{\n \"messages\": [\n {\n \"from\": \"{phone}\",\n \"id\": \"xxxxxxxxxxxxxxxxxxxxxxxxxxxf\",\n \"timestamp\": \"1521827831\",\n \"type\": \"voice\",\n \"voice\": {\n \"file\": \"/usr/local/wamedia/shared/463e/b7ec/fxxxxxxxxxxxxxxxxb2\",\n \"id\": \"463eb7ec-ff4e-4d9b-b110-xxxxxxxxxxxx\",\n \"mime_type\": \"audio/ogg; codecs=opus\",\n \"sha256\": \"fa9exxxxxxxxxxxxxxxxxxxxxxxx912923590521ef53b0710\",\n \"media_url\": \"https://apis.rmlconnect.net/wba/v1/media?media_id=fc233119-733f-49c-bcbd-xxxxxxxxxxxx&username=demo\"\n }\n }\n ],\n \"brand_msisdn\": \"{phone}\",\n \"request_id\": \"aebeca32-f125-11eb-8c86-xxxxxxxxxxxx\"\n}" Incoming Video: value: "{\n \"messages\": [\n {\n \"from\": \"{phone}\",\n \"id\": \"ABGGFlxxxxxxxxxxxxxNmNjXmuSf\",\n \"timestamp\": \"1521827831\",\n \"type\": \"voice\",\n \"voice\": {\n \"file\": \"/usr/local/wamedia/shared/463e/b7ec/ff4xxxxxxxxxxxxx1b2\",\n \"id\": \"xxxxxxxc-xxxx-xxxx-xxxx-xxxxxxxxxxxx\",\n \"mime_type\": \"audio/ogg; codecs=opus\",\n \"sha256\": \"fa9e1807d936b7cebexxxxxxxxxxxxxxxxxxxxxxxxxxb0710\",\n \"media_url\": \"https://apis.rmlconnect.net/wba/v1/media?media_id=fc233119-733f-49c-bcbd-xxxxxxxxxxxx&username=demo\"\n }\n }\n ],\n \"brand_msisdn\": \"{phone}\",\n \"request_id\": \"aebeca32-f125-11eb-8c86-xxxxxxxxxxx7\"\n}\n" responses: '200': description: Success security: - BearerAuth: [] servers: - url: https://apis.rmlconnect.net components: schemas: AddWebhookRequest: allOf: - $ref: '#/components/schemas/AuthFields' - type: object required: - url properties: url: type: string description: Webhook URL. Must respond with 'God bless you, SendClean' example: https://example.com/webhook event: type: string description: Comma-separated list of events to subscribe to example: send,open,click,soft_bounce,hard_bounce,spam description: type: string description: Human-readable description example: My webhook for open and click events store_log: type: string enum: - Enable - Disable example: Enable ListWebhookResponse: type: object properties: status: type: string enum: - success webhook_list: type: array items: $ref: '#/components/schemas/WebhookListEntry' SuccessResponse: type: object properties: status: type: string enum: - success example: success message: type: string example: Operation successful EditWebhookRequest: allOf: - $ref: '#/components/schemas/AuthFields' - type: object required: - webhook_id - url properties: webhook_id: type: string example: '424353445757557577457' url: type: string description: Updated webhook URL. Must respond with 'God bless you, SendClean' example: https://example.com/webhook event: type: string example: open,click description: type: string example: Updated description store_log: type: string enum: - Enable - Disable AuthFields: type: object required: - owner_id - token properties: owner_id: type: string description: A valid SendClean User ID example: example_owner_id token: type: string description: A valid API token example: example_token WebhookIdRequest: allOf: - $ref: '#/components/schemas/AuthFields' - type: object required: - webhook_id properties: webhook_id: type: string description: A valid webhook ID example: '424353445757557577457' KeyResetWebhookResponse: type: object properties: status: type: string enum: - success message: type: string example: Webhook key reseted webhook_id: type: string example: '424353445757557577457' key: type: string example: 2fg345gy6r7 ErrorResponse: type: object properties: status: type: string enum: - error example: error code: type: integer example: -1 name: type: string enum: - ValidationError - GeneralError - AuthenticationError example: AuthenticationError message: type: string example: Token MissMatch WebhookListEntry: type: object properties: webhook_id: type: string example: '424353445757557577457' url: type: string example: http://abc.com/wh1.php event: type: string example: open,click key: type: string example: cgvddgrsd store_log: type: string enum: - Enable - Disable description: type: string example: this webhook for only open and click create_date: type: integer format: int64 example: 754453534 WebhookInfoResponse: type: object properties: status: type: string enum: - success webhook_data: type: object properties: webhook_id: type: string example: '405602261459333060372' url: type: string example: http://xyz.com/webhook3.php event: type: string example: open description: type: string example: webhook for open events store_log: type: string enum: - Enable - Disable key: type: string example: aVLnPysvkKUU95AFrb47Zr create_date: type: integer format: int64 example: 1459333060 last_success: type: integer format: int64 description: Timestamp of last successful delivery example: 1459366666 total_event: type: integer description: Total events sent to this webhook URL example: 23 CallbackSingleProductCart: type: object title: Add Single Product to Cart properties: contact_no: type: string description: The phone number of the WhatsApp user who initiated the action. data: type: object description: A JSON object containing the message data. properties: contacts: type: array description: An array of JSON objects representing the contacts involved in the interaction. items: type: object properties: profile: type: object description: An object that contains the contact's profile information, such as, name, photo, and so on. properties: name: type: string description: The name of the contact. wa_id: type: string description: The WhatsApp ID of the contact. messages: type: array description: An array of JSON objects representing the messages sent during the interaction. items: type: object properties: from: type: string description: The phone number of the sender. id: type: string description: A unique ID for the message. order: type: object description: An object that contains the details of the product added to the cart by the user. properties: catalog_id: type: string description: The ID of the catalog the product belongs to. product_items: type: array description: An array of product item objects that contains the details of the product added to the cart. items: type: object properties: currency: type: string description: The currency of the product item. item_price: type: integer description: The price of the product item. product_retailer_id: type: string description: The ID of the retailer selling the product. quantity: type: integer description: The quantity of the product item being added to the cart. timestamp: type: string description: The Unix timestamp of the message. type: type: string description: The type of message, which is "order" in this case. brand_msisdn: type: string description: The phone number associated with the WhatsApp Business account in international format. time: type: string description: The timestamp of the message in the format YYYY-MM-DD HH:MM:SS.mmmmmm. source: type: string description: The source of the message, which will be "FROM_CALLBACK" in this case. CallbackBusinessSingleProduct: type: object title: Session Message Business for Single Product properties: contact_no: type: string description: The phone number of the WhatsApp user who sent the message. data: type: object description: A JSON object containing the message data. properties: contacts: type: array description: An array of contact objects that contains an array of WhatsApp contacts for whom the message is intended. items: type: object properties: profile: type: object description: An object that contains the contact's profile information, such as, name, photo, and so on. properties: name: type: string description: The name of the contact. wa_id: type: string description: The WhatsApp ID of the contact. messages: type: array description: An array of message objects that contains information about the incoming text message and its parameters. items: type: object properties: context: type: object description: An object that represents the context of the message; that is the information about the referred product. properties: referred_product: type: object description: An object that represents the referred product. properties: catalog_id: type: string description: The ID of the catalog the product belongs to. product_retailer_id: type: string description: The ID of the retailer selling the product. from: type: string description: The phone number of the sender. id: type: string description: A unique ID for the message. text: type: object description: An object that contains the text of the message. properties: body: type: string description: The text of the message. timestamp: type: string description: The Unix timestamp of the message. type: type: string description: The type of message, which is image. brand_msisdn: type: string description: The phone number associated with the WhatsApp Business account in international format. time: type: string description: The timestamp of the message in the format YYYY-MM-DD HH:MM:SS.mmmmmm. source: type: string description: The source of the message, which will be "FROM_CALLBACK" in this case. CallbackIncomingAudio: type: object title: Incoming Audio properties: messages: type: array description: An array of message objects that contains information about the incoming audio message and its parameters. items: type: object properties: from: type: string description: The phone number of the sender. id: type: string description: A unique ID for the message. timestamp: type: string description: The Unix timestamp of the message. type: type: string description: The type of message. For example, text, image, video, and so on. voice: type: object description: An object that contains the audio message parameters. properties: file: type: string description: The path to the audio file on your server. id: type: string description: A unique ID for the audio message. mime_type: type: string description: The MIME type of the audio file. sha256: type: string description: The SHA-256 hash of the audio file. media_url: type: string description: The media URL for the audio file. brand_msisdn: type: string description: The phone number associated with the WhatsApp Business account in international format. request_id: type: string description: A unique ID for the callback request. CallbackIncomingVideo: type: object title: Incoming Video properties: messages: type: array description: An array of message objects that contains information about the incoming video message and its parameters. items: type: object properties: from: type: string description: The phone number of the sender. id: type: string description: A unique ID for the message. timestamp: type: string description: The Unix timestamp of the message. type: type: string description: The type of message. For example, text, image, video, and so on. voice: type: object description: An object that contains the audio message parameters. properties: file: type: string description: The path to the video file on your server. id: type: string description: A unique ID for the video message. mime_type: type: string description: The MIME type of the video file. sha256: type: string description: The SHA-256 hash of the video file. media_url: type: string description: The media URL for the video file. brand_msisdn: type: string description: The phone number associated with the WhatsApp Business account in international format. request_id: type: string description: A unique ID for the callback request. CallbackIncomingLocation: type: object title: Incoming Location properties: contacts: type: array description: An array of contact objects that contains information about the sender of the message and its parameters. items: type: object properties: profile: type: object description: An object that contains the contact's profile information, such as, name, photo, and so on. properties: name: type: string description: The contact's profile name. wa_id: type: string description: The WhatsApp ID of the contact. messages: type: array description: An array of message objects that contains information about the incoming message location and its parameters. items: type: object properties: from: type: string description: The phone number of the sender. id: type: string description: A unique ID for the message. location: type: object description: An object that contains the location of the message. The location message include parameters. properties: address: type: string description: The address of the sender. latitude: type: number description: The latitude coordinates of the location. longitude: type: number description: The longitude coordinates of the location. name: type: string description: The name of the location. url: type: string description: The URL of the location (if available). timestamp: type: string description: The Unix timestamp of the message. type: type: string description: The type of message. For example, text, image, video, and so on. brand_msisdn: type: string description: The phone number associated with the WhatsApp Business account in international format. request_id: type: string description: A unique ID for the callback request. CallbackTemplateQuickReply: type: object title: Incoming Template Quick Reply properties: contacts: type: array description: An array of contact objects that contains information about the sender of the message and its parameters. items: type: object properties: profile: type: object description: An object that contains the contact's profile information, such as, name, photo, and so on. properties: name: type: string description: The name of the contact. wa_id: type: string description: The WhatsApp ID of the contact. messages: type: array description: An array of message objects that contains information about the message and its parameters. items: type: object properties: button: type: object description: An object that represents the quick reply button with "text" field. properties: text: type: string description: The text that is displayed on the button. context: type: object description: An object that represents the context of the message. properties: from: type: string description: The WhatsApp ID of the contact. id: type: string description: The ID of the message. from: type: string description: The WhatsApp ID of the contact. id: type: string description: The ID of the message. timestamp: type: string description: The Unix timestamp of the message. type: type: string description: The type of the message, which is "button" for quick reply messages. brand_msisdn: type: string description: The phone number associated with the WhatsApp Business account in international format. request_id: type: string description: A unique ID for the callback request. CallbackIncomingImage: type: object title: Incoming Image properties: apiKey: type: string description: The API key to authenticate the callback request. messages: type: array description: An array of message objects that contains information about the incoming image message and its parameters. items: type: object properties: from: type: string description: The phone number of the sender in international format. id: type: string description: A unique ID for the message. image: type: object description: An object that contains information about the incoming image. properties: file: type: string description: The absolute path to the image file. id: type: string description: A unique ID for the image. mime_type: type: string description: The MIME type of the image. sha256: type: string description: The SHA256 hash of the image. caption: type: string description: The caption of the image. media_url: type: string description: The URL of the image. timestamp: type: string description: The timestamp of the incoming message. type: type: string description: The type of the incoming message. In this case, "image". brand_msisdn: type: string description: The phone number associated with the WhatsApp Business account in international format. request_id: type: string description: A unique ID for the callback request. CallbackReadReceipt: type: object title: Read Report properties: display_no: type: string description: The phone number of the WhatsApp Business Account in E.164 format. statuses: type: array description: An array of status objects representing the read status of the messages. items: type: object properties: id: type: string description: A unique identifier for the message. recipient_id: type: string description: The WhatsApp ID of the recipient who has read the message. status: type: string description: The status of the message, which is "read" in this case. timestamp: type: string description: The timestamp in seconds when the message was read. type: type: string description: The type of the message, which is "message" in this case. conversation: type: object description: An object containing information about the conversation where the message was read. properties: id: type: string description: A unique identifier for the conversation. origin: type: object description: An object representing the origin of the conversation. properties: type: type: string description: The type of the conversation origin, which can be "user_initiated", "business_initiated", or "referral_conversion". pricing: type: object description: An object representing the pricing information for the message. properties: billable: type: string description: A boolean value indicating whether the message is billable or not. pricing_model: type: string description: The pricing model for the message, which is "CBP" in this case. category: type: string description: The category of the conversation origin, which can be "user_initiated", "business_initiated", or "referral_conversion". extra: type: string description: A string containing additional metadata for the message. brand_msisdn: type: string description: The phone number associated with the WhatsApp Business account in international format. CallbackMultiProductCart: type: object title: Add Multi Product to Cart properties: contact_no: type: string description: The phone number of the WhatsApp user who initiated the action. data: type: object description: A JSON object containing the message data. properties: contacts: type: array description: An array of JSON objects representing the contacts involved in the interaction. items: type: object properties: profile: type: object description: An object that contains the contact's profile information, such as, name, photo, and so on. properties: name: type: string description: The name of the contact. wa_id: type: string description: The WhatsApp ID of the contact. messages: type: array description: An array of JSON objects representing the messages sent during the interaction. items: type: object properties: from: type: string description: The phone number of the sender. id: type: string description: A unique ID for the message. order: type: object description: An object that contains the details of the product added to the cart by the user. properties: catalog_id: type: string description: The ID of the catalog the product belongs to. product_items: type: array description: An array of product item objects that contains the details of the product added to the cart. items: type: object properties: currency: type: string description: The currency of the product item. item_price: type: integer description: The price of the product item. product_retailer_id: type: string description: The ID of the retailer selling the product. quantity: type: integer description: The quantity of the product item being added to the cart. timestamp: type: string description: The Unix timestamp of the message. type: type: string description: The type of message, which is "order" in this case. brand_msisdn: type: string description: The phone number associated with the WhatsApp Business account in international format. time: type: string description: The timestamp of the message in the format YYYY-MM-DD HH:MM:SS.mmmmmm. source: type: string description: The source of the message, which will be "FROM_CALLBACK" in this case. CallbackIncomingText: type: object title: Incoming Text properties: messages: type: array description: An array of message objects that contains information about the incoming text message and its parameters. items: type: object properties: id: type: string description: A unique ID for the message. from: type: string description: The phone number of the sender. type: type: string description: The type of message. For example, text, image, video, and so on. timestamp: type: string description: The Unix timestamp of the message. text: type: object description: An object that contains the text of the message. The text message includes a single parameter, body, which contains the text of the message. properties: body: type: string description: The text of the message. message_id: type: string description: The unique ID for the message that was generated by WhatsApp. contacts: type: array description: An array of contact objects that contains information about the sender of the message and its parameters. items: type: object properties: profile: type: object description: An object that contains the contact's profile information, such as, name, photo, and so on. properties: name: type: string description: The contact's profile name. wa_id: type: string description: The WhatsApp ID of the contact. brand_msisdn: type: string description: The phone number associated with the WhatsApp Business account in international format. request_id: type: string description: A unique ID for the callback request. CallbackSentDeliveryReport: type: object title: Sent/Delivery Report properties: statuses: type: array description: An array containing information about the message status. items: type: object properties: conversation: type: object description: Information about the conversation. properties: expiration_timestamp: type: integer description: The timestamp for when the conversation expires. id: type: string description: The ID of the conversation. For example, "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" origin: type: object description: Information about the origin of the conversation. properties: type: type: string description: The type of origin. Possible values are "user_initiated", "business_initiated", or "referral_conversion". id: type: string description: A unique ID for the message. pricing: type: object description: Information about the pricing for the message. properties: billable: type: string description: A boolean value indicating whether the message is billable or not. category: type: string description: The category of the message. Possible values are "user_initiated", "business_initiated", or "referral_conversion". pricing_model: type: string description: The pricing model for the message. Possible values are "CBP" (conversation based pricing) or "FBP" (fixed billing period). recipient_id: type: string description: The ID of the recipient. status: type: string description: The status of the message. Possible values are "sent" or "delivered". timestamp: type: string description: The timestamp for the message. type: type: string description: The type of message. extra: type: string description: Any extra information about the message. message_id: type: string description: The ID of the message. brand_msisdn: type: string description: The phone number associated with the WhatsApp Business account in international format. CallbackIncomingQuickReply: type: object title: Incoming Session Quick Reply properties: contacts: type: array description: An array of contact objects that contains information about the sender of the message and its parameters. items: type: object properties: profile: type: object description: An object that contains the contact's profile information, such as, name, photo, and so on. properties: name: type: string description: The name of the contact. wa_id: type: string description: The WhatsApp ID of the contact. messages: type: array description: An array of message objects that contains information about the message and its parameters. items: type: object properties: context: type: object description: An object that represents the context of the message. properties: from: type: string description: The WhatsApp ID of the contact. id: type: string description: The ID of the message and the WhatsApp ID of the sender. from: type: string description: The WhatsApp ID of the contact. id: type: string description: The ID of the message. interactive: type: object description: A JSON object representing the interactive message, with a button_reply field containing the ID and title of the button that was clicked and a type field set to "button_reply". properties: button_reply: type: object description: The button reply text. properties: id: type: string description: The ID of the button. title: type: string description: The title of the button. type: type: string description: A string indicating the type of the message, which is set to "interactive" for an incoming session quick reply. timestamp: type: string description: A string indicating the type of the message, which is set to "interactive" for an incoming session quick reply. type: type: string description: The type of the message. CallbackIncomingInteractiveList: type: object title: Incoming Interactive List properties: contacts: type: array description: An array of contact objects that contains information about the sender of the interactive list and its parameters. items: type: object properties: profile: type: object description: An object that contains the contact's profile information, such as, name, photo, and so on. properties: name: type: string description: The profile name. wa_id: type: string description: The WhatsApp ID of the contact. messages: type: array description: An array of message objects that contains information about the incoming interactive list and its parameters. items: type: object properties: context: type: object description: The context of the message. properties: from: type: string description: The phone number of the sender. id: type: string description: A unique ID for the interactive list. from: type: string description: The phone number of the sender. id: type: string description: A unique ID for the interactive list. interactive: type: object description: An array of message objects that contains the details of the interactive message. properties: list_reply: type: object description: The message contains information about a list reply interaction. properties: description: type: string description: The description of the item. id: type: string description: A unique ID for the interactive list. title: type: string description: The interactive list title. type: type: string description: The type of a reply interaction, which is "list_reply" in this case. timestamp: type: string description: The Unix timestamp of the message. type: type: string description: The type of the message. brand_msisdn: type: string description: The phone number associated with the WhatsApp Business account in international format. request_id: type: string description: A unique ID for the callback request. CallbackIncomingDocument: type: object title: Incoming Document properties: apiKey: type: string description: The API key to authenticate the callback request. messages: type: array description: An array of message objects that contains information about the incoming document and its parameters. items: type: object properties: from: type: string description: The phone number of the sender. id: type: string description: A unique ID for the message. timestamp: type: string description: The Unix timestamp of the message. type: type: string description: The type of the message, which is "document" for incoming documents. document: type: object description: An array of contact objects that contains the details of the incoming document message. properties: caption: type: string description: The caption of the document. file: type: string description: The absolute path to the document file on the server. id: type: string description: A unique ID assigned to the incoming document. mime_type: type: string description: The MIME type of the document, such as "application/pdf". sha256: type: string description: The SHA-256 hash of the document. media_url: type: string description: The URL of the media file that can be downloaded using the Media Download API. brand_msisdn: type: string description: The phone number associated with the WhatsApp Business account in international format. request_id: type: string description: A unique ID for the callback request. CallbackFailedDeliveryReport: type: object title: Failed Delivery Report properties: statuses: type: array description: An array of JSON objects that represent the status of the messages sent. items: type: object properties: errors: type: array description: An array of JSON objects that represent the errors that occurred during the message delivery process. items: type: object properties: code: type: integer description: A numeric error code that indicates the type of error that occurred. title: type: string description: A human-readable description of the error that occurred. id: type: string description: A unique identifier for the message that was sent. recipient_id: type: string description: The WhatsApp ID of the recipient who failed to receive the message. status: type: string description: A string that indicates the status of the message delivery. For Failed Delivery Report, the status is "failed". timestamp: type: string description: The Unix timestamp (in seconds) when the message delivery failed. extra: type: string description: An optional field for adding custom data. securitySchemes: BearerAuth: type: http scheme: bearer bearerFormat: JWT description: JSON Web Token obtained from the Login API. Include the token in the `Authorization` header as `Bearer `. Tokens expire after one hour by default. x-refined-from: - route-mobile-sendclean-email.yml - route-mobile-whatsapp-business.yml