All Collections
Webhook Integration
Custom Webhook integration guide
Custom Webhook integration guide
Gin Lin avatar
Written by Gin Lin
Updated today

Only Custom plan users can integrate with Webhook. If you are interested in Webhook Integration, please contact the Cooby Sales Team.

In this guide, you'll connect WhatsApp to your destination using Cooby custom Webhooks.

You can use the same Webhook for the 2 different event triggers, or set up separate Webhooks for each event trigger.


Set up guide

This guide uses webhook.site as an example

  1. Go to your workspace integration center

  2. Find Custom Webhook and click on Integration Guide.

  3. Create a Webhook endpoint in your desired destination.

    1. Remember to mark CORS Headers as checked

  4. Paste the Webhook URL into the Trigger actions when receiving WhatsApp messages field in the Cooby integration guide, then click Save.

  5. Ensure that you see the Webhook URL saved, indicating a successful save.

  6. Go back to the previous page and click on Manage Permissions for the Custom Webhook field.

  7. Turn ON the Custom Webhook permission for those who will trigger Webhook events when they receive WhatsApp messages.

  8. To ensure that the Webhook integration is set up properly, remember to refresh both your WhatsApp Web and the WhatsApp Web of your team members after making any changes to the settings.

    1. All users in the team who have integration permission will see the Grant Access to Cooby popup the next time they open or refresh WAW.

  9. Once you have received the payload, you can use it to set up various actions.

If you would like to trigger an action when sending a WhatsApp message, paste your Webhook URL in Trigger actions when send WhatsApp messages.


Payload Format

{
"chat_title": string;
"sender": {
"phone": string;
"wa_name": string;
};
"participants": {
"phone": string;
"wa_name": string;
}[];
"user_phone": string;
"user_email": string;
"direction": "sent" | "received";
"message": {
type: "call_log" | "chat" | "location" | "payment" | "vcard" | "ciphertext" | "multi_vcard" | "revoked" | "oversized" | "groups_v4_invite" | "template_button_reply" | "debug" | "image" | "video" | "audio" | "sticker" | "status_v3" | "document" | "product" | "order" | "list" | "interactive" | "interactive_response" | "list_response" | "buttons_response" | "reaction" | "reaction_enc" | "poll_creation" | "request_phone_number" | "poll_update" | "native_flow" | "biz-cover-photo" | "keep_in_chat" | "pin_message" | "unknown";
"text": string;
"file_url": string;
};
"timestamp": string;
}


Example payload

{
"chat_title": "Pinkie",
"sender": {
"phone": "447441368384",
"wa_name": "Cooby"
},
"participants": [
{
"phone": "447441369136",
"wa_name": "pinkiebala"
},
{
"phone": "447441368384",
"wa_name": "Cooby"
}
],
"user_phone": "447441368384",
"user_email": "[email protected]",
"direction": "sent",
"message": {
"type": "chat",
"text": "Hi, how can I help you",
"file_url": null
},
"timestamp": "1715148930"
}



We hope this document helps you better understand how Cooby works. For any concerns or questions regarding your Custom Webhook integration, kindly email us at [email protected] 💜

Did this answer your question?