Skip to main content
POST
Cancel an enrollment run
Stops a run adding anyone else. It is not an undo: everyone already enrolled stays enrolled. To reverse a run, find its enrollments with List enrollments and un-enroll them in bulk.
The body is optional. This is the one write under /v2/sequencer where user_id is not required, because a cancellation is recorded against the team rather than a person. If you send user_id, it must be an active member of the team.

Authorizations

x-api-key
string
header
required

Team-scoped API key generated in the Salesfinity dashboard under Settings → Connections → API & Webhooks. A missing or invalid key returns HTTP 403.

Headers

Idempotency-Key
string

Makes this write safe to retry. Send a unique value, such as a UUID, and send the same value again when you retry the same request. A retry with the same key and the same request (method, path including the query string, and JSON body) returns the original successful response without acting twice. The same key with a different body or path returns 409, and so does a retry while the first request is still running; that one is safe to repeat after a moment. A request that fails frees its key, so a retry runs the write again: after a 5xx on a create, confirm with a GET before retrying. Keys are kept for 24 hours and are scoped to your team.

Path Parameters

run_id
string
required

The run id returned when the run was started: enroll_ followed by 24 hexadecimal characters.

Body

application/json

Optional body. A cancellation is recorded against the team rather than a person, so user_id is accepted but not required here, unlike every other write under /v2/sequencer.

user_id
string

The team member this call acts as. Optional for this operation.

Example:

"507f1f77bcf86cd799439011"

Response

The run after the cancel request. A run that is still stopping shows its current status, with cancel_requested: true.

A background enrollment run. Deleted 7 days after it finishes.

run_id
string

enroll_ followed by 24 hexadecimal characters.

Example:

"enroll_9c1f4e2a7b3d5c6e8f0a1b2c"

status
enum<string>

queued: waiting for a worker. fetching: reading the source; total is not known yet. running: enrolling. completed, failed and cancelled are final.

Available options:
queued,
fetching,
running,
completed,
failed,
cancelled
sequence
string

24-character hexadecimal id.

Example:

"507f1f77bcf86cd799439011"

total
integer

Everyone the source yielded, including rows that cannot be attempted. 0 until the source has been read.

processed
integer

How many of total have been dealt with: enrolled, skipped or routed. Progress is processed out of total.

enrolled
integer

People enrolled, including those held for approval.

skipped_count
integer

People not enrolled: refused by a check, or not attemptable (no email or LinkedIn handle, or past the 5,000 cap).

held_count
integer

Enrolled people a rule is holding for approval. Part of enrolled.

routed_count
integer

People a rule started in another sequence instead of this one. Not part of enrolled or skipped_count: when a run completes, enrolled plus skipped_count plus routed_count equals total.

truncated
boolean

The source had more than 5,000 usable people; only the first 5,000 were considered.

sample_skipped
object[]

Up to 50 skipped people, each with the reason. Every refusal is also on the sequence's refusals list, except rows that could not be attempted.

error
string | null

Why the run failed or stopped early. Absent otherwise.

finished_at
string<date-time> | null

When the run reached a final status. Absent while it is in progress.

source
object

What the run was pointed at. A run started from a preview keeps the preview's source and adds preview_id. Runs started in the Salesfinity app from a connected CRM have kind crm and also carry provider, scope and list_id.

cancel_requested
boolean

A cancel has been asked for. The run stops at its next check, and status changes when it does.

created_at
string<date-time>

When the run was started.