Webhooks
On the Agency plan, Julexis can call a URL of yours whenever something happens in your workspace: a post is published, a client approves, a social connection drops. Your own tools hear about it without anyone opening Julexis — a Slack message, a row in your reporting sheet, a ticket in your project tracker, a notification in your client portal.
Add a webhook
Go to Settings → Integrations and add an endpoint:
- URL — where we send the calls. It must be
httpsand reachable from the internet. - Name (optional) — a label for yourself, so you recognise the endpoint later.
- Events — tick the ones you care about. We only send those.
Press Add webhook and the panel shows the signing secret for that endpoint. Copy it into your receiver: it is how you check that a call is really from us. You can show it again, copy it, or regenerate it at any time — regenerating it invalidates the old one immediately.
You can keep up to five endpoints, each with its own events and secret, so a staging receiver and a live one never share a key.
Tip
Press Send test event before you wire anything up. It queues a ping to that endpoint, which leaves within a minute, and the result appears in the delivery log below, with the HTTP code your server answered.
The four events
post.published— a scheduled post went out to a network, successfully.post.approved— your client approved a single post on their review page.plan.approved— every post in a plan is approved, whether the client pressed "Approve plan" or simply approved the last post of the plan.connection.lost— a client's social connection stopped working and needs reconnecting.
post.published fires once per network, so a post that goes to Instagram and Facebook sends two
events. Events only exist while you are on the Agency plan: if the plan changes, Julexis stops
sending without you having to switch anything off.
What a call looks like
Every call is a POST with a JSON body and these headers:
X-Julexis-Event— the event name, for examplepost.published.X-Julexis-Delivery— a stable id for this delivery. A retry repeats the same id, so this is what you deduplicate on.X-Julexis-Timestamp— Unix seconds, the moment we signed the call.X-Julexis-Attempt— which attempt this is, starting at 1.X-Julexis-Signature—sha256=<hex>, the signature described below.
The body always has the same five fields, with the event's own details inside data:
{
"id": "8f1c0e7a-...",
"event": "post.published",
"created_at": "2026-10-28T09:12:04.411Z",
"attempt": 1,
"data": {
"post_id": "4c2a...",
"plan_id": "91bd...",
"client": { "id": "a07f...", "name": "Northside Dental" },
"platform": "instagram",
"published_at": "2026-10-28T09:12:01.980Z",
"external_post_id": "17912...",
"post_url": "https://www.instagram.com/p/...",
"caption": "Three things we wish every patient knew...",
"media_count": 2
}
}
post.approved
"data": {
"post_id": "4c2a...",
"plan_id": "91bd...",
"plan_name": "November — awareness",
"client": { "id": "a07f...", "name": "Northside Dental" },
"approved_at": "2026-10-28T09:20:11.004Z",
"approved_posts": 3,
"total_posts": 8,
"plan_completed": false
}
approved_posts and total_posts let you show progress ("3 of 8 approved") without asking us for
the plan. plan_completed is true on the approval that finishes the plan — the same moment that
also sends plan.approved.
plan.approved
"data": {
"plan_id": "91bd...",
"plan_name": "November — awareness",
"client": { "id": "a07f...", "name": "Northside Dental" },
"approved_at": "2026-10-28T09:41:52.233Z",
"total_posts": 8,
"source": "approve_plan_button"
}
source is approve_plan_button when the client pressed the button, and last_post_approved when
the plan completed because they approved its last post. You get the event once per plan either way.
connection.lost
"data": {
"client": { "id": "a07f...", "name": "Northside Dental" },
"platform": "facebook",
"reason": "The Facebook connection has expired. Reconnect the account to keep publishing.",
"error_code": "facebook_token_expired",
"source": "token-refresh",
"occurred_at": "2026-10-28T03:15:00.120Z",
"reconnect_url": "https://julexis.com/clients/a07f..."
}
One event per client, network and day: a connection that stays broken does not call you every
hour. source tells you how we found out: token-refresh and health-check are our own checks, which catch it before a post is due; publish-fail-fast means a post could not go out. reconnect_url opens the client's page, where the connection can be restored.
Verify the signature
The signature is the HMAC SHA-256 of <timestamp>.<raw body>, using that endpoint's signing
secret, where the timestamp is the one in X-Julexis-Timestamp. Sign the raw body as it
arrived — not a re-serialised copy of the parsed JSON, which would change spacing and break the
comparison.
const signature = req.header('X-Julexis-Signature'); // sha256=<hex>
const timestamp = req.header('X-Julexis-Timestamp');
const expected = 'sha256=' + crypto
.createHmac('sha256', YOUR_SECRET)
.update(timestamp + '.' + rawBody)
.digest('hex');
if (!crypto.timingSafeEqual(Buffer.from(signature), Buffer.from(expected))) return res.sendStatus(401);
if (Math.abs(Date.now() / 1000 - Number(timestamp)) > 300) return res.sendStatus(401);
res.sendStatus(200);
Rejecting anything older than five minutes protects you from a captured call being replayed later.
Watch out
Answer with any 2xx status as soon as you have the call, and do your work afterwards. We wait
10 seconds for an answer; a receiver that does its processing first and answers late looks like
a failure and gets the same call again.
Retries, and when we switch an endpoint off
Anything that is not a 2xx — an error code, a timeout, a server that does not answer — is retried
five times in all, waiting 1 minute, 5 minutes, 30 minutes, 2 hours, then 2 hours. Because a
retry repeats the X-Julexis-Delivery id, a receiver that deduplicates on it is safe even if it
did process a call it answered too late.
After ten failed deliveries in a row, Julexis disables the endpoint and sends you a notification. Nothing is lost that was already delivered; deliveries still queued for that endpoint are closed as failed. Fix your receiver, then switch the endpoint back on from the same panel — the failure count resets.
The delivery log
The panel lists the recent deliveries for all your endpoints: the event, the status, the HTTP code your server answered, how long it took, and for anything still queued, when the next attempt is due. A delivery that ran out of attempts has a Retry button, which puts it back in the queue immediately with a fresh set of attempts.
The log keeps 30 days. It is also the honest answer to "the calls never arrive": if a row says
delivered with HTTP 200, the call reached your server and it accepted it.
When something is wrong
The URL is refused when I save it. We only accept https addresses that are reachable from the
internet, without a username or password in the URL. localhost, private ranges and internal
hostnames are refused — including a public hostname that later resolves to a private address, which
we check again on every delivery.
The signature never matches. Almost always the body was re-serialised before signing, or the
timestamp was left out of the signed string. Sign exactly timestamp + "." + rawBody.
Some events are missing. Check the endpoint's ticked events, and that it is still enabled. Also
remember post.published only fires for posts Julexis published itself — a post you published by
hand on the network does not produce an event.
Everything stopped at once. Webhooks are part of the Agency plan: if the subscription changed, sending stops by design.