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/webhooks

Example 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

Responses

201

application/json

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
}