> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kapso.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 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.




## OpenAPI

````yaml /api/platform/v1/openapi-platform.yaml patch /event-definitions/{id}
openapi: 3.1.0
info:
  title: Kapso Platform API
  version: 0.2.0
  description: >
    Build WhatsApp messaging into your product. Manage customers, connect phone
    numbers, send broadcasts, and handle conversations.
servers:
  - url: https://api.kapso.ai/platform/v1
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Customers
    description: Manage customer accounts
  - name: Setup Links
    description: WhatsApp onboarding via embedded signup
  - name: Phone Numbers
    description: Connect and manage WhatsApp numbers
  - name: Webhooks
    description: Subscribe to WhatsApp events
  - name: Display Names
    description: Update WhatsApp business display names
  - name: Broadcasts
    description: |
      Send template messages at scale

      **Alpha**: This API is in alpha and subject to change
  - name: Conversations
    description: Manage conversation state
  - name: Media
    description: Upload media files for WhatsApp messaging
  - name: Users
    description: Manage project team members
  - name: Inbox Embeds
    description: Create and manage embeddable inbox access links
  - name: Webhook Deliveries
    description: View webhook delivery attempts and their status
  - name: External API Logs
    description: View logs of external API calls made by the project
  - name: Log Search
    description: Search log events across API, Meta, workflow, and webhook sources
  - name: Events
    description: Emit and query project-scoped events
  - name: Provider Models
    description: List available AI provider models
  - name: WhatsApp Flows
    description: Build interactive WhatsApp Flows for surveys and forms
  - name: Contacts
    description: Manage WhatsApp contacts
paths:
  /event-definitions/{id}:
    patch:
      tags:
        - Events
      summary: Update a project event definition
      description: |
        Updates editable metadata for an event definition. Event names cannot be
        changed after events have been recorded for the definition.
      operationId: updateProjectEventDefinition
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProjectEventDefinitionUpdateRequest'
            examples:
              update_schema:
                summary: Update event schema
                value:
                  description: Customer satisfaction score for a conversation
                  property_schema:
                    score:
                      type: number
                    resolved:
                      type: boolean
      responses:
        '200':
          description: Definition updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectEventDefinitionResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '402':
          $ref: '#/components/responses/PaymentRequiredError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '422':
          $ref: '#/components/responses/ValidationError'
components:
  schemas:
    ProjectEventDefinitionUpdateRequest:
      type: object
      properties:
        name:
          type: string
          description: >-
            Event name. Lowercase dotted snake_case is recommended for
            consistency. Cannot be changed after events have been recorded.
          example: conversation.csat_scored
        description:
          type:
            - string
            - 'null'
          description: Human-readable description of what this event means
        property_schema:
          type: object
          additionalProperties:
            type: object
            required:
              - type
            properties:
              type:
                type: string
                enum:
                  - string
                  - number
                  - boolean
    ProjectEventDefinitionResponse:
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/ProjectEventDefinition'
    ProjectEventDefinition:
      type: object
      required:
        - id
        - name
        - property_schema
        - created_at
        - updated_at
      properties:
        id:
          type: string
          format: uuid
          description: Unique event definition ID
        name:
          type: string
          description: >-
            Event name. Lowercase dotted snake_case is recommended for
            consistency.
          example: conversation.csat_scored
        description:
          type:
            - string
            - 'null'
          description: Human-readable description of what this event means
        property_schema:
          type: object
          additionalProperties:
            type: object
            required:
              - type
            properties:
              type:
                type: string
                enum:
                  - string
                  - number
                  - boolean
          description: >-
            Declared properties for this event. Values are keyed by property
            name.
          example:
            score:
              type: number
            reason:
              type: string
        last_seen_at:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            Timestamp of the latest emitted event with this definition, when
            available.
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
  responses:
    UnauthorizedError:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    PaymentRequiredError:
      description: Feature requires a paid plan
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFoundError:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    ValidationError:
      description: Request validation failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````