Skip to content

Trigger a workflow run

POST
/v1/workflows/{key}/trigger
curl --request POST \
--url https://your-notavia-host/v1/workflows/example/trigger \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "trigger_data": { "invoice_id": "inv_42", "amount_cents": 9900, "user": { "external_user_id": "usr_1", "email": "alice@example.com", "phone": "+15005550006", "name": "Alice" } } }'

Creates a new WorkflowRun and enqueues the first step for execution. Idempotent when an Idempotency-Key header is supplied — re-sending the same key within 24 hours returns the original run without re-triggering.

key
required
string
/^[a-z][a-z0-9_]{0,99}$/

Workflow key — lowercase alphanumeric + underscore, max 100 chars.

Idempotency-Key
string

Client-generated key (UUID recommended). Repeat requests with the same key within 24 hours return the original response without re-sending.

Media type application/json
object
trigger_data
required

Arbitrary JSON object passed as the run’s trigger payload.

object
key
additional properties
any
Example
{
"trigger_data": {
"invoice_id": "inv_42",
"amount_cents": 9900,
"user": {
"external_user_id": "usr_1",
"email": "alice@example.com",
"phone": "+15005550006",
"name": "Alice"
}
}
}

Idempotent replay — existing run returned.

Media type application/json
object
run_id
required
string format: uuid
status
required
string
Allowed values: pending running waiting completed failed cancelling cancelled
Example
{
"status": "pending"
}

Run created and first step enqueued.

Media type application/json
object
run_id
required
string format: uuid
status
required
string
Allowed values: pending running waiting completed failed cancelling cancelled
Example
{
"status": "pending"
}

Validation or request error.

Media type application/json
object
error
required
object
type
required
string
code
required
string
message
required
string
param
string
nullable
Example generated
{
"error": {
"type": "example",
"code": "example",
"message": "example",
"param": "example"
}
}

Missing or invalid credentials.

Media type application/json
object
error
required
object
type
required
string
code
required
string
message
required
string
param
string
nullable
Example generated
{
"error": {
"type": "example",
"code": "example",
"message": "example",
"param": "example"
}
}

Credentials do not have the required scope.

Media type application/json
object
error
required
object
type
required
string
code
required
string
message
required
string
param
string
nullable
Example generated
{
"error": {
"type": "example",
"code": "example",
"message": "example",
"param": "example"
}
}

Resource not found.

Media type application/json
object
error
required
object
type
required
string
code
required
string
message
required
string
param
string
nullable
Example generated
{
"error": {
"type": "example",
"code": "example",
"message": "example",
"param": "example"
}
}

Trigger data failed trigger_data_schema validation.

Media type application/json
object
error
required
object
type
required
string
code
required
string
message
required
string
param
string
nullable
Example generated
{
"error": {
"type": "example",
"code": "example",
"message": "example",
"param": "example"
}
}