> ## 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 workflow trigger

> Update a workflow trigger. Currently only the 'active' status can be modified.

Use this to:
- Temporarily disable a trigger without deleting it (set active=false)
- Re-enable a previously disabled trigger (set active=true)

Note: To change trigger type or phone_number_id, delete the trigger and create a new one.




## OpenAPI

````yaml /api/platform/v1/openapi-workflows.yaml patch /triggers/{trigger_id}
openapi: 3.1.0
info:
  title: Kapso Platform API – Advanced Resources
  version: 0.1.0
  description: >
    Build WhatsApp automation workflows and serverless functions. Create
    multi-step conversation flows, inspect executions, and deploy custom logic.
servers:
  - url: https://api.kapso.ai/platform/v1
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Workflows
    description: Create and manage conversation workflows and executions
  - name: Workflow Triggers
    description: Configure workflow triggers to automate execution
  - name: Functions
    description: Manage serverless functions, deployments, and secrets
  - name: WhatsApp Conversations
    description: Query WhatsApp conversation data and related resources
paths:
  /triggers/{trigger_id}:
    parameters:
      - name: trigger_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
        description: Trigger identifier
    patch:
      tags:
        - Workflow Triggers
      summary: Update workflow trigger
      description: >
        Update a workflow trigger. Currently only the 'active' status can be
        modified.


        Use this to:

        - Temporarily disable a trigger without deleting it (set active=false)

        - Re-enable a previously disabled trigger (set active=true)


        Note: To change trigger type or phone_number_id, delete the trigger and
        create a new one.
      operationId: updateWorkflowTrigger
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkflowTriggerUpdateRequest'
      responses:
        '200':
          description: Trigger updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowTriggerResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '422':
          $ref: '#/components/responses/ValidationError'
components:
  schemas:
    WorkflowTriggerUpdateRequest:
      type: object
      required:
        - trigger
      properties:
        trigger:
          type: object
          properties:
            active:
              type: boolean
              description: Enable or disable the trigger
      description: >
        Request to update a workflow trigger. Currently only the 'active' status
        can be modified. To change trigger type or phone number, delete and
        recreate the trigger.
    WorkflowTriggerResponse:
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/WorkflowTrigger'
      description: Single workflow trigger response
    WorkflowTrigger:
      type: object
      required:
        - id
        - workflow_id
        - trigger_type
        - active
      properties:
        id:
          type: string
          format: uuid
          description: Unique trigger identifier
        workflow_id:
          type: string
          format: uuid
          description: ID of the workflow this trigger belongs to
        trigger_type:
          type: string
          enum:
            - inbound_message
            - api_call
            - whatsapp_event
          description: >
            Trigger activation mechanism:

            - `inbound_message`: Triggered by incoming WhatsApp messages to a
            specific phone number

            - `api_call`: Triggered by POST /workflows/{id}/executions API calls

            - `whatsapp_event`: Triggered by WhatsApp events (message and
            conversation lifecycle)
        active:
          type: boolean
          description: >
            Whether this trigger is enabled. Inactive triggers will not start
            workflow executions even when their conditions are met. Use this to
            temporarily disable a trigger without deleting it.
        display_name:
          type:
            - string
            - 'null'
          description: |
            Human-readable trigger name. Format varies by type:
            - Inbound message: "WhatsApp: [phone number display name]"
            - API call: "API Call Trigger"
        created_at:
          type: string
          format: date-time
          description: Trigger creation timestamp
        updated_at:
          type: string
          format: date-time
          description: Last modification timestamp
        triggerable:
          type: object
          description: >
            Type-specific trigger configuration. Structure varies by
            trigger_type:

            - For `inbound_message`: Contains phone_number_id

            - For `api_call`: Empty object

            - For `whatsapp_event`: Contains event and optional phone_number_id
          oneOf:
            - type: object
              description: Inbound message trigger configuration
              required:
                - phone_number_id
              properties:
                phone_number_id:
                  type: string
                  description: >-
                    WhatsApp Business phone number ID that will trigger the
                    workflow
            - type: object
              description: API call trigger configuration (no additional fields)
              additionalProperties: false
            - type: object
              description: WhatsApp event trigger configuration
              required:
                - event
              properties:
                event:
                  type: string
                  enum:
                    - whatsapp.message.received
                    - whatsapp.message.sent
                    - whatsapp.message.failed
                    - whatsapp.conversation.created
                    - whatsapp.conversation.ended
                  description: WhatsApp event type that will trigger the workflow
                phone_number_id:
                  type: string
                  description: >-
                    Optional WhatsApp Business phone number ID to scope trigger
                    to specific number
      description: Workflow trigger defining when and how a workflow execution should start
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Human-readable error message
  responses:
    UnauthorizedError:
      description: Missing or invalid API key
      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

````