Skip to content
Browse articles
Guides

Webhooks

Get a signed HTTPS request on your own server when conversations, messages and contacts change in agent44.

Agent44Updated 3 min read

On this page

In one minute#

A webhook endpoint is a URL on your server. When something happens in your workspace's inbox (a conversation opens, closes or is assigned, a message arrives, a contact signs in), agent44 sends it a POST with a JSON event, signed so you can check it came from agent44. Use it to sync conversations into your CRM, post to a team chat, start a workflow or keep your own records.

Set endpoints up in Settings › Webhooks (workspace admins). Each endpoint picks its events and gets its own signing secret, shown once.

Events#

Type

When

conversation.created

A user started a conversation (app, web messenger or email)

conversation.closed

A teammate, the AI agent or a rule closed a conversation

conversation.reopened

A closed conversation is open again

conversation.assigned

A conversation was given to a teammate

conversation.rated

The user rated a closed conversation

message.created

A reply from the user, a teammate, the AI agent or a bot. Internal notes are never sent.

contact.created

A new user or visitor reached you for the first time

contact.identified

An anonymous visitor signed in and got your app's user id

Send test event on an endpoint's page sends a webhook.test event to that endpoint only. Conversations marked as spam, and history brought in by an importer, send no events.

The request#

POST /your/endpoint HTTP/1.1
content-type: application/json
user-agent: agent44-webhooks/1
webhook-id: 6f1c2b9e-5d4a-4c1e-9a8b-0f2e3d4c5b6a
webhook-timestamp: 1795564800
webhook-signature: v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=

{
  "id": "6f1c2b9e-5d4a-4c1e-9a8b-0f2e3d4c5b6a",
  "type": "message.created",
  "created_at": "2026-11-25T09:30:00.000Z",
  "workspace_id": "…",
  "data": {
    "message": { "id": "…", "conversation_id": "…", "author": "contact", "author_user_id": null, "body": "Hi, my purchase didn't go through", "created_at": "…" },
    "conversation": { "id": "…", "status": "open", "channel": "sdk", "app_id": "…", "contact_id": "…", "assignee_user_id": null, "team_id": null, "subject": null, "priority": false, "ai_state": "answering", "csat_rating": null, "created_at": "…", "closed_at": null }
  }
}

data holds conversation for conversation events (with rating and comment for conversation.rated), message and conversation for message.created, and contact for contact events:

{ "contact": { "id": "…", "external_user_id": "user_8f2c", "email": "ada@example.com", "name": "Ada", "identity_verified": true, "first_seen_at": "…" } }

identity_verified is true once a request named this user with a valid identity signature. Messages are plain text: never render them as HTML. Treat event bodies as customer data.

id is the same on every attempt of one event, so use it to ignore a repeat. Events can arrive out of order; use created_at and the objects' own timestamps if order matters.

Checking the signature#

The request is signed the Standard Webhooks way, so any of its libraries verifies it. By hand: compute HMAC-SHA256 over <webhook-id>.<webhook-timestamp>.<raw body>, keyed with the secret's bytes (the part after whsec_, base64-decoded), base64 it, and compare it in constant time with the value after v1, in webhook-signature. Refuse a webhook-timestamp more than five minutes from your clock.

// Node.js, with the official package: npm install standardwebhooks
import { Webhook } from "standardwebhooks";

const wh = new Webhook(process.env.AGENT44_WEBHOOK_SECRET); // whsec_…
app.post("/agent44", express.raw({ type: "application/json" }), (req, res) => {
  let event;
  try {
    event = wh.verify(req.body, req.headers); // throws if the signature or timestamp is wrong
  } catch {
    return res.status(401).end();
  }
  res.status(204).end(); // answer quickly, then do the work
  handle(event);
});

Check the signature on the raw body, before parsing it: re-encoded JSON won't match.

Answering, retries and failures#

  • Answer with any 2xx within 10 seconds. Do slow work after you've answered.

  • Anything else (another status, a timeout, a refused connection) is retried after 1 minute, 5 minutes, 30 minutes, 2, 6, 12 and 24 hours: 8 attempts over about two days. Redirects aren't followed, so point the endpoint at its final URL.

  • 410 Gone turns the endpoint off at once. So does failing for three days straight. Turn it back on from its page once it's fixed; events from while it was off aren't sent.

  • An endpoint's page lists its last 50 deliveries with how your server answered, and Send again resends any of them (with the same event id).

Rules for the URL#

The URL must be https:// on the standard port, a public domain name (no IP addresses, no localhost or internal names) and not an agent44 address. Keep tokens out of it if you can: the signature already proves the request is agent44's.

Each endpoint has its own secret. Rotate secret replaces it at once, so update your server straight after. A workspace can have up to 10 endpoints, and events are kept for 30 days.

Did this answer your question?