문서로 건너뛰기
API

자동화 만들기

`definition`에서, `starter`에서, 또는 둘 다 보내지 않으면 빈 상태로 초안을 만들고 자동화 전체를 반환합니다. 게시하기 전까지 아무것도 실행되지 않습니다.

POST/automations

워크스페이스에 실제 호출을 실행합니다.

POST /automations

definition에서, starter에서, 또는 둘 다 보내지 않으면 빈 상태로 초안을 만들고 자동화 전체를 반환합니다. 게시하기 전까지 아무것도 실행되지 않습니다.

예시

automations:write가 필요합니다.

curl
curl -X POST "$OE/automations" -H "$AUTH" -H 'content-type: application/json' -d '{  "name": "Welcome series",  "starter": "welcome-series",  "settings": { "timezone": "Europe/London" }}'
응답
{  "object": "automation",  "id": "aut_7c2e9a1f4b8d30c65e1a9f27",  "name": "Welcome series",  "description": null,  "status": "live",  "triggerKind": "audience_joined",  "stepCount": 4,  "emailCount": 2,  "hasUnpublishedChanges": false,  "publishedVersion": 2,  "pausedReason": null,  "lastError": null,  "counts": { "active": 38, "completed": 412, "exited": 9 },  "createdBy": "q7Vd3kX9mT2pLw8RzN4bYc6HfJ1sGa5E",  "publishedAt": "2026-10-02T09:14:00.000Z",  "pausedAt": null,  "archivedAt": null,  "createdAt": "2026-10-01T16:40:12.000Z",  "updatedAt": "2026-10-02T09:14:00.000Z",  "definition": {    "trigger": { "kind": "audience_joined", "audienceId": "aud_4c1b8e2a7d9f05c36b4e8a71", "includeImported": false },    "entry": "welcome",    "steps": [      {        "key": "welcome",        "kind": "send_email",        "next": "pause",        "templateId": "tpl_9c1f0a4b7e05d3862c1f0a44",        "templateVersion": null,        "from": { "email": "[email protected]", "name": "Acme" },        "replyTo": null,        "subject": null,        "props": { "firstName": { "source": "contact", "field": "firstName" } }      },      { "key": "pause", "kind": "wait", "next": "opened", "wait": { "mode": "duration", "amount": 3, "unit": "days" } },      {        "key": "opened",        "kind": "branch",        "condition": { "kind": "email_opened", "stepKey": "welcome" },        "yes": null,        "no": "nudge"      },      {        "key": "nudge",        "kind": "send_email",        "next": null,        "templateId": "tpl_8f3a1c2e9b7d4a60",        "templateVersion": null,        "from": { "email": "[email protected]", "name": "Acme" },        "replyTo": null,        "subject": "{{firstName|Hello}}, did you see this?",        "props": {}      }    ]  },  "published": { "trigger": { "kind": "audience_joined", "…": "…" }, "entry": "welcome", "steps": ["…"] },  "settings": {    "timezone": "Europe/London",    "sendWindow": { "days": [1, 2, 3, 4, 5], "startMinute": 540, "endMinute": 1020 },    "reentryDays": null,    "exitOnLeave": true,    "listAudienceId": null  },  "problems": []}

초안은 미완성이어도 됩니다. 빠진 것은 problems로 돌아오며, 완전한 정의를 요구하는 것은 게시뿐입니다.

키가 같은 단계가 둘이거나 한 단계에 두 곳에서 도달하는 것처럼 구조 자체를 깨는 정의는 422 invalid_automation으로 거부됩니다.

settings에는 설정 중 일부만 넣어도 되며, 나머지는 기본값을 유지합니다. timezone의 기본값은 UTC입니다.

워크스페이스는 기본적으로 자동화를 100개까지 가질 수 있습니다. 그다음 자동화는 422 workspace_limit_reached로 거부됩니다.

레퍼런스