API
人を追加する、外す
トリガーにかかわらず連絡先を公開中のオートメーションの最初のステップに入れるか、完了する前に人を外します。
POST/automations/{id}/enrollments
2件の呼び出しをワークスペースに対して実行します。
POST /automations/{id}/enrollments
トリガーにかかわらず連絡先を公開中のオートメーションの最初のステップに入れるか、完了する前に人を外します。
例
automations:write が必要です。連絡先は email または contactId のどちらか一方で指定し、両方は指定しません。
curl -X POST "$OE/automations/aut_7c2e9a1f4b8d30c65e1a9f27/enrollments" -H "$AUTH" -H 'content-type: application/json' -d '{ "email": "[email protected]", "data": { "orderId": "A-1042" }}'curl -X POST "$OE/automations/aut_7c2e9a1f4b8d30c65e1a9f27/enrollments/aen_2d8f1b6c9e3a47d05b1c8e62/exit" -H "$AUTH"{ "object": "automation_enrollment", "id": "aen_2d8f1b6c9e3a47d05b1c8e62", "automationId": "aut_7c2e9a1f4b8d30c65e1a9f27", "version": 2, "contact": { "id": "5b0e7c1a-2f4d-4c8b-9a36-1e7d0c5f8b24", "email": "[email protected]", "name": "Ana Lima" }, "status": "active", "source": "trigger", "stepKey": "pause", "waiting": true, "waitingForEvent": null, "heldFor": null, "nextRunAt": "2026-10-14T08:02:11.000Z", "exitReason": null, "lastError": null, "startedAt": "2026-10-11T08:02:03.000Z", "finishedAt": null, "updatedAt": "2026-10-11T08:02:11.000Z"}data には、値をイベントから取得する箇所でステップが読み取れる値を入れます。上限は 50 キー、JSON で 4 KB です。
連絡先はすでに存在している必要があります。未知のアドレスは 404 contact_not_found を返します。
すでに参加中の人や、1 回しか入れないオートメーションをすでに通った人は、409 already_enrolled で拒否されます。
配信停止した連絡先、バウンスした連絡先、苦情を申し立てた連絡先は 409 contact_unreachable で拒否されます。
人を受け入れるのは公開中のオートメーションだけです: 409 automation_not_live。
人を外すと、その人の実行は理由 removed で終了します。すでに終了している参加状況は 409 automation_enrollment_finished を返します。