Skip to content
Start here

Alerting

AlertingAvailable Alerts

Get Alert Types
client.alerting.availableAlerts.list(AvailableAlertListParams { account_id } params, RequestOptionsoptions?): AvailableAlertListResponse { description, display_name, filter_options, type }
GET/accounts/{account_id}/alerting/v3/available_alerts
ModelsExpand Collapse
AvailableAlertListResponse = Record<string, Array<Item>>
description?: string

Describes the alert type.

display_name?: string

Alert type name.

filter_options?: Array<unknown>

Format of additional configuration options (filters) for the alert type. Data type of filters during policy creation: Array of strings.

type?: string

Use this value when creating and updating a notification policy.

AlertingDestinations

AlertingDestinationsEligible

Get delivery mechanism eligibility
client.alerting.destinations.eligible.get(EligibleGetParams { account_id } params, RequestOptionsoptions?): EligibleGetResponse { eligible, ready, type }
GET/accounts/{account_id}/alerting/v3/destinations/eligible
ModelsExpand Collapse
EligibleGetResponse = Record<string, Array<Item>>
eligible?: boolean

Determines whether or not the account is eligible for the delivery mechanism.

ready?: boolean

Beta flag. Users can create a policy with a mechanism that is not ready, but we cannot guarantee successful delivery of notifications.

type?: "email" | "pagerduty" | "webhook"

Determines type of delivery mechanism.

One of the following:
"email"
"pagerduty"
"webhook"

AlertingDestinationsPagerduty

List PagerDuty services
client.alerting.destinations.pagerduty.get(PagerdutyGetParams { account_id } params, RequestOptionsoptions?): SinglePage<Pagerduty { id, name } >
GET/accounts/{account_id}/alerting/v3/destinations/pagerduty
Create PagerDuty integration token
client.alerting.destinations.pagerduty.create(PagerdutyCreateParams { account_id } params, RequestOptionsoptions?): PagerdutyCreateResponse { id }
POST/accounts/{account_id}/alerting/v3/destinations/pagerduty/connect
Delete PagerDuty Services
client.alerting.destinations.pagerduty.delete(PagerdutyDeleteParams { account_id } params, RequestOptionsoptions?): PagerdutyDeleteResponse { errors, messages, success }
DELETE/accounts/{account_id}/alerting/v3/destinations/pagerduty
Connect PagerDuty
client.alerting.destinations.pagerduty.link(stringtokenId, PagerdutyLinkParams { account_id } params, RequestOptionsoptions?): PagerdutyLinkResponse { id }
GET/accounts/{account_id}/alerting/v3/destinations/pagerduty/connect/{token_id}
ModelsExpand Collapse
Pagerduty { id, name }
id?: string

UUID

maxLength32
name?: string

The name of the pagerduty service.

PagerdutyCreateResponse { id }
id?: string

token in form of UUID

maxLength32
PagerdutyDeleteResponse { errors, messages, success }
errors: Array<Error>
message: string
code?: number
minimum1000
messages: Array<Message>
message: string
code?: number
minimum1000
success: true

Whether the API call was successful

AlertingDestinationsWebhooks

List webhooks
client.alerting.destinations.webhooks.list(WebhookListParams { account_id } params, RequestOptionsoptions?): SinglePage<Webhooks { id, created_at, last_failure, 5 more } >
GET/accounts/{account_id}/alerting/v3/destinations/webhooks
Get a webhook
client.alerting.destinations.webhooks.get(stringwebhookId, WebhookGetParams { account_id } params, RequestOptionsoptions?): Webhooks { id, created_at, last_failure, 5 more }
GET/accounts/{account_id}/alerting/v3/destinations/webhooks/{webhook_id}
Create a webhook
client.alerting.destinations.webhooks.create(WebhookCreateParams { account_id, name, url, secret } params, RequestOptionsoptions?): WebhookCreateResponse { id }
POST/accounts/{account_id}/alerting/v3/destinations/webhooks
Update a webhook
client.alerting.destinations.webhooks.update(stringwebhookId, WebhookUpdateParams { account_id, name, url, secret } params, RequestOptionsoptions?): WebhookUpdateResponse { id }
PUT/accounts/{account_id}/alerting/v3/destinations/webhooks/{webhook_id}
Delete a webhook
client.alerting.destinations.webhooks.delete(stringwebhookId, WebhookDeleteParams { account_id } params, RequestOptionsoptions?): WebhookDeleteResponse { errors, messages, success }
DELETE/accounts/{account_id}/alerting/v3/destinations/webhooks/{webhook_id}
ModelsExpand Collapse
Webhooks { id, created_at, last_failure, 5 more }
id?: string

The unique identifier of a webhook

maxLength32
created_at?: string

