TryzenAPI

Direct actions

Queue invites, messages and other LinkedIn actions for one person, safely retried with an idempotency key.

A direct action is one LinkedIn action for one person: a connection request, a message, a profile view. You queue it with POST /v1/actions; the sender's own loop runs it later, at a human pace, and the outcome arrives by webhook and on GET /v1/actions/{actionId}.

Actions need a key with campaigns: manage. A reply into a conversation also needs inboxReply.

Look up the person first (optional)

curl -s "$TRYZEN_API/v1/linkedin/profiles/jane-doe?senderId=$SENDER_ID" \
  -H "x-api-key: $TRYZEN_KEY"
{
  "profile": {
    "profileUrn": "urn:li:fsd_profile:ACo…",
    "publicIdentifier": "jane-doe",
    "profileUrl": "https://www.linkedin.com/in/jane-doe",
    "connection": "none",
    "leadId": "…",
    "firstName": null, "lastName": null, "headline": null, "location": null,
    "pictureUrl": null
  }
}

The lookup is one read through that sender's own LinkedIn session. It tells you the connection state (connected, pending, none or unknown), gives you the profileUrn to use as a stable target, and creates the workspace lead. identifier can be a vanity, a URL-encoded profile URL, or a URN the workspace already knows.

pictureUrl is the person's photo only when Tryzen already stores one (from an inbox thread with them), as a path on this API (/v1/leads/{leadId}/picture?workspaceId=…); fetch it with your key, which needs leads: view. It is never a LinkedIn URL, and neither the lookup nor that route reads LinkedIn for it; otherwise it is null.

Lookups are rationed per sender, because each one is real LinkedIn traffic: a small daily budget (429 lookup_budget_exhausted with Retry-After until the sender's local midnight) and a short spacing between two lookups (429 lookup_throttled). Needs leads: manage.

Queue an action

Send a connection request
curl -s -X POST "$TRYZEN_API/v1/actions" \
  -H "x-api-key: $TRYZEN_KEY" -H "content-type: application/json" \
  -d '{
    "type": "invite",
    "idempotencyKey": "6f1c2a52-4a8e-4b41-9d0e-3f0c1b7f6a10",
    "externalId": "contact-123",
    "target": { "profileUrn": "urn:li:fsd_profile:ACo…" },
    "note": "Hi Jane, enjoyed your post on outbound. Happy to connect."
  }'
202 Accepted
{ "action": { "id": "…", "senderId": "…", "leadId": "…", "status": "queued", "waiting": null, "…": "…" }, "created": true }

Types

typeDoesFields
inviteA connection requestnote (optional, ≤ 300 characters; accounts without Premium are limited to 200 by LinkedIn)
messageA message to a 1st-degree connection, or a reply into a threadtext (≤ 8,000) and target or conversationId
view_profileVisits the person's profile
followFollows the person
like_postLikes the person's newest postwithinDays (default 30): how recent the post must be
withdraw_inviteWithdraws a pending connection request
check_connectionA read: are we connected?The answer is in result.connection
reachA message if you're connected, else a connection request, else nothing (see below)message (≤ 8,000), note (optional), whenNoteCreditsOut (optional)
inmailNot available yetAnswered 422 action_not_supported

A message to someone you aren't connected with fails with not_connected. Use an invite first, and send the message after the connection_request_accepted webhook, or send a reach.

Reach: let Tryzen pick the step

When you don't know whether the account is connected with the person, send a reach. Right before acting (after the account's working hours, limits and warm-up allow it), Tryzen decides for this account and this person:

  1. From its own records: connected (or a 1:1 LinkedIn chat with them) → the message; this account's invite still pending → nothing.
  2. Otherwise from one relationship read of that person (never a list): connected → message, pending → nothing, not connected → a connection request with your note. A person LinkedIn can't find fails profile_unreachable; when no read is possible for the account it invites and says so.
Reach someone
curl -s -X POST "$TRYZEN_API/v1/actions" \
  -H "x-api-key: $TRYZEN_KEY" -H "content-type: application/json" \
  -d '{
    "type": "reach",
    "idempotencyKey": "0e4b7c1a-1f5d-4c7e-9a52-6f3b2d8c9e01",
    "target": { "publicIdentifier": "jane-doe" },
    "message": "Hi Jane, thanks for connecting. Quick question about your outbound team…",
    "note": "Hi Jane, enjoyed your post on outbound. Happy to connect.",
    "whenNoteCreditsOut": "without_note"
  }'

