Create Webhook
Subscribe an HTTPS endpoint to one or more events. The signing secret is only returned once, in this response.
POST https://developers.chatway.app/api/v1/webhooksExample request
curl -X POST "https://developers.chatway.app/api/v1/webhooks" \
-H "X-API-KEY: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "John Doe",
"endpoint_url": "endpoint url",
"is_active": true,
"events": [
"conversation.created"
]
}'Request body
application/json
name (string, required)endpoint_url (string, required)is_active (boolean)events (array<string enum: conversation.created, message.received, message.sent, message.updated, contact.created, contact.updated, automation.triggered, conversation.resolved, agent.assigned, contact.form.submitted, tag.assigned, tag.removed, custom.data.assigned, custom.data.removed>, required)
Responses
201
application/json
message (string, required)data (object, required)type (string, required)id (string, required)attributes (array, required)
mock (boolean, required)
422
403
Examples
Request body example
{
"name": "John Doe",
"endpoint_url": "endpoint url",
"is_active": true,
"events": [
"conversation.created"
]
}Response 201 example
{
"message": "Webhook created successfully.",
"data": {
"type": "webhook",
"id": "id",
"attributes": []
},
"mock": true
}