cURL
curl --request POST \ --url https://api.vela.dev/v1/apps/{appId}/schemas \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "eventName": "order.placed", "description": "Emitted when a checkout completes", "fields": [ { "id": "fld-order-id", "name": "orderId", "type": "string", "required": true }, { "id": "fld-amount", "name": "amountCents", "type": "number", "required": true } ], "metadataFields": [ { "id": "meta-env", "name": "environment", "type": "string" } ] } '
{ "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" }
Registers a new event schema for the app.
Client secret for management API access. Format: vela_cs_...
vela_cs_...
App UUID or slug
Event name (unique per app)
At least one field definition
1
Show child attributes
Human-readable description
Optional metadata field definitions
Schema created
Schema identifier
Associated app
Event data field definitions
Metadata field definitions