Enable or Disable a Webhook

POST/api/webhooks/{id}/toggle

Flips the enabled flag. Send an explicit value in the body to set it instead of flipping it. A disabled webhook keeps its configuration, its secret and its delivery history, but receives nothing: it stops producing new queued deliveries at once, and anything already queued for it is discarded rather than sent when the cron job next runs.

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
id Number Webhook unique ID
active Number optional Optional 1 to enable, 0 to disable. Omit it to flip the current value
curl -X POST "https://yoursite.com/api/webhooks/123/toggle" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "field": "value" }'

Success-Response:

HTTP/1.1 200 OK
{
  "status": 200,
  "messages": { "success": "Record saved" },
  "active": 0,
  "data": { "id": 3, "name": "Ops sync", "active": 0, "has_secret": true }
}

Error-Response:

HTTP/1.1 404 Not Found
{ "status": false, "messages": { "error": "No data were found" } }
MethodPOST
Path/api/webhooks/{id}/toggle
GroupWebhooks
Sincev1.0.0
Defined inRestApi/Controllers/WebhooksController.php