# Recordings

> Recordings are audio inputs transformed into Clips or Memos.

## From recording to Clip or Memo [#from-recording-to-clip-or-memo]

A **recording** is the common audio input. The app processes it into a **Clip**
or a **Memo**, using the selected input mapping:

| Result        | Intended use                        | What remains                                           |
| ------------- | ----------------------------------- | ------------------------------------------------------ |
| Clip (`clip`) | Short bursts, commands, quick notes | Text plus source audio kept locally by updated clients |
| Memo (`memo`) | Longer recordings and notes         | Text plus audio stored locally                         |

Text syncs to the cloud for both. The API does not store audio. Duration is an
intended use, not an automatic classification rule. Recording is the shared
resource name; each recording has the type `clip` or `memo`.

New recording IDs are UUIDs. UUID spellings cannot create separate recordings
by changing letter case. Epoch-millisecond timestamps must be integers from
zero through `8640000000000000`, the supported date range. Writes are checked
against the final stored document, including preserved capture metadata.

Existing legacy records remain readable. Clients must use revision preconditions
to change existing content. A legacy sync change without `expected_revision`
can create a new UUID recording, but cannot replace or delete an existing one.

## The recording object [#the-recording-object]

Create, read, and edit responses use the same `recording` object:

```json
{
  "recording": {
    "id": "C5A80766-9674-4EE2-B238-63AC6DD51495",
    "type": "memo",
    "title": "Planning",
    "transcript": "Discuss the next release.",
    "summary": "",
    "recordedAt": 1790121600000,
    "updatedAt": 1790121600000,
    "revision": 1,
    "status": "ready",
    "pinned": false,
    "audio": []
  }
}
```

