# Webhooks

> Receive a notification when a recording is created, edited, or deleted.

To get recording text on your server, add a **Send webhook** action to a
[workflow](/docs/workflows); see [Text webhooks](#text-webhooks) below.
Settings has no page for event-only subscriptions. Create them with
`POST /webhooks`, using an API key with `webhooks:manage` and `events:read` or a
signed-in account session; `GET /events` catches up without one. Choose a public
HTTPS URL and the events you need:

```json
{
  "url": "https://your-receiver.com/italic",
  "events": ["recording.created", "recording.updated", "recording.deleted"]
}
```

Creation returns the webhook and a one-time signing `secret`. Store the secret
before dismissing it. Send an `Idempotency-Key` header to retry a create safely:
the retry returns the same webhook and secret with `replayed: true`.
`GET /webhooks` lists active event subscriptions; `DELETE /webhooks/{id}`
disables a subscription. Both need `webhooks:manage`. Webhooks that workflows
send to are not listed here: they change with their workflow. An account can
have ten active webhooks, counting the ones its workflows send to.

## Notifications [#notifications]

```json
{
  "id": "123",
  "type": "recording.created",
  "recordingId": "C5A80766-9674-4EE2-B238-63AC6DD51495",
  "revision": 1,
  "createdAt": 1790121600000
}
```

Notifications contain an ID and change details. Fetch the current recording
with a key that has `recordings:read`. They contain no transcript or audio.
Created means the recording text item was saved; a pending local capture alone
does not emit it. Notifications include changes made by existing app clients.

Verify the `Italic-Signature` header before processing. It has the form
`t=<unix-seconds>,v1=<hex-hmac>`. Compute HMAC-SHA256 with your webhook secret over
`timestamp + "." + rawRequestBody`, compare in constant time, and reject timestamps
more than five minutes from your clock. Use the original bytes, not reserialized JSON.

```js
import {createHmac, timingSafeEqual} from 'node:crypto';

export function verify(rawBody, signature, secret) {
  const match = /^t=(\d+),v1=([a-f0-9]{64})$/.exec(signature ?? '');
  if (!match || Math.abs(Date.now() / 1000 - Number(match[1])) > 300) return false;
  const expected = createHmac('sha256', secret)
    .update(match[1] + '.').update(rawBody).digest();
  return timingSafeEqual(expected, Buffer.from(match[2], 'hex'));
}
```

<LivePreview kind="webhooks" caption="Switch between metadata and text webhook events, edit the secret or transcript, and inspect the live HMAC-SHA256 Italic-Signature header." />

Acknowledge with a 2xx response. Failures retry up to eight attempts. Delivery can
repeat or arrive out of order, so deduplicate by event ID and avoid assuming order.
The event ID is the body's `id`, a string, and each delivery repeats it in an
`Italic-Event-Id` header.
Disabling a subscription cancels queued sends; an in-flight request may finish.
To rotate one secret, disable that subscription and create a replacement.

## Catch up with events [#catch-up-with-events]

If you need polling or recovery, use `GET /events?limit=100`. It returns `events`
and `nextCursor`. After processing a page, save `nextCursor` and supply it as
`cursor` on the next request. An empty page means you are caught up. Cursors have
gaps and should be treated as opaque values. Events remain until account deletion.
An event's `id` is a number in this feed but a string in a webhook body, so
compare IDs as strings.

## Text webhooks [#text-webhooks]

Workflows send recording text with a **Send webhook** action. These deliveries are separate
from the event subscriptions above and do not appear in the v2 webhook list.

Send recording text with a workflow's **Send webhook** action ([Workflows](/docs/workflows)):
its trigger's phrase, capture input and recording type choose what
gets sent, or leave them empty to send every recording. A recording's detail
screen shows its delivery status. Webhooks do not upload or deliver audio. Clips keep
only text; updated recording clients also retain source audio locally. Memos retain it
locally.

<LivePreview kind="workflow-builder" variant="webhook" caption="A workflow that sends meeting notes to your server: Write with AI, then Send webhook with what it wrote." />

This guide describes the existing `/api/v1` interface. Use
`https://app.italic.com/api/v1` as the base URL for relative endpoints below.
For simple v2 change notifications, see [Notifications](/docs/guides/webhooks#notifications).

The v1 event feed covers writes from current and compatibility clients:
`recording.created`, `recording.updated`, `recording.transcript_ready`, and
`recording.deleted`. Created means the recording text resource was inserted;
metadata-only pending captures do not emit a created event. Transcript-ready
also fires when nonempty transcript text changes.

`GET /events?after=0&limit=100` returns account-scoped events, `cursor`, and
`hasMore`. Persist the returned cursor after processing the page. IDs are
monotonic but can have gaps. The feed currently remains until account deletion.

Webhooks are created by workflows: add a **Send webhook** action to a workflow
(a workflow with only Send webhook actions and no trigger condition
sends every recording's text). Settings no longer creates event-only
subscriptions. A public HTTPS endpoint on port 443 is
required. Private/local addresses, credentials in the URL, and redirects are
rejected. An account can have ten active webhooks. The signing secret is
shown once; retain it securely before dismissing it.

### Verify before processing [#verify-before-processing]

The default `event` payload contains `id`, `type`, `recordingId`, `revision`, and
`createdAt`. Existing subscriptions retain this shape. It contains no transcript,
audio, or account bearer token. Fetch current content using a separately
authorized read token when needed.

The `Italic-Signature` header is `t=<unix-seconds>,v1=<hex-hmac>`. Compute
HMAC-SHA256 with the webhook secret over the exact UTF-8 bytes of
`timestamp + "." + rawRequestBody`. Compare the digest in constant time and
reject timestamps more than five minutes from your server clock. Do not parse
and reserialize the body before verification. Deduplicate by event `id`.

### Delivery behavior [#delivery-behavior]

Delivery is at least once and may arrive out of order. Each minute a scheduled
worker sends up to 100 due deliveries in batches of 20, with four concurrent
requests and a five-second HTTP timeout. Each batch takes every account's oldest
due delivery before any account's second, and no account receives more than 30
deliveries in one run. Any 2xx response acknowledges the event. Other statuses
and network failures retry up to eight attempts with exponential backoff
starting at one minute. Deliveries are persisted before sending; process crashes
can produce a repeat. Delivered and exhausted deliveries, their stored text payloads, and text
revisions are kept until explicitly deleted. Use the event feed to catch up independently of webhooks.

Disabling a subscription cancels queued deliveries; an already dispatched request
may still arrive. To rotate a signing secret, disable the subscription and
create a replacement.

### Text payloads [#text-payloads]

Workflows' **Send webhook** actions always send text. To create a text
subscription without a workflow, call `POST /webhooks` with
`payloadMode: "text"` using a signed-in account session.
Text deliveries include an immutable snapshot of the
selected revision. Retries retain the original body even if the recording was
edited. Bodies exclude audio, coordinates, local files and credentials.

```json
{
  "id": "123",
  "eventId": "123",
  "type": "recording.transcript_ready",
  "recordingId": "C5A80766-9674-4EE2-B238-63AC6DD51495",
  "revision": 1,
  "createdAt": 1790164800000,
  "kind": "clip",
  "title": "Parser fix",
  "transcript": "Codex fix the parser",
  "summary": "",
  "recordedAt": 1790164790000,
  "fetchUrl": "https://app.italic.com/api/v1/recordings/C5A80766-9674-4EE2-B238-63AC6DD51495",
  "command": "fix the parser"
}
```

`fetchUrl` requires separate authentication and returns the current revision.
It is not a public download or a signed credential. Inline text is limited to
262,144 characters across `transcript` and `summary`, filled in that order.
Longer text is cut at that limit and the body adds `"truncated": true`; fetch the
full recording from `fetchUrl`. A capture's `command` is taken from the
delivered transcript when the request is sent. Queued text and a manual send's `Idempotency-Key` are kept until explicitly deleted; it counts toward the account's storage quota. Deletion events contain
empty text and null kind/capture time. Deleting a recording erases its stored
delivery text and cancels unstarted text deliveries. Previously delivered text
is under the receiver's control.

### Capture rules are workflows [#capture-rules-are-workflows]

A workflow's trigger replaced capture rules. A Send webhook action sends the
recording's first nonempty transcript when the workflow's trigger matches, with
this payload plus `workflow` (`{id, name}`), the action's filled-in `message`
when it has one (for example what a Write with AI action wrote), and, for a
matched phrase, `trigger` (`{phrase, match}`). Only a phrase matched at the
start also adds `command`.

A phrase matched **at the start** works as a prefix did: it matches the
transcript's first whole words, ignoring case and punctuation. `Hey Italic`
matches "Hey, Italic, remind me", but `log` does not match "logistics update".
`command` is the text after the matched words, without leading spaces or
punctuation. The transcript is preserved up to the inline text limit.

Every condition of the trigger must match. A recording reaches each webhook at
most once, however many workflows send to it. Workflows apply to app/device
recordings admitted after the workflow was created (or turned back on). Later
edits and MCP/API imports do not trigger them. Input conditions wait up to an
hour for authoritative capture metadata, including when it arrives after the
transcript.

`POST /webhooks` still accepts `rules` from clients that predate workflows:

```json
{
  "url": "https://your-receiver.com/italic",
  "events": ["recording.transcript_ready"],
  "payloadMode": "text",
  "rules": {"prefix": "Codex", "captureInput": "hold", "kind": "clip"}
}
```

It creates the webhook and a workflow that sends to it (prefix matched at the
start). An account with 20 workflows gets `409 workflow_limit` and no webhook.
`GET /webhooks` lists such a webhook with `rules` and the `workflows`
that send to it. Subscriptions without rules keep their revision-based event
behavior.

### Manual delivery and status [#manual-delivery-and-status]

A recording's delivery status is under **Webhook deliveries** on iPhone and
**Webhook delivery status…** in its Share menu on the web. Set up webhooks in
a workflow's **Send webhook** action; event-only subscriptions have no
Settings page ([Webhooks](/docs/guides/webhooks)). Manual
sends use the signed-in session API:

```http
POST /api/v1/recordings/{id}/deliveries
Idempotency-Key: send-2026-09-23-1
Content-Type: application/json

{"webhookId":"subscription-id","expectedRevision":3}
```

Manual sends bypass automatic rules and preserve the subscription's payload mode.
The event type is `recording.manual`, its ID begins with `manual_`, and it is not
added to the recording-change feed. Reuse the same key and selection after a
network failure; keys are remembered until explicitly deleted. A stale revision is rejected, and disabled subscriptions cannot
receive new sends. `GET /api/v1/recordings/{id}/deliveries` returns statuses and
pending capture evaluations. Pending transcription, waiting for capture input,
queued, delivered, failed and disabled are distinct states.

**Delivered** means only that the receiver returned 2xx. The receiver owns
starting, authorizing and tracking any downstream agent work. For each
subscription, deduplicate on the payload's `id` before starting a task.

### Signature verification example (Node.js) [#signature-verification-example-nodejs]

```js
import {createHmac, timingSafeEqual} from 'node:crypto';

export function verify(rawBody, signature, secret) {
  const match = /^t=(\d+),v1=([a-f0-9]{64})$/.exec(signature ?? '');
  if (!match || Math.abs(Date.now() / 1000 - Number(match[1])) > 300) return false;
  const expected = createHmac('sha256', secret)
    .update(match[1] + '.').update(rawBody).digest();
  return timingSafeEqual(expected, Buffer.from(match[2], 'hex'));
}
```

