This page documents the canonical HTTP contract for this endpoint.
Async contract
This endpoint queues enrollment work and returns immediately when eligible leads exist. Poll GET /api/operation-runs/{operation_run_id} with the returned operationRunId or operation_run_id for canonical progress; developer keys need the additional jobs:read scope. The returned task_id identifies the native bulk job, whose status read is available for executor diagnostics. Admission does not prove completed enrollment or message delivery.
If preflight finds no eligible leads, the response is a successful status=noop. Without an idempotency key, task_id=null and no operation ID is returned. With idempotencyKey, the server persists a terminal no-op outcome and returns its task and canonical operation IDs for replay. Inspect skip reasons; poll only identities actually returned.
idempotencyKey makes a retry safe only when the enrollment input is unchanged. tableAudience is optional proof; when supplied, the backend validates its table, lead column, and fingerprint before admitting enrollment.
Native Command Center enrollment remains sensitive under Approve for me, including manual-only or reviewOnly enrollment. Activating a sequence automatically in that mode does not approve adding Leads. Combined launch-and-enroll actions also require approval. HTTP and CLI enrollment keep their existing explicit authenticated invocation and scope requirements.
Activation contract
- Real enrollment requires the target sequence to already be
ACTIVE. reviewOnly=truestages paused enrollment records and skips sending side effects. It is a mutation, not a read-only preview, and also permitsDRAFTorPAUSEDsequences. Use the audience preview for read-only eligibility checks.- Table-driven
add_to_sequencecolumns use the same activation and eligibility checks as direct enroll. The sequence'ssourceTableIdmust match the table the column belongs to.
Assignee and sender routing
Find teammate IDs with GET /api/org/users (users:read). Find mailbox and LinkedIn account IDs with GET /api/sender-accounts (integrations:read). Copy exact returned IDs; never use current_user, a display name or email as an ID.
If assignedToUserId and assignmentPlan are omitted, ownership defaults to the resolved requesting actor. A developer-key request uses its owner as the default actor. With one assignee and no team plan, routing is single; round-robin requires an explicit team assignment plan. Existing sender selections can be pinned; inspect account defaults and access before overriding them.
- Most enrollments only need
assignedToUserId. WhensenderAccountIdsandassignmentPlanare omitted, Autotouch uses that assignee's default connected email and LinkedIn sender accounts. - Use
senderAccountIdsonly when one enrollment must be pinned to a specific email or LinkedIn sender account. - Use
assignmentPlanplusroutingMode=round_robinorweighted_round_robinwhen distributing leads across multiple owners or sender accounts. - Owners/admins manage defaults and delegation through
/api/sender-accounts; ordinary "assign these leads to me" enrollments do not need sender-account management.
Lead-ID prerequisite
leadIds must contain existing CRM Lead IDs, not teammate IDs or a table's boolean In Leads flag. For Research Table rows without CRM identities, use Sync to Leads (the add_to_crm provider; research_table.sync_to_leads where that operation is exposed), then consume its Lead-ID result column. Preserve the requested audience; do not silently restrict it to rows already in CRM.
Conflict guard
Set skipActiveSequenceConflicts: true when the handoff should skip people already active in another sequence. This is recommended for table-driven or automated handoffs unless the user explicitly wants parallel enrollment.
Context behavior
- When
researchContext.fieldIdsis present, those IDs are used as the selected context set. - When
fieldIdsis omitted, audience/draft context falls back to starred research columns.
Why favorites matter
- Calling workflows use favorites to surface high-signal context quickly in sidecar views.
- AI draft generation uses the selected/fallback context set, so importing both intent and full context improves output quality.
Mark a research column as a favorite by setting isImportant: true on POST /api/tables/{table_id}/columns or PATCH /api/tables/{table_id}/columns/{column_id}.
Path parameters
sequence_idrequiredstring
Sequence ID.
| Name | Type | Description |
|---|---|---|
| sequence_idrequired | string | Sequence ID. |
Query parameters
actorUserId· optionalstring
Optional actor override used as default assignee; an invalid explicit actor is rejected rather than replaced with the key owner.
| Name | Type | Description |
|---|---|---|
| actorUserId | string | Optional actor override used as default assignee; an invalid explicit actor is rejected rather than replaced with the key owner. |
Body parameters
leadIdsrequiredarray<string>
Lead IDs to enroll.
assignedToUserId· optionalstring
Assignee for generated sequence tasks. Easy path: set this and omit senderAccountIds/assignmentPlan so the assignee's default connected senders are used.
senderAccountIds· optionalobject
Advanced sender pinning keyed by channel. Supported keys: email, linkedin. Omit for normal assignee-default routing.
senderAccountIds.email· optionalstring
Advanced: explicit email sender account ID for this enrollment.
senderAccountIds.linkedin· optionalstring
Advanced: explicit LinkedIn sender account ID for this enrollment.
assignmentPlan· optionalarray<object>
Advanced/team routing plan. Use when distributing leads across multiple assignees or sender accounts.
assignmentPlan[].assigneeUserId· optionalstring
User who should own tasks for this route.
assignmentPlan[].senderAccountIds· optionalobject
Optional route-specific email/linkedin sender account IDs.
assignmentPlan[].weight· optionalnumber
Optional route weight when routingMode=weighted_round_robin.
routingMode· optionalstring
Advanced routing mode for assignmentPlan: single, round_robin, or weighted_round_robin.
updateLeadOwner· optionalboolean
If true, update the Lead owner to the resolved assignee.
skipActiveSequenceConflicts· optionalboolean
Skip leads already active in another sequence. If omitted, the sequence enrollment rule is used.
reviewOnly· optionalboolean
Stage paused enrollment records with sending side effects skipped. This is a mutation; it permits DRAFT or PAUSED sequences as well as ACTIVE.
researchContext· optionalobject
Optional research linkage metadata.
researchContext.sourceTableId· optionalstring
Research table ID for live row linkage.
researchContext.fieldIds· optionalarray<string>
Optional selected research field IDs (column IDs).
researchContext.sourceTableName· optionalstring
Optional display name for the research table.
idempotencyKey· optionalstring
Optional client key (8-200 characters) for retrying identical enrollment input. Reusing it with different input is rejected.
tableAudience· optionalobject
Optional reviewed table audience proof. Contains sourceTableId, sourceLeadColumn, and a 64-character lowercase hexadecimal fingerprint; the backend rechecks it at admission.
tableAudience.sourceTableId· optionalstring
Research table whose reviewed audience is being enrolled.
tableAudience.sourceLeadColumn· optionalstring
Lead-ID result column used to resolve this audience.
tableAudience.fingerprint· optionalstring
64-character lowercase hexadecimal fingerprint from the table audience readiness flow.
startDate· optionalstring (ISO datetime)
Optional enrollment start time.
variableMap· optionalobject
Optional sequence variable-to-table field mapping.
variableOverrides· optionalobject
Optional per-lead variable overrides keyed by lead ID.
senderBindings· optionalobject
Optional channel-keyed sender binding objects.
| Name | Type | Description |
|---|---|---|
| leadIdsrequired | array<string> | Lead IDs to enroll. |
| assignedToUserId | string | Assignee for generated sequence tasks. Easy path: set this and omit senderAccountIds/assignmentPlan so the assignee's default connected senders are used. |
| senderAccountIds | object | Advanced sender pinning keyed by channel. Supported keys: email, linkedin. Omit for normal assignee-default routing. |
| senderAccountIds.email | string | Advanced: explicit email sender account ID for this enrollment. |
| senderAccountIds.linkedin | string | Advanced: explicit LinkedIn sender account ID for this enrollment. |
| assignmentPlan | array<object> | Advanced/team routing plan. Use when distributing leads across multiple assignees or sender accounts. |
| assignmentPlan[].assigneeUserId | string | User who should own tasks for this route. |
| assignmentPlan[].senderAccountIds | object | Optional route-specific email/linkedin sender account IDs. |
| assignmentPlan[].weight | number | Optional route weight when routingMode=weighted_round_robin. |
| routingMode | string | Advanced routing mode for assignmentPlan: single, round_robin, or weighted_round_robin. |
| updateLeadOwner | boolean | If true, update the Lead owner to the resolved assignee. |
| skipActiveSequenceConflicts | boolean | Skip leads already active in another sequence. If omitted, the sequence enrollment rule is used. |
| reviewOnly | boolean | Stage paused enrollment records with sending side effects skipped. This is a mutation; it permits DRAFT or PAUSED sequences as well as ACTIVE. |
| researchContext | object | Optional research linkage metadata. |
| researchContext.sourceTableId | string | Research table ID for live row linkage. |
| researchContext.fieldIds | array<string> | Optional selected research field IDs (column IDs). |
| researchContext.sourceTableName | string | Optional display name for the research table. |
| idempotencyKey | string | Optional client key (8-200 characters) for retrying identical enrollment input. Reusing it with different input is rejected. |
| tableAudience | object | Optional reviewed table audience proof. Contains sourceTableId, sourceLeadColumn, and a 64-character lowercase hexadecimal fingerprint; the backend rechecks it at admission. |
| tableAudience.sourceTableId | string | Research table whose reviewed audience is being enrolled. |
| tableAudience.sourceLeadColumn | string | Lead-ID result column used to resolve this audience. |
| tableAudience.fingerprint | string | 64-character lowercase hexadecimal fingerprint from the table audience readiness flow. |
| startDate | string (ISO datetime) | Optional enrollment start time. |
| variableMap | object | Optional sequence variable-to-table field mapping. |
| variableOverrides | object | Optional per-lead variable overrides keyed by lead ID. |
| senderBindings | object | Optional channel-keyed sender binding objects. |
Errors
| Status | Meaning |
|---|---|
| 400 | Invalid payload or actor. |
| 401 | Invalid API key or missing auth. |
| 403 | Missing sequences:run scope. |
| 409 | Idempotency conflict or sequence must be ACTIVE to enroll leads. |
| 404 | Sequence not found. |
| 503 | Enrollment could not be queued or provider/runtime admission is unavailable. |
