A PBX event is a rule that runs actions - a webhook, an SMS, a call, setting a variable or a switch, or changing the members of a queue - when something happens on the PBX. See PBX events for the triggers, the variables and the limits.
Every webhook request of an event is signed with the webhook's secret, in the header X-TCX-Signature - see Webhook. This request gives the webhook of an event a new, generated secret, e.g. when the old one may have been seen by somebody else. Requests are signed with the new secret right away, so update your server to the new secret at the same time.
To set a secret of your own instead, update the event with webhook.secret.
| URL | https://api.telecomx.dk/pbx/events/EVENT_ID/secret | ||
|---|---|---|---|
| Method | POST | ||
| Access level | MANAGER or OWNER if user belongs to the customer. RESELLER if customer belongs to the reseller. ADMIN. |
||
| Param | EVENT_ID | Id | Id of the event (24 hex-char string). |
The request has no body.
| JSON object | ||
|---|---|---|
| secret | String | The new secret, 64 hex characters. |
{ secret: '0d4c8b1e7f2a6935c0e1d2f3a4b5c6d7e8f90a1b2c3d4e5f60718293a4b5c6d7' }
| Error code | Message | Description |
|---|---|---|
| 403 | access_denied | Insufficient access level |
| 404 | id | Event not found |
| 409 | webhook | The event has no webhook |
| 422 | id | Invalid ObjectId |
| 500 | internal_error | <Unspecified> |