문서로 건너뛰기
API

자동화 게시

초안을 다음 버전으로 확정하고 자동화를 켭니다. 이 순간부터 사람이 들어오며, 그 전에 트리거 조건을 충족한 사람은 추가되지 않습니다.

POST/automations/{id}/publish

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

POST /automations/{id}/publish

초안을 다음 버전으로 확정하고 자동화를 켭니다. 이 순간부터 사람이 들어오며, 그 전에 트리거 조건을 충족한 사람은 추가되지 않습니다.

예시

automations:write와 emails:send가 필요합니다.

curl
curl -X POST "$OE/automations/aut_7c2e9a1f4b8d30c65e1a9f27/publish" -H "$AUTH"
응답
{  "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": []}

게시를 막는 문제가 있는 초안은 422 invalid_automation으로 거부되고, 응답의 error.problems에 모든 문제가 나열됩니다.

모든 이메일 단계에는 수신 거부 링크가 있는 게시된 템플릿과, 이 키나 앱이 발신자로 쓸 수 있는 발신자가 필요합니다. 연락처의 이름 없이는 채울 수 없는 템플릿도 문제가 됩니다. 이름이 없는 연락처가 많으므로 그 값에 대체값을 주세요.

요금제의 게시 중 자동화를 모두 쓰고 있을 때 게시하면 403 automation_limit_reached로 답합니다.

바뀌지 않은 초안을 다시 게시해도 새 버전은 생기지 않습니다. 일시 중지된 자동화는 다시 켜집니다.

레퍼런스