Skip to Content
SendlySendly
API ReferenceWorkflows

Retrieve a workflow's step graph

GET
/api/v1/workflows/{id}/graph

Every step in the workflow, including its TRIGGER entry node, and every directed transition between them. version is the workflow's version at the time of the read — a different number on a later read means somebody edited the graph in between.

A step's config is returned exactly as stored, camelCase keys and all, rather than projected into the snake_case used everywhere else on this API. That is deliberate: the same document is authored by the visual editor, and renaming its keys on the way out would mean any key this API did not know about was silently dropped on the way back in.

The response of GET /api/v1/workflows/{id}/graph is accepted verbatim by PUT on the same path: read a graph, change a step, send it back. Step and transition ids are yours to choose on a write, which is what makes that round trip a no-op rather than a rebuild.

Requires the workflows:read scope — View your automation workflows and their runs.

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

Response Body

The workflow's graph

application/json
  1. response

A workflow's complete step graph. The response of GET /api/v1/workflows/{id}/graph is accepted verbatim by PUT on the same path.

workflow_id*string
Formatuuid
version*integer

The workflow's version AFTER this read. Every structural change bumps it and writes a workflow_versions snapshot, so a changed number between two reads means somebody edited the graph.

steps*array<>
transitions*array<>
Example Request
curl -X GET 'https://api.sendly.now/api/v1/workflows/497f6eca-6276-4993-bfeb-53cbbbba6f08/graph'
Example Response
{  "workflow_id": "03e70e31-d7a4-4401-a629-6a4b6096cdfe",  "version": 0,  "steps": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "name": "string",      "position": {        "x": 0,        "y": 0,        "property1": "string",        "property2": "string"      },      "template_id": "c6d67e98-83ea-49f0-8812-e4abae2b68bc",      "type": "TRIGGER",      "config": {        "property1": "string",        "property2": "string"      }    }  ],  "transitions": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "from_step_id": "e4c3aeab-3fd1-4e4e-9277-1338b28978a8",      "to_step_id": "b9ed3588-525d-4e92-bfb0-711a014dbce6",      "condition": "string",      "priority": 0    }  ]}