Skip to content
Start here

Webhooks

List webhooks
alerting.destinations.webhooks.list(WebhookListParams**kwargs) -> SyncSinglePage[Webhooks]
GET/accounts/{account_id}/alerting/v3/destinations/webhooks
Get a webhook
alerting.destinations.webhooks.get(strwebhook_id, WebhookGetParams**kwargs) -> Webhooks
GET/accounts/{account_id}/alerting/v3/destinations/webhooks/{webhook_id}
Create a webhook
alerting.destinations.webhooks.create(WebhookCreateParams**kwargs) -> WebhookCreateResponse
POST/accounts/{account_id}/alerting/v3/destinations/webhooks
Update a webhook
alerting.destinations.webhooks.update(strwebhook_id, WebhookUpdateParams**kwargs) -> WebhookUpdateResponse
PUT/accounts/{account_id}/alerting/v3/destinations/webhooks/{webhook_id}
Delete a webhook
alerting.destinations.webhooks.delete(strwebhook_id, WebhookDeleteParams**kwargs) -> WebhookDeleteResponse
DELETE/accounts/{account_id}/alerting/v3/destinations/webhooks/{webhook_id}
ModelsExpand Collapse
class Webhooks:
id: Optional[str]

The unique identifier of a webhook

maxLength32
created_at: Optional[datetime]

Timestamp of when the webhook destination was created.

formatdate-time
last_failure: Optional[datetime]

Timestamp of the last time an attempt to dispatch a notification to this webhook failed.

formatdate-time
last_success: Optional[datetime]

Timestamp of the last time Cloudflare was able to successfully dispatch a notification using this webhook.

formatdate-time
name: Optional[str]

The name of the webhook destination. This will be included in the request body when you receive a webhook notification.

secret: Optional[str]

Optional secret that will be passed in the cf-webhook-auth header when dispatching generic webhook notifications or formatted for supported destinations. Secrets are not returned in any API response body.

type: Optional[Literal["datadog", "discord", "feishu", 5 more]]

Type of webhook endpoint.

One of the following:
"datadog"
"discord"
"feishu"
"gchat"
"generic"
"opsgenie"
"slack"
"splunk"
url: Optional[str]

The POST endpoint to call when dispatching a notification.

class WebhookCreateResponse:
id: Optional[str]

UUID

maxLength32
class WebhookUpdateResponse:
id: Optional[str]

UUID

maxLength32
class WebhookDeleteResponse:
errors: List[Error]
message: str
code: Optional[int]
minimum1000
messages: List[Message]
message: str
code: Optional[int]
minimum1000
success: Literal[true]

Whether the API call was successful