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

# Update a flow trigger

> Updates a flow trigger's active status



## OpenAPI

````yaml api/legacy/openapi-agents.yaml patch /triggers/{id}
openapi: 3.0.3
info:
  title: Kapso External API - Agents & Flows API
  description: >-
    API for programmatically interacting with Kapso agents, executions, and
    WhatsApp conversations. This specification includes only Agents & Flows API
    endpoints.
  version: 1.0.0
  contact:
    name: Kapso Support
servers:
  - url: https://app.kapso.ai/api/v1
    description: Production server
security:
  - ApiKeyAuth: []
paths:
  /triggers/{id}:
    patch:
      tags:
        - Flow Triggers
      summary: Update a flow trigger
      description: Updates a flow trigger's active status
      operationId: updateFlowTrigger
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - trigger
              properties:
                trigger:
                  type: object
                  properties:
                    active:
                      type: boolean
                      description: Whether the trigger should be active
                      example: false
      responses:
        '200':
          description: Flow trigger updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/FlowTrigger'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Trigger not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    FlowTrigger:
      type: object
      properties:
        id:
          type: string
          format: uuid
          example: trigger-123abc
        flow_id:
          type: string
          format: uuid
          example: flow-456def
        trigger_type:
          type: string
          enum:
            - inbound_message
            - api_call
          example: inbound_message
          description: Type of trigger (inbound_message or api_call)
        active:
          type: boolean
          example: true
          description: Whether the trigger is active
        display_name:
          type: string
          example: Customer Support Trigger
          description: Display name for the trigger
        triggerable:
          type: object
          description: Details specific to the trigger type
          oneOf:
            - type: object
              description: InboundMessageTrigger details
              properties:
                id:
                  type: string
                  format: uuid
                  example: inbound-trigger-123
                whatsapp_config_id:
                  type: string
                  format: uuid
                  example: config-789ghi
            - type: object
              description: ApiCallTrigger details
              properties:
                id:
                  type: string
                  format: uuid
                  example: api-trigger-456
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Error:
      type: object
      properties:
        error:
          type: string
          example: Resource not found
        status:
          type: integer
          example: 404
        message:
          type: string
          example: The requested resource could not be found
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key required for all endpoints

````