`type` is `clip` or `memo`. A recording from a device includes `deviceId` (the device's ID from `GET /devices`) and `deviceName` (its custom name when renamed, otherwise its default name).
An import can include an optional `externalId` from your own system.
Timestamps are Unix milliseconds.

`status` tells you whether text is `pending`, `transcribing`, `ready`,
`no_speech`, or `failed`. The app reports transcription progress. Saving
nonempty transcript text makes the recording ready; this API does not start
transcription. A pending app capture cannot be edited until the app saves it.

## Create and retry [#create-and-retry]

`POST /recordings` accepts `type` plus optional `title`, `transcript`, `summary`,
`recordedAt`, `externalId`, `audio`, and `deviceId` (a [custom device](#custom-devices)). Include `Idempotency-Key` on every create.
Retry with the same key and body to recover the saved result without duplicate
items or overwritten edits. A conflicting body returns `409`; retrying a deleted
recording returns `410`.

If you provide `externalId`, repeated imports of that ID with the same body also
reuse the existing recording. Retry keys and external IDs are scoped to the
integration associated with your key. A newly created key has a new integration
identity; keep the original key for retries of earlier imports.

A key with create or edit permission but no read permission receives only
`{ "recording": { "id": "…", "revision": 1 } }`. It cannot retrieve text later
added by the account owner.

## Edit and delete [#edit-and-delete]

Read `GET /recordings/{id}` and copy its `ETag` response header into `If-Match`.
Then send only the fields you want to change:

```http
PATCH /api/v2/recordings/C5A80766-9674-4EE2-B238-63AC6DD51495
If-Match: "1"
Content-Type: application/json

{"title":"Release planning","pinned":true}
```

Editable fields are `title`, `transcript`, `summary`, and `pinned`.
A recording's type and capture identity stay fixed. `DELETE /recordings/{id}`
also requires `If-Match`. A newer edit returns `412`; read again and reconcile
before retrying. A missing `If-Match` returns `428`.

## Search [#search]

`GET /recordings` accepts `type`, `q`, `deviceId`, `status`, `from`, and `to`.
`q` matches every word against the title, summary and transcript, ignoring case
and accents and allowing small typos in longer words. `from` and `to` are
inclusive Unix milliseconds. Results are newest first by capture time. Set
`limit` up to 100 (the default is 50) and pass `nextCursor` as `cursor` to
continue with the same filters; `null` means the last page. A search page can
hold fewer results than `limit`, or none, and still return a `nextCursor`.

For the latest clip, use `GET /recordings?type=clip&limit=1`. Check its `status`:
it may still be processing. Pagination reflects current data, not a frozen snapshot.

## Local audio [#local-audio]

For `type: "memo"`, creation may include local file references:

```json
{
  "type": "memo",
  "transcript": "Meeting notes.",
  "audio": [{"clientId":"my-phone","fileId":"audio-123"}]
}
```

These are opaque IDs in your client's local store. They are optional and do not
upload the file. Paths, audio bytes, and download URLs are not accepted. The
response includes the last reported available references; it cannot prove an
offline client's file is still present. Italic cannot play or remove that local
file through this API.

The public v2 API currently returns `audio: []` for Clips and does not accept
Clip audio references on creation. This is a metadata-interface limitation,
not a retention rule: updated recording clients keep source audio locally.
A pending or failed input is not a completed Clip. Client transfer and cleanup
reports remain part of the app protocol.

## Errors [#errors]

Errors contain `error.code` and `error.message`. The `X-Request-Id` header identifies
a request for support. JSON requests are limited to 1,500,000 bytes.

## Device settings [#device-settings]

For Sudo, Dex and all 13 supported [3rd Party devices](/docs/third-party-devices),
the app decides whether a recording becomes a Clip or a Memo from these
settings; the device reports the input and supplies audio. Glyph's mic button
sets each recording's type itself, and its `recordButton` setting applies only
to a recording that doesn't.

`GET /devices` returns your account's devices with `id`, `name` (the custom name when renamed, otherwise `defaultName`), `defaultName`, `customName`, and `model`.
Sudo uses the existing model identifier `ring`. Use the returned device ID with
`GET /devices/{id}/settings`:

```json
{
  "settings": {
    "inputs": {
      "hold": "clip",
      "doubleTap": "memo",
      "tripleTap": "memo",
      "appRecord": "memo"
    }
  }
}
```

Only the inputs supported by that device are returned. Each value is `clip` or
`memo`. Sudo's double-tap and triple-tap choices are independent.

| Device                                                                                         | Supported inputs                                                                                                  |
| ---------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
| Sudo (`ring`)                                                                                  | `hold`, `doubleTap`, `tripleTap`, `appRecord`                                                                     |
| Glyph (`glyph`)                                                                                | `recordButton`, `appRecord`                                                                                       |
| Dex (`dex`)                                                                                    | `recordButton`, `appRecord`                                                                                       |
| [FoloToy Passport](/docs/third-party-devices/passport) (`passport`)                                 | `pushToTalk` (Hold B), `recordButton` (Tap B)                                                                     |
| [Waveshare AMOLED 1.75C](/docs/third-party-devices/waveshare) (`waveshare`)                         | `pushToTalk` (Save Clip on screen), `recordButton` (Save Memo on screen / BOOT)                                   |
| [M5Stack StackChan](/docs/third-party-devices/m5stack-stackchan) (`m5stack-stackchan`)              | `pushToTalk` (Hold top of head / Save Clip on screen), `recordButton` (Tap top of head / Save Memo on screen)     |
| [M5Stack CoreS3](/docs/third-party-devices/m5stack-cores3) (`m5stack-cores3`)                       | `pushToTalk` (Save Clip on screen), `recordButton` (Save Memo on screen)                                          |
| [M5Stack StopWatch](/docs/third-party-devices/m5stack-stopwatch) (`m5stack-stopwatch`)              | `pushToTalk` (Hold blue button B / Save Clip on screen), `recordButton` (Tap blue button B / Save Memo on screen) |
| [M5Stack Cardputer-Adv](/docs/third-party-devices/m5stack-cardputer-adv) (`m5stack-cardputer-adv`)  | `pushToTalk` (Hold GO or Space), `recordButton` (Tap GO or Space)                                                 |
| [M5Stack StickS3](/docs/third-party-devices/m5stack-sticks3) (`m5stack-sticks3`)                    | `pushToTalk` (Hold front button), `recordButton` (Tap front button)                                               |
| [Waveshare AMOLED 2.06](/docs/third-party-devices/waveshare-amoled-2_06) (`waveshare-amoled-2_06`)  | `pushToTalk` (Save Clip on screen / Hold BOOT), `recordButton` (Save Memo on screen / Tap BOOT)                   |
| [Waveshare e-Paper 1.54](/docs/third-party-devices/waveshare-epaper-1_54) (`waveshare-epaper-1_54`) | `pushToTalk` (Hold BOOT), `recordButton` (Tap BOOT)                                                               |
| [ESP32-S3-BOX-3](/docs/third-party-devices/espressif-s3-box-3) (`espressif-s3-box-3`)               | `pushToTalk` (Save Clip on screen / Hold BOOT), `recordButton` (Save Memo on screen / Tap BOOT)                   |
| [Atom EchoS3R](/docs/third-party-devices/m5stack-atom-echos3r) (`m5stack-atom-echos3r`)             | `pushToTalk` (Hold top button), `recordButton` (Tap top button)                                                   |
| [FoloToy MagicBox](/docs/third-party-devices/folotoy-magicbox) (`folotoy-magicbox`)                 | `pushToTalk` (Hold Talk button KEY 0), `recordButton` (Tap Talk button KEY 0)                                     |
| [ESP32-S3 + INMP441](/docs/third-party-devices/espressif-headless-s3) (`espressif-headless-s3`)     | `pushToTalk` (Hold BOOT / PTT button), `recordButton` (Tap BOOT / PTT button)                                     |

`recordButton` means a physical record button, tapping a 3rd Party device's
primary button, or choosing Save Memo on screen, and is not accepted for Sudo.
`appRecord` means recording started from the app.

To change a choice, copy the GET response's `ETag` into `If-Match` and send the
changed inputs to `PATCH /devices/{id}/settings`:

```http
PATCH /api/v2/devices/device-id/settings
If-Match: "etag-from-get"
Content-Type: application/json

{"inputs":{"tripleTap":"clip"}}
```

Hold and push to talk default to Clip. Double tap, triple tap, record-button,
and app-started inputs default to Memo. Choose only the inputs returned for your device.

Settings sync across the account. Offline phones pick them up when they sync.
Changes apply to future captures; existing recordings keep their type.
A `412` response means the settings changed: read them again before editing.
These settings do not pair devices, start remote recording, or access audio.

## Custom devices [#custom-devices]

Italic's apps connect to [Sudo](/docs/devices/sudo), [Dex](/docs/devices/dex),
[Glyph](/docs/devices/glyph) and supported [3rd Party devices](/docs/third-party-devices)
themselves. A device of your own, such as a recorder, a wearable or a script, is
a [custom device](/docs/custom-devices): Italic doesn't connect to it, so whatever
runs on it sends each recording to this API. The apps list it under **Custom**
in Devices, and show its name on everything it records.

Add one with `POST /devices` and a key that has `settings:write`. A person can
also add one in the apps, which shows its ID.

```http
POST /api/v2/devices
Content-Type: application/json

{"name":"Kitchen recorder"}
```

```json
{
  "device": { "id": "custom_0123456789abcdef0123456789abcdef", "name": "Kitchen recorder", "model": "custom" },
  "replayed": false
}
```

A name is 1 to 80 characters, with no leading or trailing spaces and no control
characters. `Idempotency-Key` is optional here; with one, a retry returns the
same device with `replayed: true`. An account can have 1,000 devices, removed
ones included.

Then create each recording with the device's ID as `deviceId`:

```http
POST /api/v2/recordings
Idempotency-Key: 6f1c2a3e-recording-1
Content-Type: application/json

{"type":"clip","transcript":"Pick up the parcel.","deviceId":"custom_0123456789abcdef0123456789abcdef"}
```

`deviceId` must be a custom device of your account that hasn't been removed.
Otherwise the request fails with `404` and `device_not_found`. Sudo, Glyph, Dex
and 3rd Party device IDs are not accepted: those devices record through the
Italic app on a person's iPhone. A retry of a create that succeeded returns the
same recording, even after its device has been removed.

`GET /recordings?deviceId=…` lists a device's recordings (both custom devices and hardware devices like Sudo, Glyph, and Dex), and each recording carries the canonical `deviceId` and `deviceName`. `GET /devices` returns a custom device with `model` `custom`. Rename or remove a custom device in the Italic apps, under Devices. A
removed device keeps its name on the recordings it made, and its settings
answer `404` with `device_not_found`. A custom device that is still there has
no inputs to set: `GET /devices/{id}/settings` returns
`{"settings":{"inputs":{}}}`.

On Italic for Mac, a Clip from a custom device is listed and announced, but not
copied or pasted by itself, like any text saved through the API.

