---
title: Get a custom page
---

[Skip to content](#_top)

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

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

Copy Markdown

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

---

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

# Get a custom page

client.CustomPages.Get(ctx, identifier, query) (\*[CustomPageGetResponse](<https://developers.cloudflare.com/api/go/resources/custom_pages#(resource)%20custom_pages%20%3E%20(model)%20CustomPageGetResponse%20%3E%20(schema)>), error)

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

Returns 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)

`Zero Trust: PII Read``Account Custom Pages Write``Account Custom Pages Read``Account Settings Write``Account Settings Read`

##### ParametersExpand Collapse

<details>

<summary>

identifier <a href="https://developers.cloudflare.com/api/go/resources/custom_pages/methods/get#(resource)%20custom_pages%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20identifier%20%3E%20(schema)">CustomPageGetParamsIdentifier</a>

Custom page type.

</summary>

One of the following:

const CustomPageGetParamsIdentifier1000Errors <a href="https://developers.cloudflare.com/api/go/resources/custom_pages/methods/get#(resource)%20custom_pages%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20identifier%20%3E%20(schema)">CustomPageGetParamsIdentifier</a> = "1000\_errors"

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

const CustomPageGetParamsIdentifier500Errors <a href="https://developers.cloudflare.com/api/go/resources/custom_pages/methods/get#(resource)%20custom_pages%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20identifier%20%3E%20(schema)">CustomPageGetParamsIdentifier</a> = "500\_errors"

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

const CustomPageGetParamsIdentifierBasicChallenge <a href="https://developers.cloudflare.com/api/go/resources/custom_pages/methods/get#(resource)%20custom_pages%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20identifier%20%3E%20(schema)">CustomPageGetParamsIdentifier</a> = "basic\_challenge"

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

const CustomPageGetParamsIdentifierCountryChallenge <a href="https://developers.cloudflare.com/api/go/resources/custom_pages/methods/get#(resource)%20custom_pages%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20identifier%20%3E%20(schema)">CustomPageGetParamsIdentifier</a> = "country\_challenge"

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

const CustomPageGetParamsIdentifierIPBlock <a href="https://developers.cloudflare.com/api/go/resources/custom_pages/methods/get#(resource)%20custom_pages%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20identifier%20%3E%20(schema)">CustomPageGetParamsIdentifier</a> = "ip\_block"

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

const CustomPageGetParamsIdentifierManagedChallenge <a href="https://developers.cloudflare.com/api/go/resources/custom_pages/methods/get#(resource)%20custom_pages%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20identifier%20%3E%20(schema)">CustomPageGetParamsIdentifier</a> = "managed\_challenge"

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

const CustomPageGetParamsIdentifierRatelimitBlock <a href="https://developers.cloudflare.com/api/go/resources/custom_pages/methods/get#(resource)%20custom_pages%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20identifier%20%3E%20(schema)">CustomPageGetParamsIdentifier</a> = "ratelimit\_block"

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

const CustomPageGetParamsIdentifierUnderAttack <a href="https://developers.cloudflare.com/api/go/resources/custom_pages/methods/get#(resource)%20custom_pages%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20identifier%20%3E%20(schema)">CustomPageGetParamsIdentifier</a> = "under\_attack"

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

const CustomPageGetParamsIdentifierWAFBlock <a href="https://developers.cloudflare.com/api/go/resources/custom_pages/methods/get#(resource)%20custom_pages%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20identifier%20%3E%20(schema)">CustomPageGetParamsIdentifier</a> = "waf\_block"

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

const CustomPageGetParamsIdentifierWAFChallenge <a href="https://developers.cloudflare.com/api/go/resources/custom_pages/methods/get#(resource)%20custom_pages%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20identifier%20%3E%20(schema)">CustomPageGetParamsIdentifier</a> = "waf\_challenge"

<a href="#(resource)%20custom_pages%20%3E%20(method)%20get%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)%20get%20%3E%20(params)%20default%20%3E%20(param)%20identifier%20%3E%20(schema)>)

<details>

<summary>

query CustomPageGetParams

</summary>

AccountID param.Field\[string]Optional

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

<a href="#(resource)%20custom_pages%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20account_id">Link to this property</a>

ZoneID param.Field\[string]Optional

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

<a href="#(resource)%20custom_pages%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20zone_id">Link to this property</a>

</details>

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

##### ReturnsExpand Collapse

<details>

<summary>

type CustomPageGetResponse struct{…}

</summary>

ID stringOptional

<a href="#(resource)%20custom_pages%20%3E%20(model)%20CustomPageGetResponse%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

CreatedOn TimeOptional

formatdate-time

<a href="#(resource)%20custom_pages%20%3E%20(model)%20CustomPageGetResponse%20%3E%20(schema)%20%3E%20(property)%20created_on">Link to this property</a>

Description stringOptional

<a href="#(resource)%20custom_pages%20%3E%20(model)%20CustomPageGetResponse%20%3E%20(schema)%20%3E%20(property)%20description">Link to this property</a>

ModifiedOn TimeOptional

formatdate-time

<a href="#(resource)%20custom_pages%20%3E%20(model)%20CustomPageGetResponse%20%3E%20(schema)%20%3E%20(property)%20modified_on">Link to this property</a>

PreviewTarget stringOptional

<a href="#(resource)%20custom_pages%20%3E%20(model)%20CustomPageGetResponse%20%3E%20(schema)%20%3E%20(property)%20preview_target">Link to this property</a>

RequiredTokens \[]stringOptional

<a href="#(resource)%20custom_pages%20%3E%20(model)%20CustomPageGetResponse%20%3E%20(schema)%20%3E%20(property)%20required_tokens">Link to this property</a>

<details>

<summary>

State CustomPageGetResponseStateOptional

The custom page state.

</summary>

One of the following:

const CustomPageGetResponseStateDefault CustomPageGetResponseState = "default"

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

const CustomPageGetResponseStateCustomized CustomPageGetResponseState = "customized"

<a href="#(resource)%20custom_pages%20%3E%20(model)%20CustomPageGetResponse%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(model)%20CustomPageGetResponse%20%3E%20(schema)%20%3E%20(property)%20state">Link to this property</a>

URL stringOptional

The URL associated with the custom page.

formaturi

<a href="#(resource)%20custom_pages%20%3E%20(model)%20CustomPageGetResponse%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(model)%20CustomPageGetResponse%20%3E%20(schema)>)

### Get a custom page

Go

HTTPTypeScriptPythonGoTerraform

```
package main

import (
  "context"
  "fmt"

  "github.com/cloudflare/cloudflare-go"
  "github.com/cloudflare/cloudflare-go/custom_pages"
  "github.com/cloudflare/cloudflare-go/option"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"),
    option.WithAPIEmail("user@example.com"),
  )
  customPage, err := client.CustomPages.Get(
    context.TODO(),
    custom_pages.CustomPageGetParamsIdentifierRatelimitBlock,
    custom_pages.CustomPageGetParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", customPage.ID)
}
```

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"
  }
}
```