TryzenAPI

Webhooks

Receive outcomes as signed POSTs, verify the signature, and handle retries and duplicates.

Tryzen tells you what happened by POSTing a JSON event to your URL: an invite went out, someone accepted, a reply arrived, an action failed, a sender stopped. You never poll LinkedIn, and rarely poll Tryzen.

Webhooks need a key with integrations: manage.

Create a webhook

Each webhook listens to one event type. Create one per type you need; they can share a URL.

curl -s -X POST "$TRYZEN_API/v1/webhooks" \
  -H "x-api-key: $TRYZEN_KEY" -H "content-type: application/json" \
  -d '{
    "name": "Replies",
    "url": "https://hooks.example.com/tryzen",
    "event": "every_message_reply_received"
  }'
201 Created
{ "webhook": { "id": "…", "event": "every_message_reply_received", "secretHint": "abcd", "…": "…" }, "secret": "whsec_…" }

The secret is shown only in this answer. Store it; you need it to verify every delivery.

  • campaignIds limits the webhook to some campaigns; leave it empty to get everything, including direct actions (whose campaign is null).
  • headers adds up to 10 static headers of your own to every POST (for example a routing token).
  • Targets must be public http(s) URLs (422 blocked_target).
  • GET /v1/webhooks/payload-sample?event=… returns a sample body for a type.
  • POST /v1/webhooks/{webhookId}/test sends one signed webhook_test event right away (one attempt, no retries), even while the webhook is off.

Events

For an outreach integration, subscribe to these:

EventWhen
connection_request_sentAn invite went out (from a campaign or a direct action)
connection_request_acceptedThe person accepted one of your invites
connection_request_withdrawn_or_declinedA pending invite disappeared without becoming a connection (LinkedIn doesn't say which)
message_sentA message went out: a campaign step, a direct action, a reply from the inbox, or a message the account typed on LinkedIn itself (seen at the next inbox sync)
every_message_reply_receivedAny inbound message in a sender's inbox, from a lead or not
action_failedA direct action ended failed, unknown or expired; failure says why
action_canceledA direct action was canceled before it ran (your cancel or a bulk cancel)
connection_checkedA check_connection action finished, or a reach found its invite pending and did nothing; connection.status is connected, pending or none
connection_request_withdrawnA withdraw_invite action (or a campaign's withdraw step) withdrew a pending invite
sender_status_changedA sender's status moved; senderStatus has from, to and reason. Removing a sender always sends it, with reason: "sender_removed"

Also available:

EventWhen
message_reply_receivedA person's first reply in a conversation
inmail_sent, inmail_reply_receivedAn InMail went out; the first InMail reply
voice_note_receivedA voice note arrived
viewed_profile, follow_sent, liked_postA profile view, follow or like ran
campaign_completedA campaign finished; completion.reason says why
lead_finished_without_replyA lead reached the end of a campaign sequence without replying
lead_tag_updatedA lead's tags changed
lead_autotagged_positive, lead_autotagged_negative, lead_autotagged_genericA reply was classified

An acceptance isn't tied to one action on LinkedIn's side, so connection_request_accepted carries the lead but no request. Match it on lead.id, which is the leadId of your invite action.

The request

Every delivery is a POST with these headers:

HeaderValue
content-typeapplication/json
user-agentTryzen-Webhooks/1
x-notreach-event-idThe event id (same as the body's id)
x-notreach-eventThe event type
x-notreach-attempt1 for the first try, 2 for the first retry, …
x-notreach-signaturet=<unix seconds>,v1=<hex>

Verify the signature

Check every delivery before you trust it:

  1. Read the raw request body, byte for byte. Don't parse and re-serialise the JSON first.
  2. Split x-notreach-signature on , into t=… and one or more v1=….
  3. Reject the delivery if t is more than 300 seconds from your clock (replay protection).
  4. Compute HMAC-SHA256 with the whole secret (whsec_…, prefix included) as the key, over the string `${t}.${rawBody}`, as hex.
  5. Accept if any v1 matches, compared in constant time. After you rotate a secret, the header carries one v1 per secret for 24 hours, so old and new both verify. Ignore schemes you don't know (v2=…).
verify-tryzen-signature.ts
import { createHmac, timingSafeEqual } from "node:crypto";

export function verifyTryzenSignature(
  secret: string,
  rawBody: string,
  header: string,
  nowSeconds = Math.floor(Date.now() / 1000),
): boolean {
  const parts = header.split(",").map((part) => part.trim().split("="));
  const t = Number(parts.find(([key]) => key === "t")?.[1]);
  if (!Number.isInteger(t) || Math.abs(nowSeconds - t) > 300) return false;

  const expected = createHmac("sha256", secret).update(`${t}.${rawBody}`).digest();
  return parts
    .filter(([key]) => key === "v1")
    .some(([, hex]) => {
      const got = Buffer.from(hex ?? "", "hex");
      return got.length === expected.length && timingSafeEqual(got, expected);
    });
}
verify_tryzen_signature.py
import hashlib, hmac, time

def verify_tryzen_signature(secret: str, raw_body: bytes, header: str, now: int | None = None) -> bool:
    parts = [p.strip().split("=", 1) for p in header.split(",")]
    try:
        t = int(next(v for k, v in parts if k == "t"))
    except (StopIteration, ValueError):
        return False
    if abs((now or int(time.time())) - t) > 300:
        return False
    expected = hmac.new(secret.encode(), f"{t}.".encode() + raw_body, hashlib.sha256).hexdigest()
    return any(k == "v1" and hmac.compare_digest(v, expected) for k, v in parts)

Rotating a secret is done by a person in the Tryzen app.

Answer fast, retry safely

  • Answer 2xx within 10 seconds. Anything else, or a timeout, is retried. Do slow work after you've answered (put the event on your own queue).
  • Retries: after about 1 minute, 10 minutes, 1 hour, 6 hours and 16 hours (plus up to 10% jitter): 6 attempts in about a day. After the last one the delivery becomes a dead letter.
  • Redeliver a dead letter (or any finished delivery) with POST /v1/webhook-deliveries/{deliveryId}/redeliver: same body and event id, a fresh signature, a new round of attempts. GET /v1/webhooks/{webhookId}/deliveries and GET /v1/webhook-deliveries show what was sent and how your endpoint answered.
  • Dedupe on id. The body's id (also x-notreach-event-id) is the same on every retry and redelivery. Delivery is at least once: store the ids you've handled and skip repeats.

The payload (version 1)

every_message_reply_received
{
  "id": "01JD…",
  "version": 1,
  "event": "every_message_reply_received",
  "occurredAt": "2026-11-18T10:55:00.000Z",
  "workspaceId": "…",
  "campaign": null,
  "sender": { "id": "…", "name": "Asha Rao", "profileUrl": "https://www.linkedin.com/in/asha-rao" },
  "lead": { "id": "…", "firstName": "Jane", "lastName": "Doe", "profileUrl": "https://www.linkedin.com/in/jane-doe", "…": "…" },
  "message": {
    "id": "…", "kind": "message", "channel": "linkedin", "sentAt": "…",
    "firstReply": true, "contentWithheld": false, "text": "Sounds good, Thursday?", "…": "…"
  },
  "conversation": { "id": "…", "senderId": "…" },
  "counterpart": {
    "name": "Jane Doe", "profileUrl": "https://www.linkedin.com/in/jane-doe",
    "pictureUrl": "/v1/inbox/pictures/{orgId}/{workspaceId}/{hash}.jpg"
  },
  "request": null,
  "…": "…"
}
FieldHolds
id, version, event, occurredAt, workspaceIdAlways present
campaign{ id, name }, or null for direct actions and inbox events
senderThe LinkedIn account: { id, name, profileUrl }
leadThe person: name, profile URL, headline, position, company, location, email when known
messageMessage events. text, subject and transcript only when the sender's inbox mode is full; otherwise contentWithheld: true and they're null
requestDirect action events: { id, externalId } of your action
conversationMessage events: { id, senderId }, the thread to answer
counterpartMessage events: the other participant's { name, profileUrl, pictureUrl }, also when there's no lead. pictureUrl is our stored copy of their photo (see below), else null
failureaction_failed: { code, message }
connectionconnection_checked: { status }, the relationship the check read
reachA reach action's events: { step, relationship, source, withNote }, the step it took and why
senderStatussender_status_changed: { from, to, reason }
connectLinksender_status_changed: { id, externalId } when the sender came through a connect link

Fields that don't apply to an event are null. Ignore keys you don't know: new fields are added without a version change; only renaming or removing a field would bump version.

The counterpart's photo. pictureUrl is a path on this API, never a LinkedIn URL: Tryzen fetched the photo once, through the sender's own connection, when the inbox sync saw the thread. Fetch it with your key (it needs inbox: view) and serve or cache it yourself; it answers image/jpeg, image/png or image/webp with Cache-Control: private, max-age=86400. Fetching it never reads LinkedIn. null, or a 404 picture_not_found, means no photo is stored: show initials.

curl -s "$TRYZEN_API$PICTURE_URL" -H "x-api-key: $TRYZEN_KEY" -o jane.jpg

Payloads never carry cookies, tokens, proxy details or LinkedIn member URNs. The full schema is WebhookPayloadV1 in the reference.

On this page