Workflows

Create a workflow

Creates a workflow with its single trigger step. trigger_type defaults to EVENT, which requires event_name; SCHEDULE takes interval_ms and MANUAL is started only by POST /api/v1/workflows/{id}/executions.

Pass sequence to create the steps at the same time, as a LINEAR chain behind the trigger. Anything with a branch is PUT /api/v1/workflows/{id}/graph. Without a sequence the workflow holds only its trigger and stays inert until it has steps to run, which is why it is created disabled.

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

post/api/v1/workflows

Request

  • Base URL: https://api.sendly.now
  • URL: https://api.sendly.now/api/v1/workflows
  • Auth: one of:
    • HTTP bearer
    • API key in cookie better-auth.session_token
    • OAuth 2 (authorization code, authorization URL https://app.sendly.now/api/auth/oauth2/authorize, token URL https://app.sendly.now/api/auth/oauth2/token, scopes: workflows:write)

Request body

allow_reentryboolean
descriptionstring
enabledboolean

Workflows are created disabled. A workflow can only be enabled once every step is configured.

event_namestring

The custom event that starts this workflow, e.g. user.signup. Required for EVENT workflows (the default) and ignored for the other trigger types.

interval_msinteger

For SCHEDULE workflows: how often the workflow fires, in milliseconds. Between one minute and 30 days; defaults to one hour.

namestring required
trigger_type'EVENT' | 'MANUAL' | 'SCHEDULE'

What starts this workflow. Defaults to EVENT, which is the only kind the API created before this field existed. EVENT requires event_name; SCHEDULE uses interval_ms; MANUAL is started only by POST /api/v1/workflows/{id}/executions.

Response

Workflow created

allow_reentryboolean required
created_atstring date-time required
descriptionstring nullable required
enabledboolean required
event_namestring nullable required

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

idstring uuid required
max_executions_per_hourinteger nullable required
namestring required
step_countinteger required

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.

trigger_type'EVENT' | 'MANUAL' | 'SCHEDULE' required
updated_atstring date-time required
versioninteger required

Incremented on every structural (step/transition) change.

Changes

No recorded changes to this operation across all 1 revision of this API.