v2

latestOpenAPI 3.1.12026-07-2613060964.2 KB

Commit Workflow

Commit a workflow to make the draft version live.

patch/v1/{workspace}/workflow/{slug}/commit/

Path parameters

workspacestring required

Workspace to which the workflow belongs (staging, production, etc.)

slugstring required

Unique identifier of the workflow. You can get it from workflow settings.

Query parameters

commit_messagestring

Commit message describing the changes

Response

Workflow committed successfully. The response will be the latest draft version after the commit.

$schemastring uri

Schema URL for workflow validation

slugstring

Unique identifier for the workflow

is_enabledboolean

Whether the workflow is enabled

created_atstring date-time

When the workflow was created

last_executed_atstring date-time nullable

When the workflow was last executed

namestring

Human-readable name of the workflow

descriptionstring nullable

Description explaining the usecase of the workflow

updated_atstring date-time

When the workflow was last updated

commit_messagestring nullable

Last commit message

hashstring nullable

Git-like hash for version tracking

status'active' | 'inactive' | 'draft'

Current status of the workflow

categorystring

Notification category of the workflow. Used to apply category-specific settings and preferences.

tagsstring[]

Tags for organizing and filtering workflows in API.

ratelimitobject nullable

Workflow throttle settings. This is used to limit the number of times a workflow can be executed per user in a given time period.

conditionsobject[]

Trigger Conditions for workflow execution. Workflow will only be executed if trigger conditions evaluate to true.

trigger_type'event' | 'dynamic' | 'api'

How the workflow is triggered. You can refer to all trigger types here.

trigger_eventsstring[]

Events that trigger this workflow. This will be set for trigger_type = event.

override_recipients_type'user' | 'single_object_fields' nullable

Type of recipient override. Define whether to override and run this workflow for user, list of users or a single object.

override_recipients_user_exprstring nullable

Expression for overriding recipients when override_recipients_type = user.

override_recipients_single_object_fields_exprstring nullable

Expression for overriding recipients when override_recipients_type = single_object_fields.

override_actor_user_exprstring nullable

Expression for overriding actor

override_tenant_exprstring nullable

Expression for overriding tenant

active_atstring date-time

When the workflow's live version became active. Will be null for draft version.

treeobject

Node tree structure of the workflow. Shows the list of all nodes used in the workflow along with their configuration.

Example response

{
  "$schema": "https://schema.suprsend.com/workflow/v1/schema.json",
  "slug": "welcome-sequence",
  "is_enabled": true,
  "name": "Welcome Sequence",
  "category": "transactional"
}