Custom Pages

CustomPages

Methods

list(, ): <>
get/{accounts_or_zones}/{account_or_zone_id}/custom_pages

Fetches all the custom pages.

get(, , ):
get/{accounts_or_zones}/{account_or_zone_id}/custom_pages/{identifier}

Fetches the details of a custom page.

update(, , ):
put/{accounts_or_zones}/{account_or_zone_id}/custom_pages/{identifier}

Updates the configuration of an existing custom page.

Security
API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example: X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example: X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194

Accepted Permissions (at least one required)

Account Custom Pages Write Account Settings Write

Parameters
identifier: "1000_errors" | "500_errors" | "basic_challenge" | 7 more...

Error Page Types

"1000_errors"
"500_errors"
"basic_challenge"
"country_challenge"
"ip_block"
"managed_challenge"
"ratelimit_block"
"under_attack"
"waf_block"
"waf_challenge"
state: "default" | "customized"

Body param: The custom page state.

url: string
(format: uri)

Body param: The URL associated with the custom page.

account_id?: string

Path param: The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.

zone_id?: string

Path param: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.

Returns
CustomPageUpdateResponse{
id?: string
created_on?: string
(format: date-time)
description?: string
modified_on?: string
(format: date-time)
preview_target?: string
required_tokens?: Array<string>
state?: "default" | "customized"

The custom page state.

url?: string
(format: uri)

The URL associated with the custom page.

Request example
200Example