Documentation

DocsAdvanced FeaturesBulk Enrollment

Bulk Enrollment

Enroll up to 100 contacts in a workflow with a single API call. Returns per-contact results with status and error reasons.

TypeScript
const result = await client.bulkEnroll("wf_abc", [
  "con_1", "con_2", "con_3", "con_4"
]);

for (const r of result.results) {
  if (r.status === "enrolled") {
    console.log(r.contactId, "enrolled as", r.enrollmentId);
  } else {
    console.log(r.contactId, r.status, r.reason);
  }
}
curl
curl -X POST https://api.outreachagent.dev/v1/enrollments/bulk \
  -H "Authorization: Bearer $OUTREACHAGENT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "workflowId": "wf_abc",
    "contactIds": ["con_1", "con_2", "con_3", "con_4"]
  }'
Response
{
  "results": [
    { "contactId": "con_1", "enrollmentId": "enr_1", "status": "enrolled" },
    { "contactId": "con_2", "status": "skipped", "reason": "already enrolled" },
    { "contactId": "con_3", "enrollmentId": "enr_3", "status": "enrolled" },
    { "contactId": "con_4", "status": "failed", "reason": "contact not found" }
  ]
}
Maximum 100 contact IDs per request. Contacts already enrolled in the workflow are skipped, not duplicated.