---
title: "Create a workflow trigger"
method: POST
path: "/v4/workflows/{workflowId}/triggers"
tags: ["Workflow Triggers"]
---

# Create a workflow trigger

`POST /v4/workflows/{workflowId}/triggers`

## Request

- Base URL: `https://api.kadoa.com`
- URL: `https://api.kadoa.com/v4/workflows/{workflowId}/triggers`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer

Create a trigger that fires when the source workflow emits an event.
The target must share the source ownership scope (same team for team
workflows, or the same user for personal workflows) and must not be a
realtime workflow. Superadmins are subject to the same scope check on
the public endpoint.

## Path parameters

- `workflowId` string, required

## Headers

- `x-api-key` string
- `Authorization` string

## Request body

- object
  - `targetWorkflowId` string, required: ID of the workflow to trigger
  - `eventType` 'workflow_started' | 'workflow_finished' | 'workflow_export_completed' | 'workflow_failed' | 'workflow_recovered' | 'workflow_sample_finished' | 'workflow_data_change' | 'workflow_data_quality_change' | 'workflow_health_degraded', required: Event type that triggers the target workflow
  - `enabled` boolean: Whether the trigger is enabled

## Response `201`

Trigger created successfully

## Other responses

- `400`: Invalid input, target is a realtime workflow, or the workflow would trigger itself
- `401`: Unauthorized
- `403`: No access to target workflow, or target is outside the source ownership scope
- `404`: Workflow not found
- `409`: Duplicate trigger, or source/target ownership is moving teams
- `422`: Source workflow already has the maximum number of triggers (5)
- `500`: Internal server error

---

[API](https://skmtc.dev/kadoa/apis/kadoa-api.md) · [All operations](https://skmtc.dev/kadoa/apis/kadoa-api/llms.txt) · [OpenAPI document](https://skmtc.dev/kadoa/apis/kadoa-api/revisions/bf7803c927b4?raw)
