PATCH
/
v1
/
{workspace}
/
workflow
/
{slug}
/
commit
/
Commit Workflow
curl --request PATCH \
  --url https://api.suprsend.com/v1/{workspace}/workflow/{slug}/commit/ \
  --header 'Authorization: Bearer <token>'
{
  "$schema": "https://schema.suprsend.com/workflow/v1/schema.json",
  "slug": "welcome-sequence",
  "is_enabled": true,
  "created_at": "2023-11-07T05:31:56Z",
  "last_executed_at": "2023-11-07T05:31:56Z",
  "name": "Welcome Sequence",
  "description": "<string>",
  "updated_at": "2023-11-07T05:31:56Z",
  "commit_message": "<string>",
  "hash": "<string>",
  "status": "active",
  "category": "transactional",
  "tags": [
    "<string>"
  ],
  "ratelimit": {},
  "conditions": [
    {}
  ],
  "trigger_type": "event",
  "trigger_events": [
    "<string>"
  ],
  "override_recipients_type": "user",
  "override_recipients_user_expr": "<string>",
  "override_recipients_single_object_fields_expr": "<string>",
  "override_actor_user_expr": "<string>",
  "override_tenant_expr": "<string>",
  "active_at": "2023-11-07T05:31:56Z",
  "updated_by": {
    "name": "<string>",
    "email": "<string>"
  },
  "tree": {},
  "validation_result": {
    "is_valid": true,
    "errors": [
      "<string>"
    ]
  }
}
Any changes made to a workflow are saved as a draft. To make these changes active, you must commit the workflow. The live version is the one that gets executed when triggered.

Authorizations

Authorization
string
header
required

Pass as ServiceToken <Service_Token>. Get Service Token from SuprSend dashboard -> Account Settings -> Service Tokens section.

Path Parameters

workspace
string
required

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

slug
string
required

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

Query Parameters

commit_message
string

Commit message describing the changes

Response

202
application/json

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

The response is of type object.