Webhooks
When a website asks one of your identities to verify, Joinpane can tell your own tools or a team chat as well as your phone. And an agent can have its events posted to its own server. This is what we send for each, and how to check it came from us.
Add a webhook
A webhook is yours, like your phone: it hears about the identities you're the phone owner for. In Joinpane, open Settings, then Your account, and under Sign-in codes choose Add URL.
- A public https address. Joinpane doesn't send to private networks.
- A signing secret, shown once. Your tool uses it to check each request. Changing the URL makes a new one.
- At the same moment as the app's notification, once, with 5 seconds to answer. A code doesn't wait, so we don't retry. Your account shows how the last delivery went.
- Never the code itself, nor a cookie, a password or an IP address. The code reaches the website only when a person types it.
What arrives
A POST with a JSON body. Any 2xx answer counts as delivered; we don't follow redirects.
| Header | What it is |
|---|---|
| Joinpane-Signature | t=<unix seconds>,v1=<hex>: how to check it is below. |
| Joinpane-Event | The event type, as in the body's type. |
| Joinpane-Delivery | Names this delivery, and stays the same across its retries: drop one you've seen. |
| Content-Type | application/json |
{
"type": "sign_in.code",
"id": "5f0c8a1e-6d2b-4c07-9a1f-3b7e2d9c4a10",
"createdAt": "2026-10-14T05:02:11.000Z",
"workspace": {
"slug": "northlight",
"name": "Northlight"
},
"identity": {
"id": "idn_01m4wmsm18knw0y9h145q7r4yp",
"name": "Studio uploads",
"website": "studio.example"
},
"waiting": "Ana",
"reminderFrom": null,
"expiresAt": "2026-10-14T05:12:11.000Z",
"url": "https://joinpane.com/codes/northlight/idn_01m4wmsm18knw0y9h145q7r4yp",
"text": "Studio uploads wants a sign-in code. studio.example sent a code to the phone on its account. Ana is waiting. https://joinpane.com/codes/northlight/idn_01m4wmsm18knw0y9h145q7r4yp",
"content": "The same as text, for Discord"
}| Field | What it is |
|---|---|
| type | What happened. See Event types. |
| workspace | slug and name. Null for a test. |
| identity | id, name, and the website it signs in to. Null for a test. |
| waiting | Who is waiting to get back in, if anyone. |
| reminderFrom | Someone asked you again: their name. |
| expiresAt | About when the website's code stops working. Codes usually last 10 minutes. |
| url | Where to answer it in Joinpane. |
| text | One line saying all of it, for a chat channel. |
Event types
| Type | Means |
|---|---|
| sign_in.code | The website sent a sign-in code to the phone on its account. |
| sign_in.approve | The website wants the sign-in approved in its own app. |
| sign_in.signed_out | The website signed the identity out. Someone needs to sign in again. |
| sign_in.blocked | The website refused the identity's IP address. |
| test | Send a test, from your account. |
Check it came from Joinpane
Joinpane-Signature holds when it was sent (t, in Unix seconds) and an HMAC-SHA256 of t, a full stop and the body, keyed with your signing secret (v1, in hex). Work it out from the body exactly as it arrived, before any JSON parsing, and compare in constant time.
Node.js
import { createHmac, timingSafeEqual } from "node:crypto";
// body: the request body exactly as it arrived, as a string.
export function fromJoinpane(body, signature, secret) {
const parts = Object.fromEntries(signature.split(",").map((part) => part.split("=")));
if (!parts.t || !parts.v1) return false;
// Refuse old deliveries, so a captured one can't be sent again later.
if (Math.abs(Date.now() / 1000 - Number(parts.t)) > 300) return false;
const expected = createHmac("sha256", secret).update(`${parts.t}.${body}`).digest("hex");
return (
expected.length === parts.v1.length &&
timingSafeEqual(Buffer.from(expected), Buffer.from(parts.v1))
);
}Python
import hashlib, hmac, time # body: the request body exactly as it arrived, as bytes. def from_joinpane(body: bytes, signature: str, secret: str) -> bool: parts = dict(part.split("=", 1) for part in signature.split(",")) if "t" not in parts or "v1" not in parts: return False # Refuse old deliveries, so a captured one can't be sent again later. if abs(time.time() - int(parts["t"])) > 300: return False signed = parts["t"].encode() + b"." + body expected = hmac.new(secret.encode(), signed, hashlib.sha256).hexdigest() return hmac.compare_digest(expected, parts["v1"])
Chat channels
Every delivery carries the whole message as one line in text, and again in content. So a channel's incoming webhook URL from Slack, Google Chat or Discord works as it is: paste it into Add URL and the channel shows the line, with the link to answer it. A chat channel ignores the signature.
Anyone in the channel sees which identity needs a code. Only people who can answer it in Joinpane can type one: the identity's phone owners and the people who can drive it.
More on phone owners and when we reach each of them is on the Security page.
Agent events
An agent can have its events posted to its own server as they happen: a job is due, a person answered its question, someone took over its window. It's the same news the agent can pull or wait for over MCP (see Hearing about things); a webhook saves it from asking.
Each agent has one. Admins set it on the agent's page: in Agents, open the agent, then Keys and events, and under Send events to a URL choose Add a URL. The app calls it the agent's event URL (webhook).
- An https address on the public internet, on port 443 or 8443. No user name or password in it, no private network or local name, and not a Joinpane address. We don't follow redirects.
- The events you choose. All of them by default, new kinds included, or only the ones you tick.
- A signing secret, shown once, so your server can check each event came from Joinpane.
- Tried again for a day when a delivery doesn't get through, and turned off after 3 days of nothing getting through.
- Never a cookie, a password or a sign-in code. Events carry ids, names and reasons.
job.duecarries the job's instructions, which is why the address must be https.
Only admins see the webhook, its secret's start and its deliveries.
The signing secret
When you add the address, Joinpane shows its signing secret once: jp_whsec_ and 32 letters and numbers. Put it in your server's settings. After that the agent's page shows only its start, like jp_whsec_9f3K…, to tell secrets apart.
- New secret makes another, shown once too. For 24 hours the old one keeps signing beside it, so each event carries two
v1=values, the new secret's first. Switch your server over within the day; after that only the new one signs. - Accept a request when any
v1matches, so nothing is refused while you switch. The code in Check an agent event does. - Removing the address stops the posts, and its secret stops working. The events are still there to pull for 7 days.
What an agent's webhook gets
A POST with the event as its JSON body: the same JSON the agent would pull. Any 2xx answer within 10 seconds counts as delivered, and we don't read what you send back.
| Header | What it is |
|---|---|
| Joinpane-Signature | t=<unix seconds>,v1=<hex>, with a second v1= for 24 hours after a new secret. How to check it is below. |
| Joinpane-Event | The event type, as in the body's type. |
| Joinpane-Delivery | Names this delivery, dlv_…, and stays the same across its retries and on Redeliver. To drop repeats, use the body's id: that's the event. |
| Content-Type | application/json |
| User-Agent | Joinpane-Webhooks/1 (+https://joinpane.com/docs/webhooks) |
{
"id": "aev_01k7f2x0c5a9s3d7f1g5h9j3kq",
"cursor": "1288",
"type": "job.due",
"createdAt": "2026-10-23T11:00:04.000Z",
"agent": {
"id": "agt_01k6v2q8r4m7x3c9t5b1n0hdzw",
"name": "Uploader"
},
"workspace": {
"slug": "northlight",
"name": "Northlight"
},
"data": {
"job": {
"id": "job_01k6w8d3f5g7h9j2k4m6n8p0qr",
"title": "Publish next video"
},
"run": {
"id": "run_01k7f2x0c4v8b2n6m0q4w8e2rt",
"dueAt": "2026-10-23T11:00:00.000Z",
"claimBy": "2026-10-23T11:15:00.000Z",
"how": "schedule"
},
"identity": {
"id": "idn_01k5r8m2c6x9v3t7q1b4n0wzhd",
"name": "Studio uploads",
"access": "drive"
},
"title": "Publish next video",
"instructions": "Publish the oldest video in the Ready queue, with the title and description saved with it. If the queue is empty, finish and say so.",
"claimBy": "2026-10-23T11:15:00.000Z"
}
}| Field | What it is |
|---|---|
| id | The event: aev_ and 26 letters and numbers, the same however and however often it reaches you. Dedupe on it. |
| cursor | Its place in the agent's events, the cursor pulling uses. Deliveries are at least once and can arrive out of order across retries, so order by cursor, and pull after it to catch up. |
| type | What happened. See Agent event types. |
| createdAt | When it happened. |
| agent | The agent it's for: id and name. |
| workspace | slug and name. |
| data | The type's own details, below: ids, names and reasons. job.due adds the job's instructions. |
Agent event types
Pulled, waited for over MCP or posted to a webhook, an agent gets these. Events about someone's personal identity lent to the agent never go to a webhook: only keys the identity's owner made can pull them.
- job.due
- A job's run is due. Claim it before
claimBy. See Scheduled jobs.Data:job(id,title),run(id,dueAt,claimBy,how:scheduleorrun_now),identity(id,name,access:driveorread),title,instructions,claimBy. - question.answered
- A person answered a question the agent asked, or changed an answer they gave. A change withdraws the open question that relied on it: put things right, then ask again.Data:
question(id,text),answer,answeredBy(name),identity(id,name) ornull; on a change,changed(from,withdrew: the question'sidandtext). - window.taken_over
- A person took over the agent's window. Its steps there answer
409until they hand over.Data:window(id),identity(id,name),by(name). - window.handed_back
- The person handed over, so the agent can carry on in its window.Data:
window,identity(id,name),by(name). - window.closed
- The agent's window closed.Data:
window,identity(id,name), andreason:idle,closed_by_person,access_removed,lend_ended,used_alone,usage_stopped,identity_paused,identity_deleted,signed_out,workspace_suspendedorfailed. - identity.signed_out
- An identity the agent can use was signed out. A person needs to sign in again.Data:
identity(id,name,website). - identity.signed_in
- It's signed in again.Data:
identity(id,name,website). - identity.access_changed
- What the agent may do in an identity changed: an admin changed its access, or a personal identity was lent to it, the lend was extended, or it ended.Data:
identity(id,name),change:granted,raised,lowered,removed,lent,lend_extendedorlend_ended;accessnow:drive,readornone;until, a lend's end while one runs. - download.saved
- A website gave a file in the agent's window, and it was saved to Drive.Data:
file(id,name,sizein bytes),identity(id,name),windowornull,by(kind:agentoruser,name): who was driving. - agent.paused
- The agent was paused, by a person or at its monthly budget of browser hours.Data:
reason:personorbudget;by(name) ornull;budgetHourswhen it's the budget. - agent.resumed
- The agent was resumed.Data:
reason:person,budget_raised,budget_removed,new_monthorunder_budget;by(name) ornull. - test
- Send a test, on the agent's page. It's sent whatever events the webhook takes, even while it's off, and pulling gets it too.Data: Nothing:
datais{}. - events.coalesced
- Past 10,000 events in an hour, the rest of that hour's aren't kept one by one: this one says how many there were, and counts on while the hour lasts. Pulled only. A webhook's own summary is in Bursts, below.Data:
count,since(when the hour began),kept:false.
Retries, turning off and bursts
- Tried at once, then again after 1 minute, 5 minutes, 30 minutes, 2 hours, 6 hours and 12 hours: 7 tries over about a day. Anything but a 2xx within 10 seconds is a failed try, a redirect included. Each try is signed afresh, so
tis the time of that try. - At least once, out of order sometimes. An event can arrive twice, and a retried one can land after newer ones. Drop an
idyou've seen, and order bycursor; pullingafterthe last cursor you handled reads them in order. - Turned off after 3 days. When every delivery fails for 3 days, we turn the webhook off, stop trying the deliveries still waiting, and tell the workspace's admins and whoever made the agent, in the Inbox and by email. Fix the server, send a test, then turn it back on.
- Back on, it starts from now. Nothing from while it was off is posted. Redeliver from the log, or pull: every event is kept for 7 days.
- Bursts. Past 1,000 events in an hour, the webhook gets one
events.coalescedsummary at the end of the hour instead of each.data.countsays how many, anddata.afteris the cursor to pull them from (data.keptistrue). Up to 10,000 an hour are kept for pulling; past that, pulling gets oneevents.coalescedwithkept: falseinstead.
{
"id": "dlv_01k7f9b2n6m0q4w8e2r6t0y4vz",
"type": "events.coalesced",
"createdAt": "2026-10-23T06:00:00.000Z",
"agent": {
"id": "agt_01k6v2q8r4m7x3c9t5b1n0hdzw",
"name": "Uploader"
},
"workspace": {
"slug": "northlight",
"name": "Northlight"
},
"data": {
"count": 37,
"after": "52040"
}
}Deliveries and Redeliver
Under Deliveries, the agent's page lists the last 100, newest first: the event type, when, how it went (a status code, or why there was none, like “No answer in 10 seconds.”) and the tries. A row opens to its last tries, with how long each took. Events about identities you can't open aren't listed.
- Redeliver sends a failed delivery once more, now, signed afresh. It works while the event is kept, 7 days.
- Send a test posts a
testevent at once and shows the answer, even while the webhook is off.
Check an agent event
The signature works as for sign-in webhooks: t in Unix seconds, and v1, an HMAC-SHA256 of t, a full stop and the body, keyed with the signing secret, in hex. The difference: for 24 hours after a new secret there are two v1 values, so accept the request when any of them matches. Work it out from the body exactly as it arrived, and compare in constant time. This code checks sign-in webhooks too.
Node.js
import { createHmac, timingSafeEqual } from "node:crypto";
// body: the request body exactly as it arrived, as a string.
export function fromJoinpane(body, signature, secret) {
const parts = signature.split(",").map((part) => part.split("="));
const t = parts.find(([key]) => key === "t")?.[1];
const signatures = parts.filter(([key]) => key === "v1").map(([, value]) => value);
if (!t || signatures.length === 0) return false;
// Refuse old deliveries, so a captured one can't be sent again later.
if (Math.abs(Date.now() / 1000 - Number(t)) > 300) return false;
const expected = Buffer.from(createHmac("sha256", secret).update(`${t}.${body}`).digest("hex"));
// Two v1 values for a day after a new secret: either one will do.
return signatures.some((v1) => {
const given = Buffer.from(v1 ?? "");
return given.length === expected.length && timingSafeEqual(given, expected);
});
}Python
import hashlib, hmac, time # body: the request body exactly as it arrived, as bytes. def from_joinpane(body: bytes, signature: str, secret: str) -> bool: parts = [part.split("=", 1) for part in signature.split(",") if "=" in part] t = next((value for key, value in parts if key == "t"), None) signatures = [value for key, value in parts if key == "v1"] if t is None or not signatures: return False # Refuse old deliveries, so a captured one can't be sent again later. if abs(time.time() - int(t)) > 300: return False signed = t.encode() + b"." + body expected = hmac.new(secret.encode(), signed, hashlib.sha256).hexdigest() # Two v1 values for a day after a new secret: either one will do. return any(hmac.compare_digest(expected, v1) for v1 in signatures)
Then drop an event whose id you've had already, and answer with a 2xx within 10 seconds: start slow work after answering. For job.due, what counts is claiming the run within 15 minutes.