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"
}'{ "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.
campaignIdslimits the webhook to some campaigns; leave it empty to get everything, including direct actions (whosecampaignisnull).headersadds 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}/testsends one signedwebhook_testevent right away (one attempt, no retries), even while the webhook is off.
Events
For an outreach integration, subscribe to these:
| Event | When |
|---|---|
connection_request_sent | An invite went out (from a campaign or a direct action) |
connection_request_accepted | The person accepted one of your invites |
connection_request_withdrawn_or_declined | A pending invite disappeared without becoming a connection (LinkedIn doesn't say which) |
message_sent | A 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_received | Any inbound message in a sender's inbox, from a lead or not |
action_failed | A direct action ended failed, unknown or expired; failure says why |
action_canceled | A direct action was canceled before it ran (your cancel or a bulk cancel) |
connection_checked | A check_connection action finished, or a reach found its invite pending and did nothing; connection.status is connected, pending or none |
connection_request_withdrawn | A withdraw_invite action (or a campaign's withdraw step) withdrew a pending invite |
sender_status_changed | A sender's status moved; senderStatus has from, to and reason. Removing a sender always sends it, with reason: "sender_removed" |
Also available:
| Event | When |
|---|---|
message_reply_received | A person's first reply in a conversation |
inmail_sent, inmail_reply_received | An InMail went out; the first InMail reply |
voice_note_received | A voice note arrived |
viewed_profile, follow_sent, liked_post | A profile view, follow or like ran |
campaign_completed | A campaign finished; completion.reason says why |
lead_finished_without_reply | A lead reached the end of a campaign sequence without replying |
lead_tag_updated | A lead's tags changed |
lead_autotagged_positive, lead_autotagged_negative, lead_autotagged_generic | A 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:
| Header | Value |
|---|---|
content-type | application/json |
user-agent | Tryzen-Webhooks/1 |
x-notreach-event-id | The event id (same as the body's id) |
x-notreach-event | The event type |
x-notreach-attempt | 1 for the first try, 2 for the first retry, … |
x-notreach-signature | t=<unix seconds>,v1=<hex> |
Verify the signature
Check every delivery before you trust it:
- Read the raw request body, byte for byte. Don't parse and re-serialise the JSON first.
- Split
x-notreach-signatureon,intot=…and one or morev1=…. - Reject the delivery if
tis more than 300 seconds from your clock (replay protection). - Compute HMAC-SHA256 with the whole secret (
whsec_…, prefix included) as the key, over the string`${t}.${rawBody}`, as hex. - Accept if any
v1matches, compared in constant time. After you rotate a secret, the header carries onev1per secret for 24 hours, so old and new both verify. Ignore schemes you don't know (v2=…).
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);
});
}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
2xxwithin 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}/deliveriesandGET /v1/webhook-deliveriesshow what was sent and how your endpoint answered. - Dedupe on
id. The body'sid(alsox-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)
{
"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,
"…": "…"
}| Field | Holds |
|---|---|
id, version, event, occurredAt, workspaceId | Always present |
campaign | { id, name }, or null for direct actions and inbox events |
sender | The LinkedIn account: { id, name, profileUrl } |
lead | The person: name, profile URL, headline, position, company, location, email when known |
message | Message events. text, subject and transcript only when the sender's inbox mode is full; otherwise contentWithheld: true and they're null |
request | Direct action events: { id, externalId } of your action |
conversation | Message events: { id, senderId }, the thread to answer |
counterpart | Message 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 |
failure | action_failed: { code, message } |
connection | connection_checked: { status }, the relationship the check read |
reach | A reach action's events: { step, relationship, source, withNote }, the step it took and why |
senderStatus | sender_status_changed: { from, to, reason } |
connectLink | sender_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.jpgPayloads never carry cookies, tokens, proxy details or LinkedIn member URNs. The full schema is
WebhookPayloadV1 in the reference.