---
title: Update a custom page
---

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api)

[Custom Pages](https://developers.cloudflare.com/api/resources/custom_pages)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# Update a custom page

PUT/{accounts\_or\_zones}/{account\_or\_zone\_id}/custom\_pages/{identifier}

Updates the configuration for a custom page type.

##### 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`

##### P ath ParametersExpand Collapse

<details>

<summary>

identifier: "1000\_errors"or "500\_errors"or "basic\_challenge"or 7 more

Custom page type.

</summary>

One of the following:

"1000\_errors"

<a href="#(resource)%20custom_pages%20%3E%20(method)%20update%20%3E%20(params)%20default%20%3E%20(param)%20identifier%20%3E%20(schema)%20%3E%20(member)%200">Link to this property</a>

"500\_errors"

<a href="#(resource)%20custom_pages%20%3E%20(method)%20update%20%3E%20(params)%20default%20%3E%20(param)%20identifier%20%3E%20(schema)%20%3E%20(member)%201">Link to this property</a>

"basic\_challenge"

<a href="#(resource)%20custom_pages%20%3E%20(method)%20update%20%3E%20(params)%20default%20%3E%20(param)%20identifier%20%3E%20(schema)%20%3E%20(member)%202">Link to this property</a>

"country\_challenge"

<a href="#(resource)%20custom_pages%20%3E%20(method)%20update%20%3E%20(params)%20default%20%3E%20(param)%20identifier%20%3E%20(schema)%20%3E%20(member)%203">Link to this property</a>

"ip\_block"

<a href="#(resource)%20custom_pages%20%3E%20(method)%20update%20%3E%20(params)%20default%20%3E%20(param)%20identifier%20%3E%20(schema)%20%3E%20(member)%204">Link to this property</a>

"managed\_challenge"

<a href="#(resource)%20custom_pages%20%3E%20(method)%20update%20%3E%20(params)%20default%20%3E%20(param)%20identifier%20%3E%20(schema)%20%3E%20(member)%205">Link to this property</a>

"ratelimit\_block"

<a href="#(resource)%20custom_pages%20%3E%20(method)%20update%20%3E%20(params)%20default%20%3E%20(param)%20identifier%20%3E%20(schema)%20%3E%20(member)%206">Link to this property</a>

"under\_attack"

<a href="#(resource)%20custom_pages%20%3E%20(method)%20update%20%3E%20(params)%20default%20%3E%20(param)%20identifier%20%3E%20(schema)%20%3E%20(member)%207">Link to this property</a>

"waf\_block"

<a href="#(resource)%20custom_pages%20%3E%20(method)%20update%20%3E%20(params)%20default%20%3E%20(param)%20identifier%20%3E%20(schema)%20%3E%20(member)%208">Link to this property</a>

"waf\_challenge"

<a href="#(resource)%20custom_pages%20%3E%20(method)%20update%20%3E%20(params)%20default%20%3E%20(param)%20identifier%20%3E%20(schema)%20%3E%20(member)%209">Link to this property</a>

</details>

[Link to this property](<#(resource)%20custom_pages%20%3E%20(method)%20update%20%3E%20(params)%20default%20%3E%20(param)%20identifier%20%3E%20(schema)>)

account\_id: optional string

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

[Link to this property](<#(resource)%20custom_pages%20%3E%20(method)%20update%20%3E%20(params)%20default%20%3E%20(param)%20account_id%20%3E%20(schema)>)

zone\_id: optional string

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

[Link to this property](<#(resource)%20custom_pages%20%3E%20(method)%20update%20%3E%20(params)%20default%20%3E%20(param)%20zone_id%20%3E%20(schema)>)

##### Body ParametersJSONExpand Collapse

<details>

<summary>

state: "default"or "customized"

The custom page state.

</summary>

One of the following:

"default"

<a href="#(resource)%20custom_pages%20%3E%20(method)%20update%20%3E%20(params)%200%20%3E%20(param)%20state%20%3E%20(schema)%20%3E%20(member)%200">Link to this property</a>

"customized"

<a href="#(resource)%20custom_pages%20%3E%20(method)%20update%20%3E%20(params)%200%20%3E%20(param)%20state%20%3E%20(schema)%20%3E%20(member)%201">Link to this property</a>

</details>

[Link to this property](<#(resource)%20custom_pages%20%3E%20(method)%20update%20%3E%20(params)%200%20%3E%20(param)%20state%20%3E%20(schema)>)

url: string

The URL associated with the custom page.

formaturi

[Link to this property](<#(resource)%20custom_pages%20%3E%20(method)%20update%20%3E%20(params)%200%20%3E%20(param)%20url%20%3E%20(schema)>)

##### ReturnsExpand Collapse

<details>

<summary>

errors: array of object {code, message, documentation\_url, source }

</summary>

code: number

minimum1000

<a href="#(resource)%20custom_pages%20%3E%20(method)%20update%20%3E%20(network%20schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20code">Link to this property</a>

message: string

<a href="#(resource)%20custom_pages%20%3E%20(method)%20update%20%3E%20(network%20schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20message">Link to this property</a>

documentation\_url: optional string

<a href="#(resource)%20custom_pages%20%3E%20(method)%20update%20%3E%20(network%20schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20documentation_url">Link to this property</a>

<details>

<summary>

source: optional object {pointer }

</summary>

pointer: optional string

<a href="#(resource)%20custom_pages%20%3E%20(method)%20update%20%3E%20(network%20schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20source%20%3E%20(property)%20pointer">Link to this property</a>

</details>

<a href="#(resource)%20custom_pages%20%3E%20(method)%20update%20%3E%20(network%20schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20source">Link to this property</a>

</details>

[Link to this property](<#(resource)%20custom_pages%20%3E%20(method)%20update%20%3E%20(network%20schema)%20%3E%20(property)%20errors>)

<details>

<summary>

messages: array of object {code, message, documentation\_url, source }

</summary>

code: number

minimum1000

<a href="#(resource)%20custom_pages%20%3E%20(method)%20update%20%3E%20(network%20schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20code">Link to this property</a>

message: string

<a href="#(resource)%20custom_pages%20%3E%20(method)%20update%20%3E%20(network%20schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20message">Link to this property</a>

documentation\_url: optional string

<a href="#(resource)%20custom_pages%20%3E%20(method)%20update%20%3E%20(network%20schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20documentation_url">Link to this property</a>

<details>

<summary>

source: optional object {pointer }

</summary>

pointer: optional string

<a href="#(resource)%20custom_pages%20%3E%20(method)%20update%20%3E%20(network%20schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20source%20%3E%20(property)%20pointer">Link to this property</a>

</details>

<a href="#(resource)%20custom_pages%20%3E%20(method)%20update%20%3E%20(network%20schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20source">Link to this property</a>

</details>

[Link to this property](<#(resource)%20custom_pages%20%3E%20(method)%20update%20%3E%20(network%20schema)%20%3E%20(property)%20messages>)

success: true

Whether the API call was successful.

[Link to this property](<#(resource)%20custom_pages%20%3E%20(method)%20update%20%3E%20(network%20schema)%20%3E%20(property)%20success>)

<details>

<summary>

result: optional object {id, created\_on, description, 5 more }

</summary>

id: optional string

<a href="#(resource)%20custom_pages%20%3E%20(method)%20update%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20custom_pages%20%3E%20(model)%20custom_page_update_response%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

created\_on: optional string

formatdate-time

<a href="#(resource)%20custom_pages%20%3E%20(method)%20update%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20custom_pages%20%3E%20(model)%20custom_page_update_response%20%3E%20(schema)%20%3E%20(property)%20created_on">Link to this property</a>

description: optional string

<a href="#(resource)%20custom_pages%20%3E%20(method)%20update%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20custom_pages%20%3E%20(model)%20custom_page_update_response%20%3E%20(schema)%20%3E%20(property)%20description">Link to this property</a>

modified\_on: optional string

formatdate-time

<a href="#(resource)%20custom_pages%20%3E%20(method)%20update%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20custom_pages%20%3E%20(model)%20custom_page_update_response%20%3E%20(schema)%20%3E%20(property)%20modified_on">Link to this property</a>

preview\_target: optional string

<a href="#(resource)%20custom_pages%20%3E%20(method)%20update%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20custom_pages%20%3E%20(model)%20custom_page_update_response%20%3E%20(schema)%20%3E%20(property)%20preview_target">Link to this property</a>

required\_tokens: optional array of string

<a href="#(resource)%20custom_pages%20%3E%20(method)%20update%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20custom_pages%20%3E%20(model)%20custom_page_update_response%20%3E%20(schema)%20%3E%20(property)%20required_tokens">Link to this property</a>

<details>

<summary>

state: optional "default"or "customized"

The custom page state.

</summary>

One of the following:

"default"

<a href="#(resource)%20custom_pages%20%3E%20(method)%20update%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20custom_pages%20%3E%20(model)%20custom_page_update_response%20%3E%20(schema)%20%3E%20(property)%20state%20%3E%20(member)%200">Link to this property</a>

"customized"

<a href="#(resource)%20custom_pages%20%3E%20(method)%20update%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20custom_pages%20%3E%20(model)%20custom_page_update_response%20%3E%20(schema)%20%3E%20(property)%20state%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20custom_pages%20%3E%20(method)%20update%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20custom_pages%20%3E%20(model)%20custom_page_update_response%20%3E%20(schema)%20%3E%20(property)%20state">Link to this property</a>

url: optional string

The URL associated with the custom page.

formaturi

<a href="#(resource)%20custom_pages%20%3E%20(method)%20update%20%3E%20(network%20schema)%20%3E%20(property)%20result%20%2B%20(resource)%20custom_pages%20%3E%20(model)%20custom_page_update_response%20%3E%20(schema)%20%3E%20(property)%20url">Link to this property</a>

</details>

[Link to this property](<#(resource)%20custom_pages%20%3E%20(method)%20update%20%3E%20(network%20schema)%20%3E%20(property)%20result>)

### Update a custom page

HTTP

HTTPTypeScriptPythonGoTerraform

```
curl https://api.cloudflare.com/client/v4/$ACCOUNTS_OR_ZONES/$ACCOUNT_OR_ZONE_ID/custom_pages/$IDENTIFIER \
    -X PUT \
    -H 'Content-Type: application/json' \
    -H "X-Auth-Email: $CLOUDFLARE_EMAIL" \
    -H "X-Auth-Key: $CLOUDFLARE_API_KEY" \
    -d '{
          "state": "default",
          "url": "http://www.example.com"
        }'
```

200 example

```
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "id": "basic_challenge",
    "created_on": "2014-01-01T05:20:00.12345Z",
    "description": "Basic Challenge",
    "modified_on": "2014-01-01T05:20:00.12345Z",
    "preview_target": "block:basic-sec-captcha",
    "required_tokens": [
      "::CAPTCHA_BOX::"
    ],
    "state": "default",
    "url": "http://www.example.com"
  }
}
```

##### Returns Examples

200 example

```
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "id": "basic_challenge",
    "created_on": "2014-01-01T05:20:00.12345Z",
    "description": "Basic Challenge",
    "modified_on": "2014-01-01T05:20:00.12345Z",
    "preview_target": "block:basic-sec-captcha",
    "required_tokens": [
      "::CAPTCHA_BOX::"
    ],
    "state": "default",
    "url": "http://www.example.com"
  }
}
```