Skip to main content
POST
/
v1
/
outreach-workflows
/
{outreach_workflow_id}
/
stages
Create An Outreach Workflow Stage
curl --request POST \
  --url http://api.stuut.ai/v1/outreach-workflows/{outreach_workflow_id}/stages \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "event": "invoice.due_date",
  "name": "<string>",
  "time_trigger": "after",
  "action": "email",
  "auto_send": true,
  "cc": [
    "[email protected]"
  ],
  "cc_secondary_contacts": false,
  "email_template": "<string>",
  "external_roles_to_cc": [
    "billing_contact"
  ],
  "internal_roles_to_cc": [
    "account_manager"
  ],
  "is_always_run_enabled": true,
  "num_days": 123,
  "outreach_window_start": "<string>",
  "outreach_window_end": "<string>",
  "recurrence_interval_days": 123,
  "recurrence_end_offset_days": 123
}
'
{
  "action": "email",
  "event": "<string>",
  "name": "<string>",
  "object": "<string>",
  "time_trigger": "<string>",
  "workflow_id": "<string>",
  "id": "<string>",
  "auto_send": true,
  "cc": [
    "<string>"
  ],
  "cc_secondary_contacts": true,
  "created_at": "2023-11-07T05:31:56Z",
  "email_template": {
    "object": "<string>",
    "id": "<string>",
    "auto_correct": true,
    "body": "<string>",
    "cc": [
      "<string>"
    ],
    "created_at": "2023-11-07T05:31:56Z",
    "folder_id": "<string>",
    "is_default": true,
    "modified_at": "2023-11-07T05:31:56Z",
    "name": "<string>",
    "subject": "<string>"
  },
  "external_roles_to_cc": [
    "<string>"
  ],
  "fallback_email_template": {
    "object": "<string>",
    "id": "<string>",
    "auto_correct": true,
    "body": "<string>",
    "cc": [
      "<string>"
    ],
    "created_at": "2023-11-07T05:31:56Z",
    "folder_id": "<string>",
    "is_default": true,
    "modified_at": "2023-11-07T05:31:56Z",
    "name": "<string>",
    "subject": "<string>"
  },
  "internal_roles_to_cc": [
    "<string>"
  ],
  "is_always_run_enabled": true,
  "modified_at": "2023-11-07T05:31:56Z",
  "num_days": 123,
  "outreach_window_end": "<string>",
  "outreach_window_start": "<string>",
  "recurrence_end_offset_days": 123,
  "recurrence_interval_days": 123
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

outreach_workflow_id
string
required

Body

application/json
event
enum<string>
required
Available options:
invoice.due_date,
invoice.issued_at,
payment.applied
name
string
required
time_trigger
enum<string>
required
Available options:
after,
before,
on
action
enum<string>
Available options:
email,
call
auto_send
boolean
cc
string<email>[]
cc_secondary_contacts
boolean
default:false
email_template
string | null

The EmailTemplate identifier, (e.g. eml_tmpl_abc123).

external_roles_to_cc
enum<string>[]
Available options:
billing_contact,
executive,
economic_user
internal_roles_to_cc
enum<string>[]
Available options:
account_manager,
account_executive,
csm
is_always_run_enabled
boolean
num_days
integer
outreach_window_start
string | null
outreach_window_end
string | null
recurrence_interval_days
integer | null
recurrence_end_offset_days
integer | null

Response

Successful response

action
enum<string>
required
Available options:
email,
call
Maximum string length: 5
event
string
required
name
string
required

The name of the stage.

object
string
required
time_trigger
string
required
workflow_id
string
required
Maximum string length: 32
id
string
Maximum string length: 32
auto_send
boolean

Whether to automatically send emails created by this stage. When false, the emails will be created and left in a draft state for you to send. Defaults to true.

cc
string[]

List of email addresses to CC on the emails created by this stage.

cc_secondary_contacts
boolean

Whether to CC all external contacts on the emails created by this stage.

created_at
string<date-time>
email_template
object
external_roles_to_cc
string[]

List of external roles to CC on the emails created by this stage.

fallback_email_template
object
internal_roles_to_cc
string[]

List of internal roles to CC on the emails created by this stage.

is_always_run_enabled
boolean

Whether to ignore the workflow's active days.

modified_at
string<date-time> | null
num_days
integer | null
outreach_window_end
string | null

Override end time for outreach window (optional stage-level override)

outreach_window_start
string | null

Override start time for outreach window (optional stage-level override)

recurrence_end_offset_days
integer | null

If set, stops recurring after N days past the event date; null where time_trigger = 'before' = until event date, null where time_trigger = 'after' = forever.

recurrence_interval_days
integer | null

If set (>0), after the initial trigger this stage will re-fire every X days. Null = no recurrence.