Senlo
API reference

Create an automation from an export

POST
/api/workflows

Creates a draft automation from the JSON GET /api/workflows/{id} returns (or the editor's Export). Each email step's emailRef is mapped to a trigger of the workspace: by emails, else by name; one that matches none is a 400. HTTP header values are not part of an export and are entered again before going live.

Authorization

bearerAuth
headerAuthorizationBearer <token>

An API key from Workspace → API Keys, starting with snl_.

Request Body

application/json
  1. body
workflow*
name?string
Lengthlength <= 255
emails?

emailRef to trigger id; null leaves the step empty.

Response Body

Draft created.

application/json
  1. response
success*boolean
data*
Example Request
curl -X POST 'https://senlo.io/api/workflows' \  -H 'Content-Type: application/json' \  -d '{  "workflow": {    "format": "senlo.workflow",    "version": 1,    "name": "string",    "settings": {},    "nodes": [      {        "id": "string",        "type": "string",        "data": {}      }    ],    "edges": [      {        "id": "string",        "source": "string",        "target": "string"      }    ]  }}'
Example Response
{  "success": true,  "data": {    "id": 0,    "status": "DRAFT"  }}