PATCH
/
v1
/
{workspace}
/
workflow
/
{slug}
/
enable
/
Enable/Disable Workflow
curl --request PATCH \
  --url https://api.suprsend.com/v1/{workspace}/workflow/{slug}/enable/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "is_enabled": true
}'
{
  "$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>"
    ]
  }
}

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.

Body

application/json

Response

202
application/json

Workflow status updated successfully

The response is of type object.