Create an automation from an export
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.
bearerAuthAuthorizationBearer <token>An API key from Workspace → API Keys, starting with snl_.
application/json- body
workflow*name?stringlength <= 255emails?emailRef to trigger id; null leaves the step empty.
Draft created.
application/json- response
success*booleandata*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" } ] }}'{ "success": true, "data": { "id": 0, "status": "DRAFT" }}Cancel a contact's automation runs POST
Ends the contact's runs in progress (`CANCELLED`), in every automation of the workspace or in one (`workflowId`). Their remaining steps do not run. Use it when something in your app makes a flow pointless: the invoice was paid, the user deleted their account. The contact can enter the automation again on its next event.
Export an automation GET
The automation's saved draft and settings, with trigger names instead of ids and without header values.