---
title: "Replace workflow triggers"
method: PUT
path: "/workflows/{workflow_id}/triggers"
tags: ["Workflow Triggers"]
---

# Replace workflow triggers

`PUT /workflows/{workflow_id}/triggers`

Atomically replace the full set of triggers for a workflow. All existing triggers are deleted and the supplied set is created in a single transaction — if any trigger in the request is invalid, no changes are applied.

Use this when syncing trigger configuration from an external source of truth. For per-trigger CRUD, use POST/PATCH/DELETE instead.

## Request body

- WorkflowTriggerBulkReplaceRequest — Atomic bulk-replace request body. Use with `PUT /workflows/{workflow_id}/triggers` to declaratively sync trigger configuration.
  - `triggers` object[], required — Complete desired set of triggers. Existing triggers not in this list are deleted. An empty array removes all triggers.
    - `trigger_type` 'inbound_message' | 'api_call' | 'whatsapp_event' | 'project_event', required
    - `active` boolean
    - `phone_number_id` string — Required for `inbound_message`. Optional scope for `whatsapp_event`. Not used for `api_call`.
    - `event` 'whatsapp.message.received' | 'whatsapp.message.sent' | 'whatsapp.message.failed' | 'whatsapp.conversation.created' | 'whatsapp.conversation.ended' — Required for `whatsapp_event` triggers.
    - `event_name` string — Required for `project_event` triggers.
    - `property_key` string — Optional Project Event property key to filter on.
    - `operator` 'eq' | 'lt' | 'lte' | 'gt' | 'gte' — Optional Project Event property comparison operator.
    - `property_value` unknown

## Response `200`

Triggers replaced successfully

- WorkflowTriggerListResponse — List of workflow triggers
  - `data` WorkflowTrigger[], required
    - `id` string, uuid, required — Unique trigger identifier
    - `workflow_id` string, uuid, required — ID of the workflow this trigger belongs to
    - `trigger_type` 'inbound_message' | 'api_call' | 'whatsapp_event' | 'project_event', required — 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) - `project_event`: Triggered by an emitted Project Event
    - `active` boolean, required — 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` string, nullable — Human-readable trigger name. Format varies by type: - Inbound message: "WhatsApp: [phone number display name]" - API call: "API Call Trigger" - Project event: "Event: [event name]"
    - `created_at` string, date-time — Trigger creation timestamp
    - `updated_at` string, date-time — Last modification timestamp
    - `triggerable` union — 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 - For `project_event`: Contains event_name and optional property filter fields
      - object — Inbound message trigger configuration
        - `phone_number_id` string, required — WhatsApp Business phone number ID that will trigger the workflow
      - object — API call trigger configuration (no additional fields)
      - object — WhatsApp event trigger configuration
        - `event` 'whatsapp.message.received' | 'whatsapp.message.sent' | 'whatsapp.message.failed' | 'whatsapp.conversation.created' | 'whatsapp.conversation.ended', required — WhatsApp event type that will trigger the workflow
        - `phone_number_id` string — Optional WhatsApp Business phone number ID to scope trigger to specific number
      - object — Project Event trigger configuration
        - `event_name` string, required — Lowercase dotted snake_case Project Event name that starts the workflow.
        - `property_key` string, nullable — Optional Project Event property key to filter on.
        - `operator` 'eq' | 'lt' | 'lte' | 'gt' | 'gte' | 'null', nullable — Optional property comparison operator.
        - `property_value` unknown

## Other responses

- `401` — Missing or invalid API key
- `404` — Resource not found
- `422` — Request validation failed

---

[API](https://skmtc.net/kapso/apis/kapso-platform-api.md) · [All operations](https://skmtc.net/kapso/apis/kapso-platform-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/kapso/kapso-platform-api/revisions/18ff5548a33f/schema)
