Enroll accounts in a campaign
Enrolls contacts at the given accounts. For campaigns built in the Outreach builder this queues one background job per account, the same one the app uses: it can enroll existing contacts, find new contacts matching Target Personas (`personaIds`, spends credits), cap contacts per account, and route each contact to the best-fitting campaign (`routing`). Only non-customer accounts with sales status lead or working are eligible. For campaigns created through the API, the existing contacts of each account are enrolled immediately and `personaIds`, `maxContactsPerAccount` and `routing` are rejected. The campaign must be active.
Enrolls contacts at the given accounts. For campaigns built in the Outreach builder this queues one background job per account, the same one the app uses: it can enroll existing contacts, find new contacts matching Target Personas (personaIds, spends credits), cap contacts per account, and route each contact to the best-fitting campaign (routing). Only non-customer accounts with sales status lead or working are eligible. For campaigns created through the API, the existing contacts of each account are enrolled immediately and personaIds, maxContactsPerAccount and routing are rejected. The campaign must be active.
Authorization
apiKey In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/campaigns/497f6eca-6276-4993-bfeb-53cbbbba6f08/enrollments/accounts" \ -H "Content-Type: application/json" \ -d '{ "accountIds": [ "b75e4440-1cc9-49a6-8c9e-087e1aa69722" ] }'{
"mode": "background_job",
"message": "string",
"batchId": "5579c111-9c50-47e2-af92-f16d52e63189",
"accountsQueued": 0,
"accountsFailedToQueue": 0,
"ineligibleAccounts": [
{
"accountId": "3d07c219-0a88-45be-9cfc-91e9d095a1e9",
"reason": "not_found"
}
],
"enrolled": 0,
"skipped": [
{
"contactId": "b5ec5d98-4bee-4da1-ad24-dde86346cb1d",
"reason": "string"
}
]
}{
"error": "string"
}{
"error": "string"
}{
"error": "string"
}{
"error": "string"
}{
"error": "string",
"code": "string",
"conflicts": [
null
]
}{
"error": "string"
}{
"error": "string"
}