Core API Reference

Token Introspection — Core API

Validate API keys and personal tokens. Returns token metadata and active status for use by customer backend services.

Base URL: https://api.authpi.com — see the Core API overview for authentication, pagination, and idempotency, or try these endpoints in the interactive reference.

POST/v1/accounts/{account_id}/issuers/{issuer_id}/tokens/introspect

Introspect Token

Validates an API key or personal token and returns its metadata.

Use this endpoint to determine if a token is currently active and retrieve information about it. This is useful for:

  • Backend services validating API keys before granting access
  • Applications checking personal token validity
  • Audit systems retrieving token metadata

Token Types

  • API keys (key_<id>:<secret>): Validated via hash comparison against the key's Durable Object. Supports IP allowlist enforcement when ip is provided.
  • Personal tokens (ptk_<jwt>): JWT signature is verified first, then the token's status (revoked/blocked/expired) is checked against the Durable Object.

Response

  • active: true — Token is valid and can be used. Includes token metadata.
  • active: false — Token is invalid, expired, revoked, blocked, or not found. Includes reason.

Path parameters

NameTypeRequiredDescription
account_idstringRequiredThe unique identifier of the account
issuer_idstringRequiredThe unique identifier of the issuer

Request body

Content type: application/json

PropertyTypeRequiredDescription
tokenstringRequiredThe token to introspect. Prefix determines type: key_ for API keys, ptk_ for personal tokens.
ipstringOptionalEnd-user IP for API key IP allowlist validation. When omitted, IP allowlist checking is skipped. Ignored for personal tokens.

Responses

CodeDescriptionSchema
200Token introspection result. active: true includes token metadata; active: false includes the reason.object
400Bad Request - The request is malformed or contains invalid data.ApiError
401Unauthorized - Authentication is required or has failed.ApiError
403Forbidden - You don't have permission to perform this action.ApiError