TryzenAPI
Actions

Cancel a queued direct action

POST
/v1/actions/{actionId}/cancel

Access: an API key (or an org-wide key naming the workspace) with manage on campaigns.

Only while queued and no earlier attempt may have reached LinkedIn (a requeued write waiting to be verified): otherwise, and once the sender's loop claimed it (running) or it ended, 409 action_not_cancelable. Canceling an action that is already canceled answers it again. 404 action_not_found.

Authorization

apiKey
headerx-api-key<token>

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

Path Parameters

actionId*string
Match^[0-9a-f]{24}$

Response Body

Default Response

application/json
  1. response
action*
Example Request
curl -X POST 'https://api.tryzen.co/v1/actions/string/cancel'
Example Response
{  "action": {    "id": "string",    "senderId": "string",    "leadId": "string",    "type": "invite",    "target": {      "profileUrl": "string"    },    "params": {      "note": "string",      "text": "string",      "subject": "string",      "conversationId": "string",      "withinDays": -9007199254740991,      "splitParagraphs": true,      "stopIfReplied": true,      "whenNoteCreditsOut": "without_note"    },    "externalId": "string",    "status": "queued",    "requestedAt": "2019-08-24T14:15:22Z",    "notBefore": "2019-08-24T14:15:22Z",    "expiresAt": "2019-08-24T14:15:22Z",    "startedAt": "2019-08-24T14:15:22Z",    "finishedAt": "2019-08-24T14:15:22Z",    "waiting": {      "reason": "turn",      "until": "2019-08-24T14:15:22Z"    },    "result": {      "invitationUrn": "string",      "conversationId": "string",      "messageId": "string",      "connection": "connected",      "skipped": "string"    },    "failure": {      "code": "string",      "message": "string",      "retryable": true    },    "reach": {      "step": "message",      "relationship": "connected",      "source": "stored",      "withNote": true    }  }}

Cancel every queued action of one externalId or one person POST

**Access:** an API key (or an org-wide key naming the workspace) with manage on `campaigns`. Body: exactly one of `{ "externalId": "…" }` or `{ "target": { profileUrl | publicIdentifier | profileUrn | leadId } }`. A person counts with every workspace lead Tryzen knows them by, found the way a create finds them; an unknown person or `externalId` matches nothing (no lead is created). A target given only as a `profileUrn` can't find a lead known only by its vanity: use the target form the actions were created with (or the lookup's `profileUrn` for both). Once it answers, no matched action makes a new LinkedIn write. Every `queued` one ends `canceled` (its own `canceled` event), or `unknown` (code `cancel_requested`, never retried) when an earlier attempt may already have reached LinkedIn. Every `running` one is stopped before its next attempt; only an attempt already started at that moment can still finish (up to about 2 minutes over HTTP, about 10 in the browser; a split message can send all its parts), and its webhook says how the action ended (`succeeded`, `failed`, `unknown` or `canceled`). The answer: `canceled` (by this call) and `notCanceled` (newest first: the ones this call ended `unknown`, and every matched action still `running` or `queued`). Synchronous and **safe to repeat**. At most 200 queued actions are ended and 200 listed in `notCanceled` per call; `truncated: true` means queued ones are left (they won't run) or the list was cut: call again until it is false. A failure partway (500) keeps what was done; repeating finishes it. Not covered: campaign steps, replies queued in the app, and an action created by a call running at the same moment. Stop creating actions for the contact first, then cancel. `422 target_invalid` for a target that isn't a LinkedIn person profile.

Workspace dashboard: sends, acceptances and replies over a range GET

**Access:** an API key (or an org-wide key naming the workspace) with view on `campaigns`. Sums of the daily campaign counters between `from` and `to` (UTC days `YYYY-MM-DD`, both included; default: the last 30 days, today included; at most 366 days). `campaignId` and `senderId` narrow every number to one campaign or one sender. `series` has one point per day, zeros included. Rates are outcome ÷ sends in the same range (`null` when nothing was sent), so over a short range an acceptance rate can exceed 1. Campaign `progress` is the leads' current state, not ranged. 422 `range_inverted | range_too_long`; 404 `campaign_not_found | sender_not_found` for an id that isn't in this workspace.