Cancel every queued action of one externalId or one person
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.
apiKeyx-api-key<token>Workspace API key (nrk_…), shown once when created
application/json- body
externalId*string1 <= length <= 200Default Response
application/json- response
canceled*array<>notCanceled*array<>truncated*booleancurl -X POST 'https://api.tryzen.co/v1/actions/cancel' \ -H 'Content-Type: application/json' \ -d '{ "externalId": "string"}'{ "canceled": [ { "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 } } ], "notCanceled": [ { "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 } } ], "truncated": true}Where a sender stands with a person, from Tryzen's records (no LinkedIn read) GET
**Access:** an API key (or an org-wide key naming the workspace) with view on `campaigns`. Give exactly one of `profileUrl`, `publicIdentifier`, `memberUrn` (an `urn:li:fsd_profile:…`, also accepted as `profileUrn`) or `leadId`, and optionally `senderId`. `connection`: `connected` (a 1st-degree connection, or a 1:1 LinkedIn thread with them), `pending` (this sender's invite is still out), `none` (a record says neither) or `unknown` (no record of this sender and person). `source` is always `stored`: this read never asks LinkedIn, so a connection made outside Tryzen may still read `none` or `unknown` (a `reach` checks with one fresh read before it acts). `checkedAt` is when the record was last confirmed (a relationship read, an invite check, a sync), or null. Without `senderId` it answers for the person's owner sender (the one their direct actions go through), else the sender with the closest relationship (connected, then pending, then any record); `senderId` in the answer says which (null when no sender knows them). `404 sender_not_found`, `422 target_invalid` (not a LinkedIn person profile).
Cancel a queued direct action POST
**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`.