Disable a Webhook
Stop a webhook from receiving events with the disableWebhook mutation without deleting it.
Use the disableWebhook mutation to stop a webhook from receiving events while keeping its configuration. The webhook’s enabled flag is set to false and its status to UNHEALTHY, and the webhook’s creator is emailed a health-status notification. To remove a webhook entirely, use deleteWebhook; to turn it back on, use updateWebhook with enabled: true.
This is the same state Blue applies automatically when a webhook’s deliveries fail repeatedly (see Delivery and health).
Request
mutation DisableWebhook {
disableWebhook(input: { webhookId: "webhook_123" }) {
success
operationId
}
}Parameters
DisableWebhookInput
| Parameter | Type | Required | Description |
|---|---|---|---|
webhookId | String! | Yes | The id of the webhook to disable. |
Response
disableWebhook returns a MutationResult.
{
"data": {
"disableWebhook": {
"success": true,
"operationId": null
}
}
}Returns
| Field | Type | Description |
|---|---|---|
success | Boolean! | true when the webhook was disabled. |
operationId | String | Identifier for the operation, when applicable. |
Errors
| Code | When |
|---|---|
WEBHOOK_NOT_FOUND | No webhook exists with the given webhookId (message: Webhook was not found.). |
Permissions
You must be authenticated. Unlike updateWebhook and deleteWebhook, disableWebhook does not check that you created the webhook.