v1

latestOpenAPI 3.1.02026-07-22115189303.8 KB
Events

Create or update a project event definition

Creates a definition for an event type. If a definition with the same name already exists, Kapso updates its editable metadata and returns it. If the existing definition is archived, this request restores it. Use /events when you want to emit an actual event occurrence.

post/event-definitions

Request body

namestring required

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.

descriptionstring nullable

Human-readable description of what this event means

property_schemaobject

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

Example request

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

Response

Existing definition updated

Example response

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