whenNoteCreditsOut applies when the account's invite-note credits are used up: without_note (the default) sends the request without the note, wait holds it until the credits return, and fail ends the action with note_credits_used_up.

Once it has decided, the action carries reach:

{ "reach": { "step": "invite", "relationship": "none", "source": "fresh_read", "withNote": true } }

step is message, invite or none; relationship is what decided it (connected, pending, none, unknown); source is stored (Tryzen's records), fresh_read (the read) or unavailable (no read was possible). The step spends its own daily limit (messages or connection requests). A retry after an attempt that may have reached LinkedIn keeps its step. Webhooks: message_sent, connection_request_sent, or connection_checked (step none, with connection.status: "pending"), and action_failed on failure, each with the same reach.

Where an account stands with a person

GET /v1/relationships answers from Tryzen's records only (no LinkedIn read):

curl -s "$TRYZEN_API/v1/relationships?senderId=$SENDER&publicIdentifier=jane-doe" \
  -H "x-api-key: $TRYZEN_KEY"
{ "connection": "connected", "source": "stored", "checkedAt": "2026-11-30T09:00:00.000Z", "senderId": "…" }

Give one of profileUrl, publicIdentifier, memberUrn or leadId. connection is connected, pending, none or unknown (no record). Without senderId it answers for the person's owner account, else the account with the closest relationship.

Targets

target takes one of profileUrl, publicIdentifier, profileUrn or a Tryzen leadId.

Prefer profileUrl, or the profileUrn from a lookup. LinkedIn knows a person both by their vanity (jane-doe) and by a member URN, and a workspace may know only one of the two for a given person until LinkedIn links them. The lookup stores both on one lead, so its profileUrn is always safe. A profile URL may carry extra path segments (/in/jane/details/…); only the vanity after /in/ counts.

Idempotency

idempotencyKey (a UUID) is required, and unique per workspace.

  • Same key, same body: 200 with the action that's already queued and created: false. Nothing is queued twice.
  • Same key, different body: 409 idempotency_conflict.

Generate the key once per intent (for example when your system decides "invite contact 123") and store it with that intent. Reuse it on every retry of that call. A timeout or a dropped connection on your side can then never send a second invite.

Your own ids: externalId

externalId (up to 200 characters) is yours. It comes back in reads, in every webhook about the action (as request.externalId), and you can filter the list by it: GET /v1/actions?externalId=contact-123.

Which account sends: one person, one account

Leave senderId out. Tryzen picks the sender and keeps it, so a person always hears from the same LinkedIn account:

  1. A reply (message with conversationId) goes from the thread's own sender, always. If that sender was removed or you disconnected it, the reply is refused (422 sender_not_connected).
  2. The person's owner: the sender that handled their first direct action. If that account lost its session or is stopped, the action still waits for it; Tryzen never moves a person to another account by itself. Reconnect the account, or cancel the action. A sender you removed or disconnected on purpose owns nobody: its people go to the next steps until it reconnects.
  3. An existing relationship: a sender that already knows the person (an open action, a pending invite, a connection or a conversation; the most recent wins). It becomes the owner.
  4. A new owner: a healthy connected sender with the most room today for this kind of action, preferring one inside its working hours. It becomes the owner.

action.senderId in the answer, in reads and in every webhook names the sender chosen.

You can still name a senderId, but it can't override steps 1 to 3: for a thread, an owned person or a person one of your senders already knows, it must be that sender, otherwise you get 409 lead_owned_by_other_sender. For a person nobody knows yet, the sender you name becomes the owner. A sender you name must be connected (422 sender_not_connected).

No sender at all can take the action: 422 no_sender_available.

Statuses

statusMeaning
queuedStored and waiting its turn. waiting says why it hasn't run yet
runningThe sender's loop is running it
succeededLinkedIn accepted it (or the read answered). result holds invitationUrn, conversationId, messageId, connection, or skipped when there was nothing to do (already_connected, no_post_to_like)
failedRefused for sure, or expired. failure has code, message and retryable
unknownThe write may have reached LinkedIn. Tryzen checks with a read and never re-sends blindly. Don't queue it again yourself
canceledYou canceled it while it was queued

Why an action is waiting

waiting.reason, with waiting.until when it's known:

ReasonMeaning
turnOther work of this sender goes first
outside_working_hoursIt runs when the sender's working hours start
quotaThe sender's quota for this kind is used up for today
warmupThe sender is still warming up
lockedLinkedIn throttled the account; it waits until the lock lifts
cooldownA longer pause, for example after the weekly invitation cap
sender_pausedThe sender is paused
sender_stoppedThe sender needs a person to reconnect it
not_beforeYou asked for it to start later (notBefore)

Every queued action of a sender shows the current reason, not only the oldest one. A new action reads waiting: null until the sender's loop has looked at it.

Timing, expiry and cancel

  • notBefore delays an action.
  • expiresAt defaults to 7 days after the action may first run, and can be at most 30 days away (422 expires_at_invalid). An action that hasn't run by then fails with expired.
  • When you disconnect a sender, or an admin removes it, its queued actions fail at once with sender_disconnected or sender_removed (each with an action_failed webhook). An action that is already running finishes its attempt. A sender that only lost its session keeps its actions waiting (sender_stopped) until it reconnects or they expire.
  • POST /v1/actions/{actionId}/cancel works only while the action is queued (409 action_not_cancelable after that).

Cancel everything for one contact

On an unsubscribe, a reply or a suppression, stop everything still waiting in one call:

curl -s -X POST "$TRYZEN_API/v1/actions/cancel" -H "x-api-key: $TRYZEN_KEY" \
  -H "content-type: application/json" -d '{"externalId":"crm-contact-123"}'
# or by person: -d '{"target":{"profileUrl":"https://www.linkedin.com/in/jane-doe"}}'
{ "canceled": [{ "id": "…", "status": "canceled", … }],
  "notCanceled": [{ "id": "…", "status": "running", … }],
  "truncated": false }
  • Body: exactly one of externalId or target (any target form, or leadId). A person counts with every lead of the workspace Tryzen knows them by; an unknown person matches nothing. A target given only as a profileUrn can't find a lead known only by its vanity: cancel with the target form you created the actions with (or by externalId).
  • Once it answers, none of these actions makes a new LinkedIn write. Each queued action ends canceled, or unknown (code cancel_requested, never retried) when an earlier attempt may already have reached LinkedIn. Each running action 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 message split into paragraphs can send all its parts), and its webhook tells you how the action ended.
  • canceled lists what this call canceled; notCanceled lists, newest first, the ones this call ended unknown and every matched action still running or queued. It answers right away and is safe to repeat.
  • At most 200 queued actions per call (and 200 listed): truncated: true means some are left (they won't run) or the list was cut; call again until it is false. After an error partway, repeating finishes the job.
  • Not covered: campaign steps, replies queued in the app, and an action created at the same moment by another call. Stop creating actions for the contact first, then cancel.

List actions

GET /v1/actions?senderId=&status=&type=&externalId=&limit=&cursor=, newest first. limit is at most 100; follow nextCursor for the next page.

Answer a reply

Replies arrive as the every_message_reply_received webhook, which carries conversation: { id, senderId } and counterpart: { name, profileUrl, pictureUrl } (the person's photo as a path on this API, never a LinkedIn URL; see Webhooks). Answer in the thread, either way:

A reply through the inbox (idempotent on clientMessageId)
curl -s -X POST "$TRYZEN_API/v1/inbox/conversations/$CONVERSATION_ID/replies" \
  -H "x-api-key: $TRYZEN_KEY" -H "content-type: application/json" \
  -d '{"text": "Thanks Jane! Does Thursday work?", "clientMessageId": "0b6f3e5e-1d0b-4a77-8f86-6c3b8c2b9f41"}'
Or a message action into the thread (status, externalId and action webhooks)
curl -s -X POST "$TRYZEN_API/v1/actions" \
  -H "x-api-key: $TRYZEN_KEY" -H "content-type: application/json" \
  -d '{"type": "message", "idempotencyKey": "<uuid>", "conversationId": "'"$CONVERSATION_ID"'",
       "text": "Thanks Jane! Does Thursday work?"}'

A thread is always answered by its own sender, so leave senderId out here too. A thread that isn't in your workspace, or sits in a private mailbox, answers 404 conversation_not_found.

Campaigns and direct actions together

If a Tryzen campaign in the workspace is currently working a person, an invite or a first message to them is refused with 409 lead_in_active_campaign: two systems contacting one person would collide. Stop or remove the person in the campaign first. Replies into a thread, views, follows, likes and connection checks are allowed.

On this page