Skip to main content
PATCH
/
apps
/
{appId}
/
schemas
/
{schemaId}
Update Schema
curl --request PATCH \
  --url https://api.vela.dev/v1/apps/{appId}/schemas/{schemaId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "description": "Updated description",
  "fields": [
    {
      "id": "fld-order-id",
      "name": "orderId",
      "type": "string",
      "required": true
    },
    {
      "id": "fld-amount",
      "name": "amountCents",
      "type": "number",
      "required": true
    },
    {
      "id": "fld-currency",
      "name": "currency",
      "type": "enum",
      "required": true,
      "enumValues": [
        "USD",
        "EUR",
        "GBP"
      ]
    }
  ]
}
'
{
  "id": "<string>",
  "appId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "eventName": "<string>",
  "description": "<string>",
  "fields": [
    {
      "id": "<string>",
      "name": "<string>",
      "type": "string",
      "required": false,
      "enumValues": [
        "<string>"
      ]
    }
  ],
  "metadataFields": [
    {
      "id": "<string>",
      "name": "<string>",
      "type": "string",
      "required": false,
      "enumValues": [
        "<string>"
      ]
    }
  ],
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Client secret for management API access. Format: vela_cs_...

Path Parameters

appId
string
required

App UUID or slug

schemaId
string
required

Schema identifier

Body

application/json
description
string

Human-readable description

fields
object[]

Replaces existing fields entirely

metadataFields
object[]

Replaces existing metadata fields entirely

Response

Updated schema

id
string

Schema identifier

appId
string<uuid>

Associated app

eventName
string

Event name (unique per app)

description
string

Human-readable description

fields
object[]

Event data field definitions

metadataFields
object[]

Metadata field definitions

createdAt
string<date-time>
updatedAt
string<date-time>