Skip to Content
SendlySendly
API ReferenceWorkflows

Clone a workflow

POST
/api/v1/workflows/{id}/clone

Copies a workflow and its whole graph as a new workflow. The copy is always created disabled, whatever the original was: a clone exists to be reviewed, and one that started live would match the same trigger events as its original from the moment it appeared.

Server-side rather than a read-then-write, so the copy is taken from one consistent read of the source.

Requires the workflows:write scope — Create, edit, enable, and delete your automation workflows.

headerAuthorizationBearer <API Key>

API key authentication. Use a sk_* (FULL) or pk_* (SENDING_ONLY) key as the bearer token. Public keys (pk_*) are restricted to the email-send endpoints and the self-serve list subscribe/unsubscribe pair; every other endpoint — event tracking included — answers 403 for them. In scope terms (used by /api/v1/* operations): FULL keys hold every scope; SENDING_ONLY keys hold only emails:send.

id*string

Workflow id.

Formatuuid
application/json
  1. body

Body for POST /api/v1/workflows/{id}/clone.

name?string

Name for the copy. Defaults to Copy of <original name>.

Length1 <= length <= 200

Response Body

The cloned workflow

application/json
  1. response

An automation workflow as exposed on the v1 API.

id*string
Formatuuid
name*string
description*string|null
enabled*boolean
trigger_type*string
Value in"EVENT""MANUAL""SCHEDULE"
event_name*|

Trigger event for EVENT workflows; null for the other trigger types.

allow_reentry*boolean
max_executions_per_hour*integer|null
version*integer

Incremented on every structural (step/transition) change.

step_count*integer

Steps in this workflow's graph, trigger step included — so a workflow that has only ever been created reports 1. Read /graph for the steps themselves.

created_at*string
Formatdate-time
updated_at*string
Formatdate-time
Example Request
curl -X POST 'https://api.sendly.now/api/v1/workflows/497f6eca-6276-4993-bfeb-53cbbbba6f08/clone' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "name": "string",  "description": "string",  "enabled": true,  "trigger_type": "EVENT",  "event_name": "string",  "allow_reentry": true,  "max_executions_per_hour": 0,  "version": 0,  "step_count": 0,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}