Update webhook configuration
Creates or updates the webhook configuration of a client.
Endpoint: PUT /v1/webhook/config
Body
| Field | Type | Required | Description |
|---|---|---|---|
url | string | Yes | Notification URL (https). |
client_id | number | No | Client to configure. Default: the token’s client. Requires BSP_CN if it differs from the token. |
active | boolean | No | Enables/disables notification. |
Request
curl --request PUT \
--url 'https://api.chattigo.com/v1/webhook/config' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"client_id": 6,
"url": "https://hooks.chattigo.com/evt"
}'Response
Success (200)
{
"client_id": 1001,
"url": "https://hooks.chattigo.com/evt",
"active": true
}Errors
| Code | Case |
|---|---|
400 | url required, or invalid client_id |
403 | Cross-client without BSP_CN |