v1

latestOpenAPI 3.1.02026-07-22115189303.8 KB
Events

Update a project event definition

Updates editable metadata for an event definition. Event names cannot be changed after events have been recorded for the definition. Set archived to true to hide the definition from event tools and workflow selectors while retaining historical events; set it to false to restore it.

patch/event-definitions/{id}

Path parameters

idstring uuid required

Request body

namestring

Event name. Must be lowercase and may contain optional dot-separated segments. Each segment starts with a lowercase letter and may contain lowercase letters, numbers, and underscores. Maximum 128 characters. Cannot be changed after events have been recorded.

descriptionstring nullable

Human-readable description of what this event means

property_schemaobject

Declared properties for this event. Values are keyed by property name.

archivedboolean

Archive or restore the definition. Archived definitions retain historical events but are hidden from new tools and workflow selectors.

Example request

{
  "name": "conversation.csat_scored"
}

Response

Definition updated

Example response

{
  "data": {
    "name": "conversation.csat_scored",
    "property_schema": {
      "score": {
        "type": "number"
      },
      "reason": {
        "type": "string"
      }
    }
  }
}