This guide covers the fifth additive parity batch for family-level integration docs:
schemas.upsertschemas.get
Use this guide together with:
docs/openapi/gateway.v1.json(canonical endpoint surface)axp-spec/schemas/public_api/*.json(canonical schema contracts)docs/public-api-auth.mdanddocs/supported-limits-and-error-model.md
Schemas endpoints manage semantic contract registry entries used by message envelope validation and schema-aware tooling. Integrators upsert schema metadata/payload for a semantic type and retrieve active schema definitions for runtime validation and inspection.
POST /v1/schemasGET /v1/schemas/{semantic_type}
axp-spec/schemas/public_api/api.schemas.upsert.request.v1.jsonaxp-spec/schemas/public_api/api.schemas.upsert.response.v1.jsonaxp-spec/schemas/public_api/api.schemas.get.response.v1.json
{
"semantic_type": "workflow.approval.request.v1",
"schema_json": {
"type": "object",
"additionalProperties": false,
"required": ["request_id", "title"],
"properties": {
"request_id": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"title": {
"type": "string",
"minLength": 1,
"maxLength": 255
}
}
},
"compatibility_mode": "backward",
"scope": "tenant",
"active": true
}{
"ok": true,
"schema": {
"semantic_type": "workflow.approval.request.v1",
"schema_ref": "registry://agent://example/owner/workflow.approval.request.v1@f3f08b08f7a3",
"schema_hash": "f3f08b08f7a35a4fd3570a45123ecf4f8de962fce8fbb7f4581ec7c5b4a68dd7",
"compatibility_mode": "backward",
"scope": "tenant",
"owner_agent": "agent://example/owner",
"active": true,
"schema_json": {
"type": "object",
"additionalProperties": false,
"required": ["request_id", "title"],
"properties": {
"request_id": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"title": {
"type": "string",
"minLength": 1,
"maxLength": 255
}
}
},
"created_at": "2026-03-01T10:00:00Z",
"updated_at": "2026-03-01T10:00:00Z"
}
}POST /v1/schemasis an upsert keyed by(semantic_type, owner_scope)and can be safely retried with identical payload.- Keep
schema_jsonstable across retries to preserve deterministicschema_hashand avoid accidental schema drift. GET /v1/schemas/{semantic_type}is a safe retryable read.- Include
X-Trace-Idon upsert/get calls for schema governance audit correlation.
400when owner scope is missing for tenant upsert or whenschema_jsonis not a valid JSON Schema document.403when upsert tries to writescope=corevia tenant endpoint.404when requestedsemantic_typeis not found among active tenant/core records.422for malformed body fields (invalidsemantic_typepattern, unsupported enum values, type mismatches).401/403for auth and owner-scope policy failures.
- Python GA:
AxmeClient.upsert_schema(...)AxmeClient.get_schema(...)
- TypeScript GA:
AxmeClient.upsertSchema(...)AxmeClient.getSchema(...)
- Beta SDKs (
Go/Java/.NET):- kickoff baseline currently covers
users.*; schema helpers are pending later beta expansion.
- kickoff baseline currently covers
- Covered by executable checks in
axme-conformance:schemas_upsertschemas_get