Validate a custom page template
POST/accounts/{account_id}/access/custom_pages/validate
Validate a Liquid template and return its errors and warnings without persisting it.
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
API Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
Example:
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Example:
Accepted Permissions (at least one required)
Body ParametersJSON
Validate a custom page template
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/access/custom_pages/validate \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
-d '{
"template": "template",
"type": "identity_denied"
}'{
"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": {
"errors": [
{
"message": "message",
"tier": "tier",
"ref": "ref"
}
],
"page_type": "identity_denied",
"version": 0,
"warnings": [
{
"message": "message",
"tier": "tier",
"ref": "ref"
}
]
}
}Returns Examples
{
"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": {
"errors": [
{
"message": "message",
"tier": "tier",
"ref": "ref"
}
],
"page_type": "identity_denied",
"version": 0,
"warnings": [
{
"message": "message",
"tier": "tier",
"ref": "ref"
}
]
}
}