Queue a LinkedIn action (invite, message, profile view, …) for the person's sender
Access: an API key (or an org-wide key naming the workspace) with manage on campaigns.
Queues one LinkedIn action and answers 202 with the action queued. The sender's own loop runs it later, under the same gates as a campaign step (working hours, the shared daily quota, warm-up, locks, cooldowns); the outcome arrives by webhook and on GET /v1/actions/{actionId}.
The target (profileUrl, publicIdentifier, profileUrn or leadId) becomes a workspace lead (created with source api when it's new), returned as leadId. A profile URL may carry extra path segments (/in/jane/details/…); only the vanity counts. Prefer profileUrl targets, or the profileUrn our profile lookup returns: a bare URN for a person the workspace knows only by vanity can't be matched to that lead before LinkedIn resolves it.
A message with a conversationId is a reply into that thread (it also needs the inboxReply permission): the thread decides who it goes to, and a target given too must be that same person.
reach lets Tryzen pick the step right before acting, for this sender and this person: message (sent when they are a 1st-degree connection), optional note (the invite's note when they aren't) and whenNoteCreditsOut (without_note (default) | wait | fail: an invite with a note while the account's note credits are out). Tryzen decides from its own records (a connection or a 1:1 thread → the message; this sender's invite pending → nothing), else from ONE relationship read of that person, then sends the message or the invite. action.reach says which step it took (message, invite, none), the relationship that decided it and its source (stored, fresh_read, unavailable: no read was possible, so it invited). A message spends the message quota, an invite the invite quota. A reach to the sender's own profile fails target_is_sender; a person LinkedIn can't find for the sender fails profile_unreachable.
Which sender (one person, one account): omit senderId and Tryzen chooses, in this order:
- a
messagewith aconversationId: the thread's own sender, always (refused with422 sender_not_connectedwhen that sender was removed or disconnected withPOST /v1/senders/{senderId}/disconnect); - the lead's owner, the sender that handled its first direct action. Sticky: if that sender lost its session or is stopped the action still queues for it and waits, Tryzen never moves a person to another account by itself. A sender removed or disconnected on purpose (reason
disconnected_by_user) owns nobody until it reconnects; - a sender that already knows the person (an open direct action, a pending invite or a connection, a conversation; the most recent wins), which becomes the owner; a removed or deliberately disconnected sender's relationships don't count;
- otherwise a healthy (
available, no cooldown) connected sender with the most room today for this kind (quota left after warm-up, minus its queued actions; inside its working hours first; ties go to the sender that got a new lead least recently), which becomes the owner.
The answer's action.senderId is the sender chosen. A senderId you give can't override steps 1–3: it must be the thread's sender, the owner, or the sender that already knows the person, else 409 lead_owned_by_other_sender; for a person nobody knows yet it becomes the owner.
Idempotency: idempotencyKey (a UUID) is unique per workspace. Sending the same key with the same body again answers 200 with the action already queued (created: false); the same key with a different body is 409 idempotency_conflict.
expiresAt defaults to 7 days after the action may first run (notBefore, else now) and may be at most 30 days from now; an action that hasn't run by then fails with expired.
Refusals:
404 sender_not_found,404 lead_not_found(aleadIdtarget),404 conversation_not_found(not a thread of this workspace, or a private mailbox you can't see)422 sender_not_connected: thesenderIdyou named isn't connected (reconnect it first), or a reply's thread belongs to a sender that was removed or disconnected422 target_invalid: not a LinkedIn person profile, a group or sponsored thread, or a target that isn't the thread's participant422 action_not_supported:inmailisn't supported yet422 browser_required:view_profile,follow,like_post,withdraw_inviteand an invite without a note run only in the browser, and the person's sender has no browser host422 blacklisted: the person or their company is on the workspace blacklist422 expires_at_invalid:expiresAtin the past, more than 30 days away, or not afternotBefore409 lead_in_active_campaign: aninvite, or amessagewithoutconversationId, to a lead a campaign is still working (its campaign lead is pending, in progress or paused in a scheduled, running or paused campaign); stop or remove it there first. Replies into a thread and the other kinds are allowed422 no_sender_available: nosenderId, no owner or relationship, and no healthy connected sender that can run this kind409 lead_owned_by_other_sender:senderIdisn't the thread's sender, the person's owner, or the sender that already knows them; omit it409 idempotency_conflict403 forbidden: amessagewith aconversationIdwithout theinboxReplypermission
apiKeyx-api-key<token>Workspace API key (nrk_…), shown once when created
application/json- body
senderId?string^[0-9a-f]{24}$idempotencyKey*string^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$uuidexternalId?string1 <= length <= 200notBefore?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-timeexpiresAt?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-timetype*stringtarget*|||note?string1 <= length <= 300Default Response
application/json- response
action*created*booleancurl -X POST 'https://api.tryzen.co/v1/actions' \ -H 'Content-Type: application/json' \ -d '{ "idempotencyKey": "0c14c6a6-6f50-4d1e-b0c4-b46ff43ba6a1", "type": "invite", "target": { "profileUrl": "string" }}'{ "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 } }, "created": true}Direct actions, newest first GET
**Access:** an API key (or an org-wide key naming the workspace) with view on `campaigns`. Keyset-paginated: pass `nextCursor` back as `cursor` (`400 invalid_cursor` for one that isn't ours). Filter by `senderId`, `status`, `type` or your own `externalId`. The message text of a sender with a private mailbox you didn't connect comes back as `null`.
One direct action: status, why it's waiting, result or failure GET
**Access:** an API key (or an org-wide key naming the workspace) with view on `campaigns`. `waiting` says why a queued action hasn't run yet (outside working hours, quota, warm-up, …). Final statuses: `succeeded`, `failed` (`failure.code`, e.g. `expired`), `unknown` (it may have reached LinkedIn; never re-sent) and `canceled`. `404 action_not_found`.