---
title: "Check which permissions a pasted Cloudflare API token has."
method: POST
path: "/ingress/cloudflare/token-check"
tags: ["Reachability"]
---

# Check which permissions a pasted Cloudflare API token has.

`POST /ingress/cloudflare/token-check`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/ingress/cloudflare/token-check`
- Auth: HTTP bearer

Read-only calls, plus two writes whose bodies Cloudflare is certain to
reject (an A record with an invalid address, a tunnel with no name):
"not authorized" means the permission is missing, a validation error
that it is there, and nothing is created either way. Any other answer is
`unverified`, and a run refuses the token. A token that reaches zones
besides the one asked about is refused too, naming them. The token is
used for this check only and is not stored.

## Request body

- TokenCheckRequest
  - `hostname` string, nullable: A hostname the token is meant to serve, when the zone is not known: the longest zone the token reaches that is the hostname or one of its parents is checked, as `zone` would be. Ignored when `zone` is set.
  - `token` string, password, required: The token, as pasted. Used for this check only; not stored. A secret field, so the AI assistant takes it through a secret slot.
  - `zone` string, nullable: The zone the token is meant for. With it, a token that reaches any other zone is not ready.

## Response `200`

- TokenCheckResult
  - `checked_zone` string, nullable: The zone the write permissions were probed in.
  - `error` string, nullable: Why it did not, when it did not.
  - `permissions` PermissionCheck[], required
    - `detail` string, required: Why, and what to change on the token when it is not present.
    - `label` string, required
    - `permission` 'zone_read' | 'dns_edit' | 'tunnel_edit', required
    - `state` 'present' | 'missing' | 'unverified', required
  - `ready` boolean, required: Every permission is present and, for one zone, the token reaches no other.
  - `scope` ZoneScope, nullable: Whether the token reaches only the zone it is meant for.
    - `detail` string, required
    - `ok` boolean, required
    - `other_count` integer, required: How many other zones it reaches in all, listed or not.
    - `other_zones` string[], required: Zones it reaches besides `zone`, as far as Cloudflare listed them.
    - `zone` string, required
  - `template_url` string, required: Where to create a token with the permissions filled in.
  - `valid` boolean, required: Cloudflare accepted the token at all.
  - `zones` string[], required: Zones the token reaches (the first 50).

## Changes

- **2026-10-29** `6d5d7eaf4b5a`: 1 info
  - added the new optional request property `hostname`
- **2026-10-26** `6882080cc5b5`: 1 info
  - endpoint added
- **2026-10-26** `198448ae2ca3`: 1 breaking
  - api path removed without deprecation
- **2026-10-26** `a086d94641be`: 1 info
  - endpoint added
- **2026-10-26** `284b6df39007`: 1 breaking
  - api path removed without deprecation

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/ingress/cloudflare/token-check/post.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
