Skip to content

Upload a zone custom page

POST
/api/zones/{zoneId}/custom-page/{type}

Uploads the HTML for one of a zone's custom pages (multipart field file), overwriting any existing page of that type. The type path segment selects the page: error, maintenance, security or challenge. The file must be non-empty and at most 1 MiB. Returns the stored page. Whether the page is actually served is controlled separately by the zone's per-type enable setting.

Authorizations

ApiToken

Long-lived API token created via POST /api/api-tokens (returned once in plaintext). A token created with readOnly may only perform safe requests (GET, HEAD, OPTIONS); write requests are rejected on every endpoint.

Type
API Key (header: X-API-TOKEN)
or
JWT

JWT access token obtained via POST /api/auth/login. Send as: Authorization: Bearer .

Type
HTTP (bearer)

Parameters

Path Parameters

zoneId*

Zone identifier

Type
string
Required
type*

custom-page identifier

Type
string
Required

Request Body

multipart/form-data
object

The HTML file to store for this page type. Non-empty, max 1 MiB.

Format"binary"

Responses

custom-page resource created

JSON
{
  
"@context": "string",
  
"@id": "string",
  
"@type": "string",
  
"type": "string",
  
"html": "string"
}

Playground

Authorization
Variables
Key
Value
Body

Samples

Powered by VitePress OpenAPI