Timestamp of when the webhook destination was created.

formatdate-time
last_failure?: string

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

formatdate-time
last_success?: string

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

formatdate-time
name?: string

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

secret?: string

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?: "datadog" | "discord" | "feishu" | 5 more

Type of webhook endpoint.

One of the following:
"datadog"
"discord"
"feishu"
"gchat"
"generic"
"opsgenie"
"slack"
"splunk"
url?: string

The POST endpoint to call when dispatching a notification.

WebhookCreateResponse { id }
id?: string

UUID

maxLength32
WebhookUpdateResponse { id }
id?: string

UUID

maxLength32
WebhookDeleteResponse { errors, messages, success }
errors: Array<Error>
message: string
code?: number
minimum1000
messages: Array<Message>
message: string
code?: number
minimum1000
success: true

Whether the API call was successful

AlertingHistory

List History
client.alerting.history.list(HistoryListParams { account_id, before, page, 2 more } params, RequestOptionsoptions?): V4PagePaginationArray<History { id, alert_body, alert_type, 6 more } >
GET/accounts/{account_id}/alerting/v3/history
ModelsExpand Collapse
History { id, alert_body, alert_type, 6 more }
id?: string

UUID

maxLength32
alert_body?: string

Message body included in the notification sent.

alert_type?: string

Type of notification that has been dispatched.

description?: string

Description of the notification policy (if present).

mechanism?: string

The mechanism to which the notification has been dispatched.

mechanism_type?: "email" | "pagerduty" | "webhook"

The type of mechanism to which the notification has been dispatched. This can be email/pagerduty/webhook based on the mechanism configured.

One of the following:
"email"
"pagerduty"
"webhook"
name?: string

Name of the policy.

policy_id?: string

The unique identifier of a notification policy

maxLength32
sent?: string

Timestamp of when the notification was dispatched in ISO 8601 format.

formatdate-time

AlertingPolicies

List Notification policies
client.alerting.policies.list(PolicyListParams { account_id } params, RequestOptionsoptions?): SinglePage<Policy { id, alert_interval, alert_type, 7 more } >
GET/accounts/{account_id}/alerting/v3/policies
Get a Notification policy
client.alerting.policies.get(stringpolicyId, PolicyGetParams { account_id } params, RequestOptionsoptions?): Policy { id, alert_interval, alert_type, 7 more }
GET/accounts/{account_id}/alerting/v3/policies/{policy_id}
Create a Notification policy
client.alerting.policies.create(PolicyCreateParams { account_id, alert_type, enabled, 5 more } params, RequestOptionsoptions?): PolicyCreateResponse { id }
POST/accounts/{account_id}/alerting/v3/policies
Update a Notification policy
client.alerting.policies.update(stringpolicyId, PolicyUpdateParams { account_id, alert_interval, alert_type, 5 more } params, RequestOptionsoptions?): PolicyUpdateResponse { id }
PUT/accounts/{account_id}/alerting/v3/policies/{policy_id}
Delete a Notification policy
client.alerting.policies.delete(stringpolicyId, PolicyDeleteParams { account_id } params, RequestOptionsoptions?): PolicyDeleteResponse { errors, messages, success, result_info }
DELETE/accounts/{account_id}/alerting/v3/policies/{policy_id}
ModelsExpand Collapse
Mechanism { email, pagerduty, webhooks }

List of IDs that will be used when dispatching a notification. IDs for email type will be the email address.

email?: Array<Email>
id?: string

The email address

pagerduty?: Array<Pagerduty>
id?: string

UUID

maxLength32
webhooks?: Array<Webhook>
id?: string

UUID

maxLength32
Policy { id, alert_interval, alert_type, 7 more }
id?: string

The unique identifier of a notification policy

maxLength32
alert_interval?: string

Optional specification of how often to re-alert from the same incident, not support on all alert types.

alert_type?: "abuse_report_alert" | "access_custom_certificate_expiration_type" | "advanced_ddos_attack_l4_alert" | 66 more

Refers to which event will trigger a Notification dispatch. You can use the endpoint to get available alert types which then will give you a list of possible values.

