Skip to main content
POST
/
workflows
/
{workflow_id}
/
triggers
Create workflow trigger
curl --request POST \
  --url https://api.kapso.ai/platform/v1/workflows/{workflow_id}/triggers \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '{
  "trigger": {
    "trigger_type": "inbound_message",
    "active": true,
    "phone_number_id": "123456789012345"
  }
}'
{
  "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

Request to create a new workflow trigger

trigger
object
required

Response

Trigger created successfully

Single workflow trigger response

data
object
required

Workflow trigger defining when and how a workflow execution should start