v2
latestOpenAPI 3.1.12026-07-2613060964.2 KBCreate/Update Schema
Upset draft version of a JSON schema. Creates a new schema if it doesn't exist.
post/v1/{workspace}/schema/{schema_slug}/
Path parameters
workspacestring required
Workspace slug (staging, production, etc.)
schema_slugstring required
Unique identifier of the schema
Query parameters
commitboolean
Set to true to commit the schema immediately after creation/update
commit_messagestring
Commit message describing the changes (required when commit=true)
Request body
Example request
{
"name": "Order Placed Event",
"description": "Schema for order placement action",
"json_schema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"order_id",
"amount"
],
"properties": {
"order_id": {
"type": "string"
},
"amount": {
"type": "string"
}
},
"additionalProperties": true
}
}Response
Successfully retrieved schema object
Example response
{
"slug": "new-order-placed",
"name": "Order Placed Event",
"description": "Schema for order placement action",
"status": "draft",
"hash": "382b707d4b1f8999a1xxxxxxxx",
"json_schema": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"order_id",
"amount"
],
"properties": {
"order_id": {
"type": "string"
},
"amount": {
"type": "string"
}
},
"additionalProperties": true
},
"created_at": "2025-08-27T09:30:57.945326Z",
"updated_at": "2025-08-29T15:37:37.650177Z",
"commit_result": {
"is_committed": false,
"errors": [
"hash: no uncommitted changes found"
]
}
}