# Webhooks: every event, with a sample

Source: https://aicallstudio.com/docs/developers/webhooks

Every event AI Call Studio can send your server, with a sample of each, the headers, how to check the signature, and what happens when a delivery fails.

## Before you start

- A public https:// URL on your server that answers a POST quickly.
- The Developers page in your dashboard, where a webhook is added, its events picked and a test event sent.

## Steps

1. **Add a webhook**: On [Developers](/dashboard/developers), Webhooks, add your URL and pick the events it should receive. Its signing secret is shown once: store it with your other secrets.
2. **Send a test event**: Press Send test event, or send any event's sample, to check your server answers and your signature check passes. Each delivery and what your server answered is in the delivery log beside it.
3. **Check every delivery**: Work out the signature from the raw body and refuse anything that does not match, then answer 2xx at once and do the slow work afterwards. Ignore a delivery id you have already handled: a retry carries the same one.

## Should I use webhooks or ask the API?

Use webhooks for anything that should happen as soon as a call or message changes: they arrive within seconds and cost you no requests. Ask the API (list calls with a since time) to fill a gap after your server was down, because a paused webhook skips events rather than sending them later.

## Costs and what to watch

- Once a webhook is paused after repeated failures, events in between are skipped, not sent later. Resume it on the Developers page, then fetch what you missed from the calls list.
- No-code tools that cannot check the signature should treat their hook address as a password: anyone who knows it can post to it.

## Questions

### How do I verify an AI Call Studio webhook signature?

Compute sha256= plus the hex HMAC-SHA256 of the raw request body, keyed with the webhook's signing secret, and compare it in constant time with the X-Aicallstudio-Signature header. Do it before parsing the JSON.

### Is a webhook sent once per call?

Usually, but build for repeats: a delivery that does not get a 2xx in time is retried with the same X-Aicallstudio-Delivery id. A person's wrap-up after the call is a separate event, call.wrapped_up, an update of the same call.

Every endpoint, field and error: https://aicallstudio.com/docs/api