One of the following:
"abuse_report_alert"
"access_custom_certificate_expiration_type"
"advanced_ddos_attack_l4_alert"
"advanced_ddos_attack_l7_alert"
"advanced_http_alert_error"
"bgp_hijack_notification"
"billing_usage_alert"
"block_notification_block_removed"
"block_notification_new_block"
"block_notification_review_rejected"
"bot_traffic_basic_alert"
"brand_protection_alert"
"brand_protection_digest"
"clickhouse_alert_fw_anomaly"
"clickhouse_alert_fw_ent_anomaly"
"cloudforce_one_request_notification"
"cni_maintenance_notification"
"custom_analytics"
"custom_bot_detection_alert"
"custom_ssl_certificate_event_type"
"dedicated_ssl_certificate_event_type"
"device_connectivity_anomaly_alert"
"dos_attack_l4"
"dos_attack_l7"
"expiring_service_token_alert"
"failing_logpush_job_disabled_alert"
"fbm_auto_advertisement"
"fbm_dosd_attack"
"fbm_volumetric_attack"
"health_check_status_notification"
"hostname_aop_custom_certificate_expiration_type"
"http_alert_edge_error"
"http_alert_origin_error"
"image_notification"
"image_resizing_notification"
"incident_alert"
"load_balancing_health_alert"
"load_balancing_pool_enablement_alert"
"logo_match_alert"
"magic_tunnel_health_check_event"
"magic_wan_tunnel_health"
"maintenance_event_notification"
"mtls_certificate_store_certificate_expiration_type"
"pages_event_alert"
"radar_notification"
"real_origin_monitoring"
"scriptmonitor_alert_new_code_change_detections"
"scriptmonitor_alert_new_hosts"
"scriptmonitor_alert_new_malicious_hosts"
"scriptmonitor_alert_new_malicious_scripts"
"scriptmonitor_alert_new_malicious_url"
"scriptmonitor_alert_new_max_length_resource_url"
"scriptmonitor_alert_new_resources"
"secondary_dns_all_primaries_failing"
"secondary_dns_primaries_failing"
"secondary_dns_warning"
"secondary_dns_zone_successfully_updated"
"secondary_dns_zone_validation_warning"
"security_insights_alert"
"sentinel_alert"
"stream_live_notifications"
"synthetic_test_latency_alert"
"synthetic_test_low_availability_alert"
"traffic_anomalies_alert"
"tunnel_health_event"
"tunnel_update_event"
"universal_ssl_event_type"
"web_analytics_metrics_update"
"zone_aop_custom_certificate_expiration_type"
created?: string
formatdate-time
description?: string

Optional description for the Notification policy.

enabled?: boolean

Whether or not the Notification policy is enabled.

filters?: PolicyFilter { actions, affected_asns, affected_components, 40 more }

Optional filters that allow you to be alerted only on a subset of events for that alert type based on some criteria. This is only available for select alert types. See alert type documentation for more details.

mechanisms?: Mechanism { email, pagerduty, webhooks }

List of IDs that will be used when dispatching a notification. IDs for email type will be the email address.

modified?: string
formatdate-time
name?: string

Name of the policy.

PolicyFilter { actions, affected_asns, affected_components, 40 more }

Optional filters that allow you to be alerted only on a subset of events for that alert type based on some criteria. This is only available for select alert types. See alert type documentation for more details.

actions?: Array<string>

Usage depends on specific alert type

affected_asns?: Array<string>

Used for configuring radar_notification

affected_components?: Array<string>

Used for configuring incident_alert

affected_locations?: Array<string>

Used for configuring radar_notification

airport_code?: Array<string>

Used for configuring maintenance_event_notification

alert_trigger_preferences?: Array<string>

Usage depends on specific alert type

alert_trigger_preferences_value?: Array<string>

Usage depends on specific alert type

enabled?: Array<string>

Used for configuring load_balancing_pool_enablement_alert

environment?: Array<string>

Used for configuring pages_event_alert

event?: Array<string>

Used for configuring pages_event_alert

event_source?: Array<string>

Used for configuring load_balancing_health_alert

event_type?: Array<string>

Usage depends on specific alert type

group_by?: Array<string>

Usage depends on specific alert type

health_check_id?: Array<string>

Used for configuring health_check_status_notification

incident_impact?: Array<"INCIDENT_IMPACT_NONE" | "INCIDENT_IMPACT_MINOR" | "INCIDENT_IMPACT_MAJOR" | "INCIDENT_IMPACT_CRITICAL">

Used for configuring incident_alert

One of the following:
"INCIDENT_IMPACT_NONE"
"INCIDENT_IMPACT_MINOR"
"INCIDENT_IMPACT_MAJOR"
"INCIDENT_IMPACT_CRITICAL"
input_id?: Array<string>

Used for configuring stream_live_notifications

insight_class?: Array<string>

Used for configuring security_insights_alert

limit?: Array<string>

Used for configuring billing_usage_alert

logo_tag?: Array<string>

Used for configuring logo_match_alert

megabits_per_second?: Array<string>

Used for configuring advanced_ddos_attack_l4_alert

new_health?: Array<string>

Used for configuring load_balancing_health_alert

new_status?: Array<string>

Used for configuring tunnel_health_event

packets_per_second?: Array<string>

Used for configuring advanced_ddos_attack_l4_alert

pool_id?: Array<string>

