Automations
Define event-driven email sequences.
Current status
Create an automation
POST
/api/v1/automationsRequires automations:managecurl -X POST https://mail.example.com/api/v1/automations \
-H "Authorization: Bearer $MAILFORGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Onboarding sequence",
"triggerEvent": "user.signed_up",
"steps": [
{
"type": "send_email",
"config": {
"subject": "Welcome to Acme"
}
},
{
"type": "delay",
"config": {
"hours": 48
}
},
{
"type": "send_email",
"config": {
"subject": "Three things to try first"
}
}
],
"enabled": false
}'Body parameters
namestringrequired- 2 to 100 characters.
triggerEventstringrequired- Name of the event that starts the automation, for example
user.signed_up. stepsobject[]- Ordered steps. Each has a
type(send_email,delay,webhookorbranch) and a free-formconfigobject. The shape ofconfigis not validated yet. enabledboolean- Defaults to false.
Response
{
"data": {
"id": "e2a1c9d4-7b3f-4c2a-9d1e-0f6b5a4c3d21",
"name": "Onboarding sequence",
"trigger_event": "user.signed_up",
"steps": [
{
"type": "send_email",
"config": {
"subject": "Welcome to Acme"
}
},
{
"type": "delay",
"config": {
"hours": 48
}
},
{
"type": "send_email",
"config": {
"subject": "Three things to try first"
}
}
],
"enabled": false,
"created_at": "2026-11-20T18:12:07.551Z"
}
}List automations
GET
/api/v1/automationsRequires automations:readcurl https://mail.example.com/api/v1/automations \
-H "Authorization: Bearer $MAILFORGE_API_KEY"Delete an automation
DELETE
/api/v1/automations/{id}Requires automations:manageRemoves the stored automation.