Alerting

alerting

Alerting

Available Alerts

alerting.available_alerts

Methods

Get Alert Types -> Envelope<Record<string, Array<{ description, display_name, filter_options, 1 more... }>>>
get/accounts/{account_id}/alerting/v3/available_alerts

Gets a list of all alert types for which an account is eligible.

Security

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example: Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY

Accepted Permissions (at least one required)

Cloudflare Zero Trust PII Read Notifications Write Notifications Read Account Settings Write Account Settings Read

Parameters
account_id: string

The account id

Response fields
errors: Array<>
messages: Array<>
success: true

Whether the API call was successful

result: Record<string, Array<{ description, display_name, filter_options, 1 more... }>>
Optional
result_info: { count, page, per_page, 1 more... }
Optional
Request example
200Example
Alerting

Destinations

alerting.destinations

alerting.destinations.eligible

Methods

Get Delivery Mechanism Eligibility -> Envelope<Record<string, Array<{ eligible, ready, type }>>>
get/accounts/{account_id}/alerting/v3/destinations/eligible

Get a list of all delivery mechanism types for which an account is eligible.

alerting.destinations.pagerduty

Methods

Create Pager Duty Integration Token -> Envelope<{ id }>
post/accounts/{account_id}/alerting/v3/destinations/pagerduty/connect

Creates a new token for integrating with PagerDuty.

Delete Pager Duty Services -> { errors, messages, success, 1 more... }
delete/accounts/{account_id}/alerting/v3/destinations/pagerduty

Deletes all the PagerDuty Services connected to the account.

List Pager Duty Services -> Envelope<Array<>>
get/accounts/{account_id}/alerting/v3/destinations/pagerduty

Get a list of all configured PagerDuty services.

Connect Pager Duty -> Envelope<{ id }>
get/accounts/{account_id}/alerting/v3/destinations/pagerduty/connect/{token_id}

Links PagerDuty with the account using the integration token.

Domain types

Pagerduty = { id, name }

alerting.destinations.webhooks

Methods

Create A Webhook -> Envelope<{ id }>
post/accounts/{account_id}/alerting/v3/destinations/webhooks

Creates a new webhook destination.

Delete A Webhook -> { errors, messages, success, 1 more... }
delete/accounts/{account_id}/alerting/v3/destinations/webhooks/{webhook_id}

Delete a configured webhook destination.

Get A Webhook -> Envelope<>
get/accounts/{account_id}/alerting/v3/destinations/webhooks/{webhook_id}

Get details for a single webhooks destination.

List Webhooks -> SinglePage<>
get/accounts/{account_id}/alerting/v3/destinations/webhooks

Gets a list of all configured webhook destinations.

Update A Webhook -> Envelope<{ id }>
put/accounts/{account_id}/alerting/v3/destinations/webhooks/{webhook_id}

Update a webhook destination.

Domain types

Webhooks = { id, created_at, last_failure, 5 more... }
Alerting

History

alerting.history

Methods

List History -> V4PagePaginationArray<>
get/accounts/{account_id}/alerting/v3/history

Gets a list of history records for notifications sent to an account. The records are displayed for last x number of days based on the zone plan (free = 30, pro = 30, biz = 30, ent = 90).

Domain types

History = { id, alert_body, alert_type, 6 more... }
Alerting

Policies

alerting.policies

Methods

Create A Notification Policy -> Envelope<{ id }>
post/accounts/{account_id}/alerting/v3/policies

Creates a new Notification policy.

Delete A Notification Policy -> { errors, messages, success, 1 more... }
delete/accounts/{account_id}/alerting/v3/policies/{policy_id}

Delete a Notification policy.

Get A Notification Policy -> Envelope<>
get/accounts/{account_id}/alerting/v3/policies/{policy_id}

Get details for a single policy.

List Notification Policies -> SinglePage<>
get/accounts/{account_id}/alerting/v3/policies

Get a list of all Notification policies.

Update A Notification Policy -> Envelope<{ id }>
put/accounts/{account_id}/alerting/v3/policies/{policy_id}

Update a Notification policy.

Domain types

Mechanism = Record<string, Array<{ id }>>
Policy = { id, alert_interval, alert_type, 7 more... }
PolicyFilter = { actions, affected_asns, affected_components, 38 more... }