Usage depends on specific alert type

pop_names?: Array<string>

Usage depends on specific alert type

product?: Array<string>

Used for configuring billing_usage_alert

project_id?: Array<string>

Used for configuring pages_event_alert

protocol?: Array<string>

Used for configuring advanced_ddos_attack_l4_alert

query_tag?: Array<string>

Usage depends on specific alert type

requests_per_second?: Array<string>

Used for configuring advanced_ddos_attack_l7_alert

selectors?: Array<string>

Usage depends on specific alert type

services?: Array<string>

Used for configuring clickhouse_alert_fw_ent_anomaly

slo?: Array<string>

Usage depends on specific alert type

status?: Array<string>

Used for configuring health_check_status_notification

target_hostname?: Array<string>

Used for configuring advanced_ddos_attack_l7_alert

target_ip?: Array<string>

Used for configuring advanced_ddos_attack_l4_alert

target_zone_name?: Array<string>

Used for configuring advanced_ddos_attack_l7_alert

traffic_exclusions?: Array<"security_events">

Used for configuring traffic_anomalies_alert

tunnel_id?: Array<string>

Used for configuring tunnel_health_event

tunnel_name?: Array<string>

Usage depends on specific alert type

type?: Array<string>

Usage depends on specific alert type

where?: Array<string>

Usage depends on specific alert type

zones?: Array<string>

Usage depends on specific alert type

PolicyCreateResponse { id }
id?: string

UUID

maxLength32
PolicyUpdateResponse { id }
id?: string

UUID

maxLength32
PolicyDeleteResponse { errors, messages, success, result_info }
errors: Array<Error>
message: string
code?: number
minimum1000
messages: Array<Message>
message: string
code?: number
minimum1000
success: true

Whether the API call was successful

result_info?: ResultInfo { count, page, per_page, total_count }
count?: number

Total number of results for the requested service

page?: number

Current page within paginated list of results

per_page?: number

Number of results per page of results

total_count?: number

Total results available without any search parameters

AlertingSilences

List Silences
client.alerting.silences.list(SilenceListParams { account_id } params, RequestOptionsoptions?): SinglePage<SilenceListResponse { id, created_at, end_time, 3 more } >
GET/accounts/{account_id}/alerting/v3/silences
Get Silence
client.alerting.silences.get(stringsilenceId, SilenceGetParams { account_id } params, RequestOptionsoptions?): SilenceGetResponse { id, created_at, end_time, 3 more }
GET/accounts/{account_id}/alerting/v3/silences/{silence_id}
Create Silences
client.alerting.silences.create(SilenceCreateParams { account_id, body } params, RequestOptionsoptions?): SilenceCreateResponse { errors, messages, success }
POST/accounts/{account_id}/alerting/v3/silences
Update Silences
client.alerting.silences.update(SilenceUpdateParams { account_id, body } params, RequestOptionsoptions?): SinglePage<SilenceUpdateResponse { id, created_at, end_time, 3 more } >
PUT/accounts/{account_id}/alerting/v3/silences
Delete Silence
client.alerting.silences.delete(stringsilenceId, SilenceDeleteParams { account_id } params, RequestOptionsoptions?): SilenceDeleteResponse { errors, messages, success }
DELETE/accounts/{account_id}/alerting/v3/silences/{silence_id}
ModelsExpand Collapse
SilenceListResponse { id, created_at, end_time, 3 more }
id?: string

Silence ID

maxLength32
created_at?: string

When the silence was created.

end_time?: string

When the silence ends.

policy_id?: string

The unique identifier of a notification policy

maxLength32
start_time?: string

When the silence starts.

updated_at?: string

When the silence was modified.

SilenceGetResponse { id, created_at, end_time, 3 more }
id?: string

Silence ID

maxLength32
created_at?: string

When the silence was created.

end_time?: string

When the silence ends.

policy_id?: string

The unique identifier of a notification policy

maxLength32
start_time?: string

When the silence starts.

updated_at?: string

When the silence was modified.

SilenceCreateResponse { errors, messages, success }
errors: Array<Error>
message: string
code?: number
minimum1000
messages: Array<Message>
message: string
code?: number
minimum1000
success: true

Whether the API call was successful

SilenceUpdateResponse { id, created_at, end_time, 3 more }
id?: string

Silence ID

maxLength32
created_at?: string

When the silence was created.

end_time?: string

When the silence ends.

policy_id?: string

The unique identifier of a notification policy

maxLength32
start_time?: string

When the silence starts.

updated_at?: string

When the silence was modified.

SilenceDeleteResponse { errors, messages, success }
errors: Array<Error>
message: string
code?: number
minimum1000
messages: Array<Message>
message: string
code?: number
minimum1000
success: true

Whether the API call was successful