Skip to main content
POST
Upsert Schema

Authorizations

Authorization
string
header
required

Pass as Authorization: ServiceToken <token>. You can get Service Token from SuprSend dashboard -> Account Settings -> Service Tokens section.

Path Parameters

workspace
string
required

Workspace slug (staging, production, etc.)

schema_slug
string
required

Unique identifier of the schema

Query Parameters

commit
boolean
default:false

Set to true to commit the schema immediately after creation/update

commit_message
string

Optional commit message describing the changes. Used only when commit=true.

Body

application/json
name
string

Human-readable name of the schema

Maximum string length: 128
Example:

"Order Placed Event"

description
string | null

Description of the schema. Can be used to describe which action this schema is linked to.

Example:

"Schema for order placement action"

is_enabled
boolean
default:true

Whether the schema is enabled.

json_schema
object

Structure of the workflow or event payload. Follows standard json schema specification. You can link this schema to a workflow or event to validate their input payload in API response. Same schema can be linked to multiple workflows and events.

Example:

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.

slug
string

Unique identifier for the schema

Example:

"new-order-placed"

name
string

Human-readable name of the schema

Example:

"Order Placed Event"

description
string | null

Description of the schema

Example:

"Schema for order placement action"

status
enum<string>

Status of the returned schema version. draft, or live when commit=true and the commit succeeds.

Available options:
draft,
live
Example:

"draft"

hash
string

Git-like hash for version tracking

Example:

"382b707d4b1f8999a1xxxxxxxx"

json_schema
object | null

JSON schema passed in the request body.

created_at
string<date-time>

When the schema was created

Example:

"2025-08-27T09:30:57.945326Z"

updated_at
string<date-time>

When the schema was last updated

Example:

"2025-08-29T15:37:37.650177Z"

commit_result
object | null

Commit result when commit=true is passed in query parameter

Example: