문서로 건너뛰기
API

자동화 수정

이름, 설명, 설정 또는 초안 정의를 바꿉니다. 설정은 즉시 적용됩니다. 새 정의는 초안 전체를 교체하며, 게시하기 전까지 참여 중인 사람에게는 아무것도 바뀌지 않습니다.

PATCH/automations/{id}

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

PATCH /automations/{id}

이름, 설명, 설정 또는 초안 정의를 바꿉니다. 설정은 즉시 적용됩니다. 새 정의는 초안 전체를 교체하며, 게시하기 전까지 참여 중인 사람에게는 아무것도 바뀌지 않습니다.

예시

automations:write가 필요합니다. 바뀌는 것만 보내세요.

curl
curl -X PATCH "$OE/automations/aut_7c2e9a1f4b8d30c65e1a9f27" -H "$AUTH" -H 'content-type: application/json' -d '{  "settings": { "sendWindow": { "days": [1, 2, 3, 4, 5], "startMinute": 540, "endMinute": 1020 } },  "expectedUpdatedAt": "2026-10-02T09:14:00.000Z"}'
응답
{  "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": []}

sendWindow.days는 일요일 0부터 토요일 6까지의 요일이며, 분은 settings.timezone 기준 자정부터 셉니다. null은 발송 시간대를 없앱니다.

읽은 updatedAt을 expectedUpdatedAt으로 보내면, 다른 사람의 변경을 덮어쓰게 될 저장은 409 version_conflict로 거부됩니다.

보관된 자동화는 바꿀 수 없습니다: 409 automation_archived.

레퍼런스