Skip to main content
POST
/
public
/
v1
/
projects
/
{projectId}
/
schemas
Create a schema
curl --request POST \
  --url https://your-synthbrew-server.com/api/public/v1/projects/{projectId}/schemas \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "name": "<string>",
  "initialVersion": {
    "schema": {}
  }
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "slug": "<string>",
  "name": "<string>",
  "description": "<string>",
  "projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Authorizations

x-api-key
string
header
required

Team API key created under /api/api-keys. Prefix: sb_api_.

Path Parameters

projectId
string<uuid>
required

Project UUID in the team associated with the API key.

Body

application/json

Create a schema. Optionally include initialVersion.schema to create the first version in the same request.

name
string
required
initialVersion
object

Optional initial schema version payload.

Response

Schema created

id
string<uuid>
slug
string
name
string
description
string | null
projectId
string<uuid>
createdAt
string<date-time>
updatedAt
string<date-time> | null