Overview
A webhook is an HTTPS endpoint you host. AwnCare POSTs a signed JSON event to it whenever a subscribed event occurs.
Use webhooks to sync tickets to your systems, trigger workflows, alert on new conversations, or feed a data warehouse — without polling the API.
Managing endpoints
Create and manage endpoints in the Developer Console (or via the REST API). Each endpoint has a URL, a set of subscribed events, and its own signing secret.
Save your signing secret
Event catalog
The events you can subscribe an endpoint to.
| Event | Description |
|---|---|
conversation.created | A new conversation was started (widget or integration channel). |
message.created | A message was sent in a conversation (inbound or outbound). |
ticket.created | A new support ticket was created. |
ticket.status_changed | A ticket transitioned to a new status. |
ticket.comment_created | A public reply was added to a ticket (internal notes excluded). |
csat.received | A customer submitted a satisfaction rating. |
Event envelope
Every delivery has the same envelope: a stable delivery id, the event name, a timestamp, and the event data.
Two headers accompany each delivery — the event name and the signature.
Verifying signatures
Always verify the signature before trusting a payload.
The X-AwnCare-Signature header has the form t=TIMESTAMP,v1=SIGNATURE. Compute an HMAC-SHA256 over the string made of the timestamp, a dot, then the raw request body (that is, TIMESTAMP.RAWBODY) using your endpoint's secret, and compare it to v1 in constant time. Always verify against the raw request body, before JSON parsing.
Node.js (Express + crypto)
PHP (hash_hmac)
Retries & failures
Delivery is at-least-once. Failed deliveries are retried with backoff.
- Backoff schedule after each failed attempt: 1 minute, then 5 minutes, then 30 minutes.
- Up to 4 attempts total (1 initial + 3 retries) before a delivery is given up on.
- An endpoint that reaches 10 consecutive failures is automatically disabled.
- Retries resend a byte-identical body with the same delivery id, so you can dedupe on it.
Best practices
A few rules keep your integration robust under retries and at scale.
Be idempotent
The same event may arrive more than once. Dedupe on the envelope id.
Acknowledge fast
Return 2xx immediately and do heavy work asynchronously; slow responses count as failures and trigger retries.
Verify, then parse
Check the signature against the raw body before parsing JSON or acting on the event.
Use HTTPS
Endpoints must be HTTPS in production so payloads and signatures stay confidential in transit.