Skip to content
Try Free →

Webhooks

A webhook sends your server an HTTP POST the moment something happens in your workspace. Each delivery is signed with HMAC-SHA256 so you can prove it came from AskVault, and failed deliveries are retried.

Before you start

Growth+
  • Outbound webhooks need the Growth plan or above.
  • You need an HTTPS endpoint that answers with a 2xx status within 10 seconds.

Add an endpoint

  1. Open Channels & Apps, then the Developers tab.
  2. In Webhooks, select Manage, then Add endpoint.
  3. Enter your URL, pick the events and copy the signing secret.

Press Test on the endpoint to send a sample payload for an event of your choice and see your server's response. Deliveries to Slack or Discord incoming-webhook URLs are reformatted as messages for that service and are not signed.

Events

EventWhen it fires
conversation.startedA new conversation begins on any channel.
conversation.escalatedThe agent hands a conversation to a person.
conversation.resolvedA conversation is marked resolved, automatically or by a teammate.
conversation.feedbackA visitor gives thumbs up or down on a message.
message.createdAn assistant or teammate message is sent in a conversation.
lead.capturedThe lead-capture skill saves a new lead.
agent.action_triggeredA teammate runs an action from the Inbox Actions menu. Use the endpoint's action filter to receive only the ones you handle.
knowledge.gap_detectedA question your agent could not answer well keeps coming back and a new suggestion is recorded. Its fields sit at the top level, with no data object.
knowledge.sync_completedA crawl or scheduled re-read finished. The payload has the indexed, failed and retrying page counts.
knowledge.sync_failedA crawl or sync failed for good. Temporary failures are retried and not reported.

The event picker may also list a few reserved names that nothing sends yet. Subscribe only to the events in the table above.

Payload

Every event is a JSON POST:

{
"event": "lead.captured",
"timestamp": "2026-11-01T13:42:11.123Z",
"data": {
"lead_id": "lead_xxx",
"email": "[email protected]",
"name": "Jane Doe",
"conversation_id": "conv_xxx"
}
}

Delivery details travel in headers:

HeaderMeaning
X-AskVault-DeliveryA unique id for the delivery, repeated on automatic retries. Use it to drop duplicates.
X-AskVault-EventThe event name, handy for routing before you parse.
X-AskVault-Signaturesha256= followed by the hex HMAC.
X-AskVault-TimestampThe Unix time used in the signature.

Verify the signature

The signed string is the timestamp, a dot, then the raw request body. Compute it with your endpoint's secret and compare in constant time.

import { createHmac, timingSafeEqual } from 'node:crypto';
function verifyWebhook(rawBody, signature, timestamp, secret) {
const expected = 'sha256=' + createHmac('sha256', secret)
.update(`${timestamp}.`)
.update(rawBody)
.digest('hex');
const a = Buffer.from(expected);
const b = Buffer.from(signature || '');
return a.length === b.length && timingSafeEqual(a, b);
}
import hmac, hashlib
def verify_webhook(raw_body: bytes, signature: str, timestamp: str, secret: str) -> bool:
expected = hmac.new(
secret.encode(), f"{timestamp}.".encode() + raw_body, hashlib.sha256
).hexdigest()
return hmac.compare_digest(f"sha256={expected}", signature)

Use the raw bytes, not re-serialised JSON. Also reject timestamps more than a few minutes old to stop replays. You can rotate the secret from the endpoint's menu. The old secret stops working at once.

Retries and duplicates

AskVault treats any 2xx as success. It retries when your endpoint returns 5xx, times out or cannot be reached, up to 3 attempts in total, waiting longer between attempts up to 30 seconds. Each attempt waits up to 10 seconds for a response. Other 4xx responses are treated as final and are not retried, and a 410 Gone stops delivery for good.

Because retries can deliver an event twice, store the X-AskVault-Delivery values you have handled and ignore repeats. Return 200 quickly and do slow work after you have acknowledged.

Deliveries are not ordered and can arrive at the same time. Order by the timestamp and by the ids inside data, and create records from whichever event for a conversation arrives first.

The delivery log

Each endpoint has a delivery log with its most recent attempts, showing the event, the status code and your server's response. Resend a failed delivery from there after you fix your endpoint. A resend arrives with a new delivery id.

Check it worked

Use Test, then confirm your server received a request with a valid signature and that the delivery log shows a 2xx.

Send events to n8n

AskVault's events work with an n8n Webhook trigger as they are, with no extra setup.

  1. In n8n, add a Webhook node, set HTTP Method to POST and copy its Production URL.
  2. In AskVault, add an endpoint with that URL. Leave the format as Generic JSON and pick your events.
  3. Publish the workflow in n8n, then click Test in AskVault and check the run under Executions in n8n.

The Test URL only listens while you click Listen for test event, so an endpoint saved with it stops receiving events. To check the signature in n8n, hash the raw body as shown in Verify the signature: turn on Raw Body in the Webhook node's options so n8n keeps the body unparsed.

If it doesn't work

Signature mismatch. You hashed parsed JSON instead of the raw body, used the wrong secret, or left out the timestamp and the dot.

Deliveries stopped after I downgraded. Webhooks pause when your plan no longer includes them and resume when it does again.

Everything fails with 4xx. A 4xx is not retried. Fix the endpoint, then resend from the delivery log.