Skip to main content
POST
Create a metadata schema

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Headers

Idempotency-Key
string<uuid>
required

Client-generated unique key per operation intent (UUID). Same key + identical body replays the original response; same key + different body returns 409.

Body

application/json
metadata_type
enum<string>
required

Whether the schema validates token or token group metadata

Available options:
TOKEN,
TOKEN_GROUP
metadata_json_schema
object
required

The JSON Schema that metadata of this type is validated against from now on. Metadata is a flat map, so the schema describes an object whose properties are strings, numbers or booleans

Response

The version created

tenant_id
string
required

Owning tenant, set by the platform

metadata_type
enum<string>
required

Whether the schema validates token or token group metadata

Available options:
TOKEN,
TOKEN_GROUP
metadata_schema_version
integer
required

The version of this schema. Each create stores the next version, and a schema is never edited

Required range: x >= 1
metadata_json_schema
object
required

The JSON Schema that metadata of this type is validated against

created_at
string<date-time>
required
created_by
string
required

The client that created this version