A bulk job's progress
Access: an API key (or an org-wide key naming the workspace) with view on campaigns.
state is running, canceling, completed, canceled, refused (with refusal) or failed; processed of total leads were visited, counts split by outcome and refusedByCode by reason. 404 bulk_job_not_found for an unknown job or one of another campaign.
apiKeyx-api-key<token>Workspace API key (nrk_…), shown once when created
campaignId*string^[0-9a-f]{24}$jobId*string^[A-Za-z0-9_-]{8,64}$Default Response
application/json- response
jobId*string^[A-Za-z0-9_-]{8,64}$campaignId*string^[0-9a-f]{24}$action*string"pause""resume""stop""remove""move"targetCampaignId*|nullstate*string"running""canceling""completed""canceled""refused""failed"total*|nullprocessed*integer0 <= value <= 9007199254740991counts*refusedByCode*addedToTarget*integer0 <= value <= 9007199254740991stoppedInSource*integer0 <= value <= 9007199254740991refusal*|nullstartedAt*string^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$date-timefinishedAt*|nullcurl -X GET 'https://api.tryzen.co/v1/campaigns/string/leads/bulk-jobs/string'{ "jobId": "string", "campaignId": "string", "action": "pause", "targetCampaignId": "string", "state": "running", "total": 0, "processed": 0, "counts": { "property1": 0, "property2": 0 }, "refusedByCode": { "property1": 0, "property2": 0 }, "addedToTarget": 0, "stoppedInSource": 0, "refusal": { "code": "string", "message": "string" }, "startedAt": "2019-08-24T14:15:22Z", "finishedAt": "2019-08-24T14:15:22Z"}One action on every lead matching the filters, in the background POST
**Access:** an API key (or an org-wide key naming the workspace) with manage on `campaigns`. Applies `pause`, `resume`, `stop`, `remove` or `move` to every lead of the campaign that matches `filters` (all leads by default), page by page, each lead judged on its own like the in-request bulk. Answers 202 at once; poll `GET …/bulk-jobs/{jobId}`. `jobId` is an idempotency key: the same id never starts a second job (202 `started: false`). Leads enrolled after the job began are out of scope. 429 `rate_limited` after 10 starts a minute in the workspace; 503 while the engine is unreachable.
Stop a bulk job after the page in flight POST
**Access:** an API key (or an org-wide key naming the workspace) with manage on `campaigns`. What was applied stays applied. A running job answers `canceling` and ends as `canceled` once its page finishes. On a job that already ended this is a 200 no-op with the job as it is, so a double-click is harmless.