Webhooks API
Webhook APIs are admin APIs and therefore can only be accessed using Private Key. If you want to know what exact headers you need to send in admin APIs, You can check the Admin API section.
Create Webhook
Creates a webhook.
POST https://api.channelize.io/v2/webhooks
Body Params
This table lists all possible parameters body of this API request supports.
Name | Type | Required | Description |
---|---|---|---|
endpoint | string | yes | Specifies the endpoint URL of the webhook. |
events | array | yes | Specifies the list of events. You will get a webhook request only if the selected event occurs in the application. |
Allowed events are: 'conversation.create', 'message.create', 'user.block', 'user.unblock', 'conversation.add_members', 'conversation.remove_members' and 'conversation.mark_as_read'. |
Response
Status Code: 201
{
"_id": "0a8bfe40-dee3-11e9-b4ee-8b62f92ab054",
"endpoint": "http://webhook.site/3956d575-df08-4e58-8f9b-e7a16f0aa9a9",
"events": [
"conversation.create",
"message.create"
],
"enabled": true,
"createdAt": "2019-09-24T15:50:32.741Z"
}
Get Webhooks
Retrieves the list of webhooks you have configured.
GET https://api.channelize.io/v2/webhooks
Query Params
The following table lists the parameters this API call supports to get filtered results.
Name | Type | Required | Description |
---|---|---|---|
id | string | no | Specifies webhook's unique ID. |
enabled | boolean | no | Specifies if you want to get enabled webhooks. |
endpoint | string | no | Specifies the endpoint URL of the webhook. |
events | array | no | Specifies the list of events. You will get a webhooks for which these events are selected. Allowed events are 'conversation.create', 'message.create', 'user.block', 'user.unblock', 'conversation.add_members', 'conversation.remove_members' and 'conversation.mark_as_read'. |
Response
Status Code: 200
[
{
"_id": "c61cc570-dba2-11e9-b55c-c7652b81b336",
"endpoint": "http://webhook.site/3956d575-df08-4e58-8f9b-e7a16f0aa9a9",
"events": [
"conversation.create",
"message.create"
],
"enabled": true,
"createdAt": "2019-09-20T12:32:56.647Z"
}
]
Get Webhook
Retrieves a webhook's data using a webhook ID.
GET https://api.channelize.io/v2/webhooks/{webhook_id}
Response
Status Code: 200
{
"_id": "0a8bfe40-dee3-11e9-b4ee-8b62f92ab054",
"endpoint": "http://webhook.site/3956d575-df08-4e58-8f9b-e7a16f0aa9a9",
"events": [
"conversation.create",
"message.create"
],
"enabled": true,
"createdAt": "2019-09-24T15:50:32.741Z"
}
Update Webhook
Update a webhook's data using the webhook ID.
PUT https://api.channelize.io/v2/webhooks/{webhook_id}
Body Params
This table lists all possible parameters body of this API request supports.
Name | Type | Required | Description |
---|---|---|---|
endpoint | string | no | Specifies the endpoint URL of the webhook. |
enabled | boolean | no | Specifies if you want to enable or disable the webhook. |
events | array | no | Specifies the list of events. You will get a webhook request only if the selected event occurs in the application. Allowed events are 'conversation.create', 'message.create', 'user.block', 'user.unblock', 'conversation.add_members', 'conversation.remove_members' and 'conversation.mark_as_read'. |
Response
Status Code: 204
null
Delete Webhook
Delete a webhook's data using a webhook ID.
DELETE https://api.channelize.io/v2/webhooks/{webhook_id}
Response Body
Status Code: 204
null