TryzenAPI
Campaigns

Stop a bulk job after the page in flight

POST
/v1/campaigns/{campaignId}/leads/bulk-jobs/{jobId}/cancel

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.

Authorization

apiKey
headerx-api-key<token>

Workspace API key (nrk_…), shown once when created

Path Parameters

campaignId*string
Match^[0-9a-f]{24}$
jobId*string
Match^[A-Za-z0-9_-]{8,64}$

Response Body

Default Response

application/json
  1. response
jobId*string
Match^[A-Za-z0-9_-]{8,64}$
campaignId*string
Match^[0-9a-f]{24}$
action*string
Value in"pause""resume""stop""remove""move"
targetCampaignId*|null
state*string
Value in"running""canceling""completed""canceled""refused""failed"
total*|null
processed*integer
Range0 <= value <= 9007199254740991
counts*
refusedByCode*
addedToTarget*integer
Range0 <= value <= 9007199254740991
stoppedInSource*integer
Range0 <= value <= 9007199254740991
refusal*|null
startedAt*string
Match^(?:(?:\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)))$
Formatdate-time
finishedAt*|null
Example Request
curl -X POST 'https://api.tryzen.co/v1/campaigns/string/leads/bulk-jobs/string/cancel'
Example Response
{  "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"}