`POST /api/workflows/{id}/triggers` — add a trigger. An unknown kind -> 400.
POST
/api/workflows/{id}/triggers
const url = 'https://example.com/api/workflows/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/triggers';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"config":"example","kind":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/workflows/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/triggers \ --header 'Content-Type: application/json' \ --data '{ "config": "example", "kind": "example" }'Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string format: uuid
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
POST /api/workflows/{id}/triggers body — add a trigger to a workflow.
object
config
Optional kind-specific config; defaults to {}.
kind
required
One of manual / schedule / git / webhook / telegram /
email / imap / email_plus_address.
string
Examplegenerated
{ "config": "example", "kind": "example"}Responses
Section titled “Responses”Media typeapplication/json
A trigger as returned to the client. Plaintext token is returned only on
create/rotate so receiver URLs are show-once. List/update responses return
a non-secret token_preview instead.
object
config
required
created_at
required
string format: date-time
enabled
required
boolean
id
required
string format: uuid
kind
required
Spec-only mirror of the closed workflow_triggers.kind set (TriggerKind::as_db_str).
TriggerResponse.kind narrows to this via #[schema(value_type = WorkflowTriggerKindSpec)].
string
token
string | null
token_preview
string | null
workflow_id
required
string format: uuid
Example
{ "kind": "manual"}