AurionAI Docs

Webhooks

Receive real-time event notifications from the Aurion API via webhooks.

Webhooks

Webhooks notify your application in real time when events occur in Aurion — such as ticket creation, status changes, or call completions.

Register a Webhook

curl -X POST "https://apps.aurionai.net/api/v1/webhooks" \
  -H "X-API-Key: ak_live_xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://your-app.com/webhooks/aurion",
    "events": ["ticket.created", "ticket.updated", "call.completed"],
    "secret": "whsec_xxxx"
  }'

Response (201 Created):

{
  "id": "wh_abc123",
  "url": "https://your-app.com/webhooks/aurion",
  "events": ["ticket.created", "ticket.updated", "call.completed"],
  "active": true,
  "created_at": "2026-02-20T14:30:00Z"
}

List Webhooks

curl "https://apps.aurionai.net/api/v1/webhooks" \
  -H "X-API-Key: ak_live_xxxx"

Response:

{
  "webhooks": [
    {
      "id": "wh_abc123",
      "url": "https://your-app.com/webhooks/aurion",
      "events": ["ticket.created", "ticket.updated"],
      "is_active": true,
      "created_at": "2026-02-20T14:30:00Z"
    }
  ]
}

Delete a Webhook

curl -X DELETE "https://apps.aurionai.net/api/v1/webhooks/wh_abc123" \
  -H "X-API-Key: ak_live_xxxx"

Returns 204 No Content on success.

Event Types

Tickets (v1):

EventDescription
ticket.createdA new ticket was created
ticket.updatedA ticket was updated (status, priority, assignment)
ticket.closedA ticket was closed
ticket.reopenedA closed ticket was reopened
ticket.note_addedA note was added to a ticket

Conversations (v2):

EventDescription
conversation.createdA new conversation was created
conversation.updatedA conversation was updated
conversation.resolvedA conversation was resolved
conversation.assignedA conversation was assigned to a team or agent
conversation.replyA reply was added to a conversation

Calls:

EventDescription
call.startedA voice call session started
call.completedA voice call session ended
call.escalatedA call was escalated to a human agent

CSAT:

EventDescription
csat.sentA CSAT survey was sent to a customer
csat.respondedA customer submitted a CSAT rating

Contacts & Users:

EventDescription
user.createdA new user/requester was synced
contact.createdA new contact was created
contact.updatedA contact was updated

Workflows:

EventDescription
workflow.completedA workflow run completed successfully
workflow.failedA workflow run failed
workflow.approval_neededA workflow step requires approval

Webhook Payload

Each webhook delivery sends a POST request with a JSON body:

{
  "id": "evt_xyz789",
  "type": "ticket.created",
  "timestamp": "2026-02-20T14:30:00Z",
  "data": {
    "id": 1042,
    "subject": "VPN not connecting",
    "status": "open",
    "priority": "high"
  }
}

Signature Verification

Every webhook request includes an X-Aurion-Signature header containing an HMAC-SHA256 signature of the request body, signed with your webhook secret.

Always verify the signature before processing the event.

Python
import hmac
import hashlib

def verify_webhook(payload: bytes, signature: str, secret: str) -> bool:
    expected = hmac.new(
        secret.encode("utf-8"),
        payload,
        hashlib.sha256,
    ).hexdigest()
    return hmac.compare_digest(f"sha256={expected}", signature)

# In your webhook handler:
# payload = request.body (raw bytes)
# signature = request.headers["X-Aurion-Signature"]
is_valid = verify_webhook(payload, signature, "whsec_xxxx")
TypeScript
import { createHmac, timingSafeEqual } from "crypto";

function verifyWebhook(
  payload: string,
  signature: string,
  secret: string
): boolean {
  const expected = `sha256=${createHmac("sha256", secret)
    .update(payload)
    .digest("hex")}`;
  return timingSafeEqual(
    Buffer.from(signature),
    Buffer.from(expected)
  );
}

// In your webhook handler:
// payload = req.body (raw string)
// signature = req.headers["x-aurion-signature"]
const isValid = verifyWebhook(payload, signature, "whsec_xxxx");

Retry Policy

If your endpoint returns a non-2xx status code or times out (30 seconds), Aurion retries delivery with exponential backoff:

AttemptDelay
1st retry1 minute
2nd retry5 minutes
3rd retry30 minutes
4th retry2 hours
5th retry12 hours

After 5 failed retries, the event is marked as failed. You can view delivery logs and retry failed events from the admin dashboard under Configuration > Webhooks.

Delivery Logs

List recent deliveries for a webhook:

curl "https://apps.aurionai.net/api/v1/webhooks/wh_abc123/deliveries?limit=10" \
  -H "X-API-Key: ak_live_xxxx"

Each delivery log includes the request payload, response status, response body, and timing information.

Best Practices

  • Respond quickly — Return a 200 immediately, then process the event asynchronously
  • Handle duplicates — Use the id field to deduplicate events
  • Verify signatures — Always validate the HMAC signature before processing
  • Use HTTPS — Webhook URLs must use HTTPS in production

Required Scope

API key requires the webhooks:manage scope to create, update, and delete webhook subscriptions.

On this page