Create a protocol schema.
POST
/api/admin/field-mapping/protocol-schemas
Code sample: Shell / cURL
curl --request POST \ --url https://auth.example.com/api/admin/field-mapping/protocol-schemas \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "protocol": "oidc", "schemaKey": "claims", "schemaVersion": "1", "schema": { "claims": { "department": { "type": "string" } } } }'Creates a protocol schema definition for field-mapping validation and preview workflows. The mutation returns the created schema in a result envelope.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Header Parameters
Section titled “Header Parameters ” Idempotency-Key
string
Idempotency key for state-changing operations that support replay protection.
Request Body required
Section titled “Request Body required ” Media type application/json
object
protocol
required
string
schemaKey
required
string
schemaVersion
string
schema
required
object
key
additional properties
key
additional properties
Example
{ "protocol": "oidc", "schemaKey": "claims", "schemaVersion": "1", "schema": { "claims": { "department": { "type": "string" } } }}Responses
Section titled “ Responses ”Protocol schema mutation response.
Media type application/json
object
result
required
object
id
required
string
tenantId
required
string
protocol
required
string
schemaKey
required
string
schemaVersion
string | null
schema
object
key
additional properties
lifecycleState
required
string
key
additional properties
key
additional properties
Example generated
{ "result": { "id": "example", "tenantId": "example", "protocol": "example", "schemaKey": "example", "schemaVersion": "example", "schema": { "additionalProperty": "example" }, "lifecycleState": "example" }}Error response.
Media type application/json
object
error
string
message
string
error_description
string
key
additional properties
Example generated
{ "error": "example", "message": "example", "error_description": "example"}Error response.
Media type application/json
object
error
string
message
string
error_description
string
key
additional properties
Example generated
{ "error": "example", "message": "example", "error_description": "example"}Error response.
Media type application/json
object
error
string
message
string
error_description
string
key
additional properties
Example generated
{ "error": "example", "message": "example", "error_description": "example"}Error response.
Media type application/json
object
error
string
message
string
error_description
string
key
additional properties
Example generated
{ "error": "example", "message": "example", "error_description": "example"}Error response.
Media type application/json
object
error
string
message
string
error_description
string
key
additional properties
Example generated
{ "error": "example", "message": "example", "error_description": "example"}Error response.
Media type application/json
object
error
string
message
string
error_description
string
key
additional properties
Example generated
{ "error": "example", "message": "example", "error_description": "example"}