Create/Update Schema
Changed onUpset draft version of a JSON schema. Creates a new schema if it doesn't exist.
Request
- Base URLhttps://management-api.suprsend.com
- AuthAPI key in header Authorization
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
Workspace slug (staging, production, etc.)
Unique identifier of the schema
Query parameters
Set to true to commit the schema immediately after creation/update
Optional commit message describing the changes. Used only 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
Schema created (returns 202 Accepted when an existing schema's draft is updated). The response is the saved draft version. When commit=true and the commit succeeds, the response is the newly committed live version instead.
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"
]
}
}Changes
- breaking
response property
detaillist-of-types was widened by adding typesarray and objectto media typeapplication/jsonof response401 - breaking
removed the success response with the status
- warning
the
request property's maxLength was set to128 - info
added the new optional request property
- info
the request property
became optional - info
the request property
became optional - info
added the success response with the status
- info
added the success response with the status
- breaking