Skip to main content
PUT
/
workflows
/
{workflow_id}
/
triggers
Replace workflow triggers
curl --request PUT \
  --url https://api.kapso.ai/platform/v1/workflows/{workflow_id}/triggers \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "triggers": [
    {
      "trigger_type": "inbound_message",
      "active": true,
      "phone_number_id": "<string>",
      "event": "whatsapp.message.received"
    }
  ]
}
'
{
  "data": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "workflow_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "trigger_type": "inbound_message",
      "active": true,
      "display_name": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "triggerable": {
        "phone_number_id": "<string>"
      }
    }
  ]
}

Authorizations

X-API-Key
string
header
required

Path Parameters

workflow_id
string<uuid>
required

Workflow identifier

Body

application/json

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.

Response

Triggers replaced successfully

List of workflow triggers

data
object[]
required