Skip to main content

Update Event

Update an event definition's description or schema.

Endpoint

PATCH /events/{id}

Path Parameters

ParameterTypeDescription
idstringThe event ID

Body Parameters

ParameterTypeRequiredDescription
descriptionstringNoUpdated description. Max 2000 characters.
schemaobjectNoReplacement field schema. See Create Event.
name is immutable

The event name cannot be changed after creation — it is not accepted by this endpoint. To rename an event, create a new definition and migrate any automations that reference the old one.

Schema is replaced, not merged

Providing schema replaces the entire field list. To add a field, send the full updated fields array.


Response

Returns the updated event. See Create Event for the field reference.

{
"id": "01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6a",
"name": "order.completed",
"description": "Updated description.",
"schema": {
"fields": [
{ "name": "order_id", "type": "string", "required": true },
{ "name": "total", "type": "number", "required": true }
]
},
"created_at": "2026-06-01T12:00:00.000Z",
"updated_at": "2026-06-02T09:30:00.000Z"
}

Examples

curl -X PATCH "https://api.arsel.sa/v1/events/01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6a" \
-H "Authorization: Bearer be_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"description": "Updated description.",
"schema": {
"fields": [
{ "name": "order_id", "type": "string", "required": true },
{ "name": "total", "type": "number", "required": true }
]
}
}'

Error Responses

{
"status_code": 404,
"name": "not_found",
"message": "Event 01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6a not found"
}