Skip to main content
POST
Create or update workflow

Authorizations

Authorization
string
header
required

All requests to the Cortex API need to provide an Authorization: Bearer <token> header, where <token> is an API key created in the Settings page of your workspace.

Body

actions
object[]
required

List of actions in the workflow. Actions read run data with three top-level keys: context (workflowRunId, initiatedBy, and entity for a run on an entity), actions (earlier actions by slug) and variables (workflow variables by slug). Every action writes its result to actions.<slug>.outputs. The keys depend on the action type, e.g. result for JQ and JavaScript, or status, headers and body for HTTP. JQ reads .variables.x, CEL, JavaScript and dot paths read variables.x, and action text fields take {{variables.x}} templates. Quote a slug with a hyphen: actions["my-slug"], with a leading dot in JQ.

filter
GLOBAL · object
required

Filter to determine in what entity contexts the workflow can run

isDraft
boolean
required

Whether the workflow is a draft

name
string
required

Name of the workflow

restrictActionCompletionToRunnerUser
boolean
required

If true, only the user who started the workflow can complete actions. Defaults to false.

tag
string
required

Tag of the workflow. Use lowercase letters, digits and hyphens, 2 to 255 characters, not starting or ending with a hyphen.

variables
object[]
required

List of variable definitions for the workflow. Set run values with initialContext.

createdAt
string

The date the workflow was created, in ISO 8601 format

createdBy
object
description
string

Description of the workflow

failedRunResponseTemplate
string

Template for the response when the workflow run fails

iconTag
string

Icon tag for the workflow

isRunnableViaApi
boolean

Whether the workflow is runnable via the public API

lastUpdatedAt
string

The date the workflow was last updated, in ISO 8601 format

lastUpdatedBy
object
runResponseTemplate
string

Template for the response when the workflow is completed successfully

runRestrictionPolicies
object[]

List of restriction policies for the workflow

Response

Workflow created successfully

actions
object[]
required

List of actions in the workflow. Actions read run data with three top-level keys: context (workflowRunId, initiatedBy, and entity for a run on an entity), actions (earlier actions by slug) and variables (workflow variables by slug). Every action writes its result to actions.<slug>.outputs. The keys depend on the action type, e.g. result for JQ and JavaScript, or status, headers and body for HTTP. JQ reads .variables.x, CEL, JavaScript and dot paths read variables.x, and action text fields take {{variables.x}} templates. Quote a slug with a hyphen: actions["my-slug"], with a leading dot in JQ.

filter
GLOBAL · object
required

Filter to determine in what entity contexts the workflow can run

isDraft
boolean
required

Whether the workflow is a draft

name
string
required

Name of the workflow

restrictActionCompletionToRunnerUser
boolean
required

If true, only the user who started the workflow can complete actions. Defaults to false.

tag
string
required

Tag of the workflow. Use lowercase letters, digits and hyphens, 2 to 255 characters, not starting or ending with a hyphen.

variables
object[]
required

List of variable definitions for the workflow. Set run values with initialContext.

createdAt
string

The date the workflow was created, in ISO 8601 format

createdBy
object
description
string

Description of the workflow

failedRunResponseTemplate
string

Template for the response when the workflow run fails

iconTag
string

Icon tag for the workflow

isRunnableViaApi
boolean

Whether the workflow is runnable via the public API

lastUpdatedAt
string

The date the workflow was last updated, in ISO 8601 format

lastUpdatedBy
object
runResponseTemplate
string

Template for the response when the workflow is completed successfully

runRestrictionPolicies
object[]

List of restriction policies for the workflow

Last modified on September 24, 2026