Skip to content

Activate a draft version (or dry-run validate it)

POST
/v1/workflows/{key}/versions/{n}/activate
curl --request POST \
--url 'https://your-notavia-host/v1/workflows/example/versions/1/activate?dry_run=false' \
--header 'Authorization: Bearer <token>'

Runs the full semantic validator against the version body. If dry_run=true the result is returned without persisting the status change — useful for the dashboard “Validate” button. Without dry_run, a valid version is promoted to Active and the previous active version (if any) is deactivated.

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

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

n
required
integer
dry_run
boolean

If true, validate without changing persistent state.

Validation result (always returned; valid indicates whether activation succeeded).

Media type application/json
object
valid
required
boolean
errors
required
Array<object>
object
code
required

Machine-readable error code. Known codes: unknown_category, template_body_missing, delay_requires_duration_or_until, delay_duration_xor_until, invalid_duration, invalid_expression, goto_target_not_found, unreachable_step, synchronous_cycle, at_requires_timezone, unknown_timezone, event_required, invalid_max_items, duplicate_step_id, unknown_channel.

string
message
required

Human-readable description of the error.

string
pointer
required

JSON Pointer (RFC 6901) to the offending location in the body JSON.

string
Example generated
{
"valid": true,
"errors": [
{
"code": "example",
"message": "example",
"pointer": "example"
}
]
}

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"
}
}