Articles on: Webhook Integration

Custom Webhook integration guide

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

Go to your workspace integration center
Find Custom Webhook and click on Integration Guide.


Create a Webhook endpoint in your desired destination.
Remember to mark CORS Headers as checked



Paste the Webhook URL into the Trigger actions when receiving WhatsApp messages field in the Cooby integration guide, then click Save.
If you would like to trigger an action when sending a WhatsApp message, paste your Webhook URL in Trigger actions when send WhatsApp messages.


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

ack to the previous page and click on Manage Permissions for the Custom Webhook field.



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


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.
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.


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

Payload Format



{
  chat_id: string;
  chat_type: "group" | "individual";
  chat_title: string;
  user_phone: string;
  user_email: string;
  direction: "sent" | "received";
  message: {
    id: string;
    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_name: string | null;
    file_url: string| null;
    caption: string | null;
    is_error: boolean;
    error_code: string | null;
    error_message: string | null;
  };
  timestamp: string;
  participants: {
    phone: string;
    wa_name: string;
  }[];
  sender: {
    phone: string;
    wa_name: string;
  };
}



Example payload



{
  chat_id: "447441369136_447441368384@c.us";
  chat_type: "individual";
  chat_title: "Sarah Brown";
  user_phone: "447441368384";
  user_email: "support@cooby.co";
  direction: "sent";
  message: {
    id: "3EB093D273669B3BE3D2";
    type: "chat";
    text: "Hi, welcome to Cooby!";
    file_name: "Cooby Image 2023-07-12 at 11.13.32 AM";
    file_url: "https://api.cooby.co/v2/files/xxxxx";
    caption: "Hi, welcome to Cooby!";
    is_error: false;
    error_code: null;
    error_message: null;
  };
  timestamp: "1628843453";
  participants: [
   {
    phone: "447441369136";
    wa_name: "Sarah Brown";
   },
   { 
    phone: "447441368384", 
    wa_name: "Cooby" 
   } 
  ],
  sender: {
    phone: "447441368384";
    wa_name: "Cooby";
  };
}



Learn more about each column's definition

Learn more about Webhook Integration synchronization frequency

Learn more about Webhook integration syncing mechanism

Learn more about syncing historical messages in webhook integration

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 support@cooby.co 💜

Updated on: 29/05/2025

Was this article helpful?

Share your feedback

Cancel

Thank you!