Skip to main content
POST

Authorizations

Authorization
string
header
required

JWT bearer token obtained via the OAuth2 client-credentials grant from the platform Authentication API. The token's scopes gate the endpoints it may call, and its audience names the Guardian instance. This is the standard way to authenticate to Guardian.

Headers

X-Idempotency-Key
string

Makes the write safe to retry. A repeat with the same key, by the same credential, with the same request within 24 hours returns the original outcome with Idempotent-Replayed: true instead of executing again. 1 to 255 visible ASCII characters, sent once. Must not contain card data. See Idempotency.

Required string length: 1 - 255
Pattern: ^[!-~]+$
Example:

"generic-token-7f3c2a9e-0001"

Body

application/json
payload
object
required

The payload is a key-value map, that can contain any information the user wants to store in the token.

  • Maximum 20 key-value pairs. * Maximum 20 characters per key. * Maximum 80 characters per value.
expiration_time
integer

The expiry time is used to specify after how many seconds a token should be automatically deleted after creation.

Required range: 1 <= x <= 2592000
Example:

3600

metadata
object

Metadata consisting of key-value entries.

  • Maximum 20 key-value pairs.
  • Maximum 20 characters per key.
  • Maximum 80 characters per value.
Example:
type_id
string<uuid> | null

The ID of a type to apply for this payload. If provided the payload will be validated against the schema of the type and the tokens can be filtered by the type ID as well. Give at most one of type_id and schema; a null value counts as not sent.

Example:

"9e5b3f7d-2c8a-4b6e-a1d9-6f4c8b2e5a7d"

schema
object | null

An inline JSON Schema the payload must follow, in place of type_id. It is checked like a type's schema, including its x-data-classification annotations, and kept on the token as sent. It is draft 2020-12, or draft-07 when $schema names it; any other $schema is refused. Re-encoded as compact JSON, it may be at most 32768 bytes (32 KB), and it may nest objects and arrays at most 32 levels deep. It does not register a type. Give at most one of type_id and schema; a null value counts as not sent.

Example:

Response

Success response

id
string<uuid>
required
Example:

"7b3e9d1f-5a8c-4e2b-9d6f-3c7a1e5b9d4f"

created_at
string<date-time>
required
Example:

"2026-03-10T14:00:00Z"

expires_at
string<data-time>
Example:

"2026-03-10T15:00:00Z"

metadata
object

Metadata consisting of key-value entries.

  • Maximum 20 key-value pairs.
  • Maximum 20 characters per key.
  • Maximum 80 characters per value.
Example:
type_id
string<uuid> | null

The ID of the token's type. Null for a token created with an inline schema or without a type.

Example:

"9e5b3f7d-2c8a-4b6e-a1d9-6f4c8b2e5a7d"

schema
object | null

The inline JSON Schema the token was created with, as sent. Null for a token created with a type_id or without a type.