Skip to main content
Docs · Observability

Webhooks

Receive your organization's events as signed JSON at an HTTPS endpoint you run.

Browse docs · Observability › Webhooks
On this page
  1. Add a webhook
  2. What is sent
  3. Headers
  4. Verify the signature
  5. Responding and retries
  6. Security

A webhook sends your organization's events to an HTTPS endpoint you run, usually within a minute of each event. Use one to page someone on call, open a ticket, post to a chat channel, or feed events into your own systems. Email and the Events page are for people; a webhook is for a program.

Add a webhook

Owners and admins manage webhooks at Settings › Organization › Notifications, under Webhooks.

  1. Select Add webhook.
  2. Enter the endpoint URL. It must use https:// and resolve to a public address.
  3. Choose Every event, which includes kinds added later, or select the kinds you want.
  4. Copy the signing secret. It is shown once. If you lose it, rotate it.

Send test posts a webhook.test event, signed like a real one, and shows what your endpoint answered. An organization can have up to 10 webhooks.

What is sent

Each event is one POST with a JSON body:

json
{
  "id": "4f1c2a7e-8d3b-4c55-9a61-2b7e0f3d9c10",
  "type": "credit_exhausted",
  "created_at": "2026-09-24T10:42:07.113204+00:00",
  "severity": "critical",
  "title": "Credit is used up, so requests on Inferbase credit are being refused",
  "org_id": "a0b1c2d3-e4f5-4a6b-8c7d-9e0f1a2b3c4d",
  "project_id": null,
  "resolved_at": null,
  "link": "https://inferbase.ai/billing",
  "detail": { "available_micros": 0 }
}
FieldMeaning
idThe event's id. The same event always has the same id.
typeThe event kind, such as low_balance or model_deprecated. See Events for every kind.
severityinfo, warning or critical.
titleThe same sentence the email and the Events page show.
project_idThe project the event belongs to, or null for an organization-wide event.
resolved_atWhen the condition ended, if it had already ended when the event was sent.
linkThe page in Inferbase where a person acts on the event.
detailThe facts behind the event. Money is in micro-dollars (_micros), percentages end in _pct.

Every event is sent, including one whose condition has already ended. Email skips those; a webhook receives the full record so your system can reconcile it.

Headers

HeaderValue
Inferbase-Signaturet=<unix seconds>,v1=<signature>. See below.
Inferbase-Event-IdThe event's id.
Inferbase-Event-TypeThe event's type.
User-AgentInferbase-Webhooks/1

Verify the signature

The signature is an HMAC-SHA256, in hex, of the timestamp, a period, and the raw request body, keyed with your signing secret. Verify it before trusting the body, and use the raw bytes you received: parsing and re-encoding the JSON changes them.

python
import hashlib
import hmac
import time

def verify(secret: str, header: str, body: bytes, tolerance: int = 300) -> bool:
    parts = header.split(",")
    timestamp = parts[0].removeprefix("t=")
    if abs(time.time() - int(timestamp)) > tolerance:
        return False  # too old: a replayed request
    expected = hmac.new(secret.encode(), f"{timestamp}.".encode() + body, hashlib.sha256).hexdigest()
    return any(hmac.compare_digest(p.removeprefix("v1="), expected) for p in parts[1:])
javascript
import crypto from 'node:crypto'

function verify(secret, header, rawBody, tolerance = 300) {
  const [t, ...signatures] = header.split(',')
  const timestamp = t.slice(2)
  if (Math.abs(Date.now() / 1000 - Number(timestamp)) > tolerance) return false
  const expected = crypto.createHmac('sha256', secret).update(`${timestamp}.`).update(rawBody).digest('hex')
  return signatures.some((s) => {
    const candidate = Buffer.from(s.slice(3))
    const wanted = Buffer.from(expected)
    return candidate.length === wanted.length && crypto.timingSafeEqual(candidate, wanted)
  })
}

A header can carry more than one v1= value. After you rotate the secret, each request is signed with the new secret and, for 24 hours, the previous one too, so your receiver can switch without rejecting an event. Accept the request if any v1= matches.

Responding and retries

Answer with any 2xx status within 10 seconds. Do the work after you answer: accept the event, queue it, and return.

Any other answer, a timeout, or a failed connection counts as a failed attempt. Each event gets five attempts: the first, then retries 2 minutes, 8 minutes, 32 minutes and an hour after each failure. After the fifth the delivery is abandoned. Delivery is at least once, so the same event can arrive twice: use id to ignore a repeat.

Each webhook shows the result of its last attempt on the Notifications page: when it succeeded, or the failure. A disabled webhook receives nothing, including events queued before it was disabled.

Security

  • Only https:// URLs on public addresses are accepted. The address is checked again on every request, and a host that resolves to a private or reserved address is refused.
  • Redirects are not followed. Point the webhook at the final URL.
  • Adding, changing, rotating and deleting a webhook are recorded in the audit log.

Last updated September 24, 2026.