Skip to main content

List all existing webhooks

This endpoint will return all configured and enabled webhooks you have in your 2Chat account.

Invocation

curl -L -G 'https://api.p.2chat.io/open/webhooks' \
--header 'X-User-API-Key: your_api_key_here'

Response

A list of enabled webhooks will be returned together with their corresponding information

{
"success": true,
"webhooks": [
{
"uuid": "WHKdc78c87e-5b18-47c7-9183-5bf527fd6c69",
"event_name": "whatsapp.message.received",
"channel_uuid": "WPN95841312-b54d-46e3-b0bc-6414f4a5296b",
"hook_url": "https://www.toptal.com/developers/postbin/1681755466939-3421728690154",
"hook_params": {
"waweb_uuid": "WPN95841312-b54d-46e3-b0bc-6414f4a5296b"
},
"created_at": "2023-04-17T18:50:50Z"
},
{
"uuid": "WHKe768c62c-d41f-49a9-82ff-8982a0683902",
"event_name": "whatsapp.message.sent",
"channel_uuid": "WPN95841312-b54d-46e3-b0bc-6414f4a5296b",
"hook_url": "https://www.toptal.com/developers/postbin/1681755466939-3421728690154",
"hook_params": {
"waweb_uuid": "WPN95841312-b54d-46e3-b0bc-6414f4a5296b"
},
"created_at": "2023-04-17T18:50:45Z"
}
]
}
FieldDescriptionExample values
uuidThe unique identifier of the webhook that you will need to make changes to itWHKdc78c87e-5b18-47c7-9183-5bf527fd6c69
event_nameThe name of the event this webhook is subscribed towhatsapp.call.received.
channel_uuidThe unique UUID of the channel this webhook is subscribed toWPN95841312-b54d-46e3-b0bc-6414f4a5296b
hook_urlThe URL 2Chat will call when a event is triggeredhttps://my-dev-server
hook_paramsCustom parameters 2Chat sets to make the webhook functional{}
created_atUTC timestamp for when the webhook was created2023-04-17T18:50:45Z