Webhooks
You can use the webhooks to subscribe to some events in our system. When that related event happens in your workspace, you will get a post request on that defined webhook. Each Webhook has the following fields:
Example{
"workspaceId": 12,
"id": "67642054b6cc2888638e4600",
"url": "https://yourwebsite/crm/incoming-messages....",
"label": "Incoming message webhooks",
"event": "INCOMING_MESSAGE ",
"createdAt": "2024-12-19T13:32:04.009Z",
}Webhook request payload
For conversation-related events
The payload that will be sent to the webhook URL will have the following fields:
Example{
"event": "INCOMING_MESSAGE",
"type": "text",
"content": "Hello",
"messageId": "68875c39-01b8-42a5-9273-fcfd2f697600",
"workspaceId": 12,
"integrationId": "6743884f784839ad14770000",
"isAgent": false,
"conversationId": "6728c86bf893860f458e0000",
"clientId": "6728c77dbba874b293e60000",
"createdAt": "Sat, 04 Jan 2025 15:35:46 GMT",
"integrationType": "WHATSAPP",
"externalClientId": "905301749170",
"debug": false
}For client-related events
The payload that will be sent to the webhook URL will have the following fields:
Example{
"event": "CLIENT_UPDATED",
"workspaceId": 12,
"id": "67d09433594d52dd19817d60",
"email": "test@test.com",
"name": "Temp",
"surname": "Client",
"phone": "9055xxxxx371",
"address": null,
"city": "Istanbul",
"country": "Turkey",
"externalClientId": "9055xxxxx371",
"tags": ["VIP"],
"stageId": null,
"createdAt": "2025-03-11T19:51:15.983Z",
"patchedAt": "2025-03-11T23:01:34.372Z"
}You can check our playground to explore and interact with GraphQL APIs easily and intuitively with real-time documentation.
List Webhooks
This endpoint returns the Webhooks for a specific workspace. You can search for particular webhooks using a string pattern in the label field or filter by the event field.
Request & Response
POST https://gateway.bcrumbs.net/core/gqExamplequery webhooks($input: WebhooksInput!) {
webhooks(input: $input) {
nodes {
workspaceId
id
label
url
event
createdAt
}
}
}
input WebhooksInput {
workspaceId: Int!
label: String
event: WebhookEvent
}The query above returns JSON structured like this:
Example{
"nodes": [
{
"workspaceId": 12,
"id": "67642054b6cc2888638e4600",
"url": "https://yourwebsite/crm/incoming-messages....",
"label": "Incoming message webhooks",
"event": "INCOMING_MESSAGE ",
"createdAt": "2024-12-19T13:32:04.009Z",
},
...
]
}