# Live translation

Give attendees live captions — and optionally spoken audio — of each talk **in their own language**, on their phone, from a link or QR code. Captions come from the live capture (see *Live capture*): whatever is being captured in a room is translated as it is spoken.

This guide covers the organiser side (settings, access, languages, usage), the **public attendee endpoints** you can use to build your own caption page, app screen or stream overlay instead of Audiobly's hosted page, delegate **sign-in and saved sessions** on the event website (Section 5f), and live **Q&A and polls** on the same page (Section 7).

- **Base URL:** `https://api.audiobly.com` — all paths are under `/v1`.
- **Organiser endpoints:** `Authorization: Bearer <API_KEY>`. Changing settings needs the `event_edit` permission.
- **Public endpoints** (`/v1/public/live/*`): no API key — they are what an attendee's browser calls.
- **Entitlements:** the live page uses three premium features, each switched on per account by Audiobly: **live translation**, **Q&A** and **Polls**. The page runs with any one of them. `GET` on the settings shows `entitled` (the account may run the live page) and `translation_entitled`, `qa_entitled` and `polls_entitled` (which features it has); `GET /v1/me` shows the same as `live_translation_enabled`, `qa_enabled` and `polls_enabled`.

| The account has | What happens |
|---|---|
| none of the three | `PUT` on the settings returns `403 NOT_ENTITLED`; the public endpoints answer `404` |
| Q&A and/or Polls, not live translation | the page shows captions in the spoken language only: no translation languages, no other languages, no spoken translation. A `PUT` that sends `languages`, `audio` or `allow_other_languages` returns `403 NOT_ENTITLED`. |
| live translation | captions and spoken translation as described below |

---

## 1. Languages

`GET /v1/live-translation/languages` lists every language attendees can be offered:

```json
[ { "code": "fr", "name": "French", "native": "Français", "dir": "ltr", "voices": true }, … ]
```

`voices` says whether spoken audio is available in that language (`null` when it can't be determined).

## 2. Configure an event

`GET /v1/events/{EVENT_ID}/live-translation` returns the current settings; `PUT` changes them. Send only the fields you want to change.

```bash
curl -sX PUT https://api.audiobly.com/v1/events/$EVENT_ID/live-translation \
  -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
  -d '{"enabled": true, "languages": ["fr", "es", "de"], "audio": true, "slug": "summit-2026", "access": "qr"}'
```

| Field | Notes |
|---|---|
| `enabled` | switch the live page on/off for the event. Turning it on with no `languages` and `allow_other_languages: false` returns `422 NO_LANGUAGES`. |
| `languages` | the languages attendees see as one-tap shortcuts: up to 3 besides the spoken language (`422 TOO_MANY_LANGUAGES`). The talk's spoken language is always offered as the original. Needs live translation. |
| `allow_other_languages` | `true` (default) = attendees can also pick any other language from the full list (`GET /v1/live-translation/languages`); it is translated only while someone follows it. Needs live translation. |
| `audio` | offer spoken translation as well as captions (default `true`). Needs live translation. |
| `slug` | the attendee link `…/live/<slug>` — 3–60 letters, numbers and hyphens (`422 INVALID_SLUG`, `409 SLUG_TAKEN`). Generated from the event title if you don't set one. |
| `access` | `open`, `qr` or `strict` — see Section 3 |
| `passcode` | set your own 4–8 digit passcode |
| `new_passcode` | `true` = generate a new random passcode |
| `passcode_daily` | `true` = the passcode changes every event day |
| `passcode_on_screen` | `true` = also show the passcode on room screens in `qr` mode |
| `rooms` | per-room overrides: `[{"id": "<location id>", "access": "event"|"open"|"qr"|"strict", "languages": ["fr"]}]` — `event` follows the event's mode; `languages` narrows the event's list for that room |
| `off_sessions` | session IDs to **not** translate (e.g. a closed-door talk) |
| `branding` | `true` = show your brand (logo, colours) on the attendee page |
| `sponsor_id` | show a sponsor ("Live translation supported by …", with the sponsor's logo) — a sponsor of this event; `""` removes it (`422 INVALID_SPONSOR`). Changing the sponsor clears `sponsor_logo` and `sponsor_link`. |
| `sponsor_logo` | a logo for this event's sponsor credit instead of the sponsor's own: a `/v1/media/branding/…` address from a logo upload, or an `https://` image address; `""` goes back to the sponsor's own logo (`422 INVALID_LOGO`) |
| `sponsor_link` | where the sponsor logo links to, instead of the sponsor's website; `""` goes back to the website (`422 INVALID_LINK`) |
| `theme` | with `branding` on, this event's own look (see the table below). Send only the fields you change; `""` clears a field so it follows the brand again. The response also carries `theme_defaults`, the brand's values. |
| `blocked_terms` | words never to show in captions (max 500) |
| `snapshots` | `true` = after each talk, write a short **snapshot** for the attendee page: a one-paragraph summary (as long as the talk needs, usually 80–150 words) and 3–5 takeaways (Section 5e). Default `false`. |
| `webhook_url` | `https://` address to receive every caption (Section 6); `""` removes it (`422 INVALID_WEBHOOK`) |
| `new_webhook_secret` | `true` = rotate the webhook signing secret |
| `after_event` | what attendees find once the event is over: `{"mode": "open"}` (the default: the programme stays as a library of session snapshots), `{"mode": "passcode"}` (once the event has ended, everyone types the passcode, in every room) or `{"mode": "off", "when": "now"}` / `{"mode": "off", "when": "date", "off_at": "2026-12-18T18:00:00"}` (from then on the address only shows that the event has ended; a time without a zone is in the event's time zone; `422 INVALID_SWITCH_OFF` without a date). The response carries `after_event` (`mode`, `off_at` in UTC), `closed` (switched off now), `event_ends_at` and `event_timezone`. |
| `share` | the browser tab and link preview of the event website (every plan; see the table below). Send only the fields you change; `""` clears one. |

`theme` fields:

| Field | Notes |
|---|---|
| `display_name` | the event's name as the live page shows it, when the official title is too long for the header (max 120 characters, `422 INVALID_NAME`). Empty: the event's own title. |
| `logo_size` | how large the header logo is drawn: `small` (default), `medium`, `large` or `xlarge` (`422 INVALID_LOGO_SIZE`) |
| `logo_url` | the logo on the header band (a version for dark backgrounds) |
| `logo_light_url` | the logo for light backgrounds: room screens and emails |
| `background`, `panel`, `text`, `muted`, `line`, `accent`, `on_accent`, `notice` | page colours |
| `header`, `on_header` | the header band behind the logo, language and talk name, and the words and icons on it |
| `live` | the LIVE badge, an open poll and the new-poll dot |

Colours are `#RRGGBB` (`422 INVALID_COLOUR`). Logos are a `/v1/media/branding/…` address from a logo upload or an `https://` address (`422 INVALID_LOGO`).

`share` fields (browser tab and sharing):

| Field | Notes |
|---|---|
| `tab_title` | the browser tab title (max 120 characters, `422 INVALID_TAB_TITLE`). Empty: the name shown on the website. Each attendee page adds its own name in front, e.g. `Programme · …`. |
| `description` | what a shared link shows under the title (max 160 characters, `422 INVALID_DESCRIPTION`) |
| `icon_url` | the website icon (browser tab, bookmarks, phone home screen): a `/v1/media/branding/…` address from `POST /v1/branding/site-icon` — a square PNG of at least 512 × 512 or a script-free SVG, under 5 MB (`422 INVALID_ICON`). Empty: a plain globe. |
| `image_url` | the share image: a `/v1/media/branding/…` address from `POST /v1/branding/share-image` — PNG, JPG or WEBP, 1200 × 630 or larger in that shape, under 5 MB (`422 INVALID_SHARE_IMAGE`). Empty: made from the header logo and colours. |

Both uploads are multipart (`file`) and need event-edit permission; they answer `400 INVALID_REQUEST` with the reason (wrong type, not square, too small, wrong shape, too large).

```bash
curl -sX PUT https://api.audiobly.com/v1/events/$EVENT_ID/live-translation \
  -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
  -d '{"branding": true, "theme": {"display_name": "Content Summit", "logo_size": "large", "accent": "#0B6E4F"}}'
```

The response (also from `GET`) adds what you need to distribute:

| Field | Meaning |
|---|---|
| `entitled` | whether your account may run the live page (any of live translation, Q&A or Polls) |
| `translation_entitled`, `qa_entitled`, `polls_entitled` | which of the three features your account has |
| `url` | the plain attendee link |
| `qr_url` | the link to put in the event-wide QR code (carries an access key when the mode needs one) |
| `screen_url` | a full-screen page for a room screen: captions plus the QR code (and passcode in `strict` mode) |
| `overlay_url` | a caption overlay for a video stream or vision mixer |
| `rooms[]` | the same `qr_url` / `screen_url` / `overlay_url` per room, with each room's `access`, `effective_access` and `languages` |
| `source_language` | the event's spoken language |
| `passcode` | the current passcode (when one is in use) |
| `webhook_secret` | the secret used to sign webhook calls |
| `listeners_now` | devices listening right now, per language |
| `listens_total` | devices that have listened, per language (a device that switched language counts in each) |
| `devices` | devices that followed a talk, each counted once across the event: the same figure as `devices` on `GET /v1/events/{id}/live-translation/usage` |

### 2b. Suggest colours from a website

`POST /v1/events/{EVENT_ID}/live-translation/design-from-website` with `{"url": "www.yourbrand.com"}` reads a public web page and its stylesheets and suggests the attendee page's colours. A bare domain is fine. If your event's website runs on an event platform, your brand's own website usually gives better results. **Nothing is saved**: apply a suggestion with `PUT /v1/events/{EVENT_ID}/live-translation` (`theme`), and keep the earlier `theme` if you want to offer an undo.

```bash
curl -sX POST https://api.audiobly.com/v1/events/$EVENT_ID/live-translation/design-from-website \
  -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
  -d '{"url": "www.yourbrand.com"}'
# → { "url": "https://www.yourbrand.com/", "status": "done", "how": "model",
#     "colours": { "accent": "#0B6E4F", "on_accent": "#FFFFFF", "header": "#12301F", "on_header": "#FFFFFF" },
#     "font": { "name": "Inter", "free": true }, "notes": [] }
```

| Field | Meaning |
|---|---|
| `colours` | suggested colours by `theme` key (`accent`, `on_accent`, `header`, `on_header` and, when found, `background`, `text` and more) |
| `status` | `done` (colours found and checked), `attention` (found, but the evidence is thin or a contrast needs a look) or `failed` |
| `how` | `model` (AI chose the roles) or `rule` (a fixed rule did) |
| `font` | the site's main text font, for information only |
| `notes` | plain-language remarks to show the organiser |

Errors: `403 NOT_ENTITLED` without the live page, `422 BAD_ADDRESS` (not a web address), `422 SITE_NOT_FOUND`, `422 SITE_UNREADABLE` (cannot be opened or gives nothing to read), `429 TOO_MANY_READS` after the day's limit for the event, `503 TRY_AGAIN`.

## 3. Access modes

| Mode | Who gets in |
|---|---|
| `open` | anyone with the link or QR code |
| `qr` *(default for new events)* | scanning a room's QR code goes straight in; anyone arriving by the plain link (forwarded, posted, typed) is asked for the passcode |
| `strict` | everyone types the passcode, including people who scan; the code is shown on the room screen |

The passcode opens every room. A room screen's link opens its own room. Changing the passcode signs out everyone who entered with the old one; QR codes keep working. Set the mode for the whole event with `access`, and override it per room with `rooms`.

## 4. Usage

- `GET /v1/events/{EVENT_ID}/live-translation/usage` → anonymous listening figures: `devices` and `minutes` for the event, `by_language` and `by_room` device counts, `by_mode` (`read`, `listen`, `both`, `not_recorded`: devices by how they followed — captions only, translated voice only, or both; a device that did both at different times counts as both), `talks[]` (`session_id`, `title`, `room`, `starts_at`, `devices`, `minutes`, `by_language`) and `as_of`.
- `GET /v1/events/{EVENT_ID}/live-translation/usage.csv` → the same as a spreadsheet: one row per talk plus a totals row.

```bash
curl -s https://api.audiobly.com/v1/events/$EVENT_ID/live-translation/usage -H "Authorization: Bearer $KEY"
# → { "devices": 84, "minutes": 3559, "by_language": { "de": 20, "en": 26, "es": 13, "fr": 25 },
#     "by_room": { "Auditorium": 81, "Studio 2": 33 },
#     "by_mode": { "read": 50, "listen": 18, "both": 16, "not_recorded": 0 },
#     "talks": [ { "session_id": "…", "title": "Audiences first: rebuilding trust in news", "room": "Auditorium", "starts_at": "2026-11-17T09:15:00Z",
#                 "devices": 26, "minutes": 522, "by_language": { "de": 5, "en": 9, "es": 4, "fr": 8 } }, … ],
#     "as_of": "2026-11-10T22:57:02Z" }
```

These figures are what **Engagement** › **Translation** shows at the top, and in **Outputs** › **Who listened**.

A minute counts when a device was receiving captions of that talk during it. No personal data is collected — devices are anonymous.

---

## 5. Public attendee endpoints

These are for your own attendee page or app. They need no API key, only the event's `slug`.

### 5a. Event info

`GET /v1/public/live/{slug}`

```json
{
  "event_title": "Content Summit",
  "starts_at": "2026-09-05T09:00:00Z", "ends_at": "2026-09-06T17:00:00Z", "timezone": "Europe/London",
  "source_language": "en", "other_languages": true,
  "languages": [ { "code": "en", "original": true, "native": "English", "dir": "ltr" },
                 { "code": "fr", "original": false, "native": "Français", "dir": "ltr" } ],
  "audio": true, "neural_voices": true, "access": "qr",
  "live": [ { "session_id": "…", "title": "Opening Keynote", "room": "Main Stage", "room_id": "…",
              "status": "live", "access": "qr", "translated": true, "languages": null, "speakers": 2 } ],
  "next": [ … ],
  "ended": false,
  "brand": { "name": "…", "logo": "…", "primary": "#…", "secondary": "#…",
             "colors": { "accent": "#0B6E4F" }, "logo_size": "large" },
  "sponsor": null,
  "snapshots": true,
  "programme": [ { "id": "…", "title": "Opening Keynote", "status": "ended", "snapshot": "draft", … } ]
}
```

When the organiser has switched the website off (`after_event`), this answers `closed: true` with only `event_title`, the dates, `timezone`, `city`, `brand`, `share` and `languages`, and every other attendee endpoint answers `410 EVENT_CLOSED`. `share` is what the browser tab and a shared link show: `title` (the `tab_title`, else the name shown on the website), `description`, `icon` and `image` (`null` when none was uploaded). `event_title` is the theme's `display_name` when one is set, otherwise the event's title. `other_languages` says whether attendees may pick any language from the full list. `brand` is present when `branding` is on: `colors` holds the event's own colour overrides, `font_heading` and `font_body` the brand fonts set for the event, its business unit or your organisation (`null` when none is set, so the page keeps its own font), and `logo_size` is `small`, `medium`, `large` or `xlarge` (`null` = `small`). Without live translation, `languages` holds the spoken language only and `audio` is `false`. `live[]` are the talks being captured now (`status` `live`, `paused` or `reconnecting`: the room's capture laptop has stopped sending for about 45 seconds, and the talk stays live); `next[]` are the next talks on the programme. `translated: false` means the organiser switched translation off for that talk; a talk's own `language` appears when it differs from the event's. `ended` is `true` when the day's capturing is over. `snapshots` says whether the event writes session snapshots; each `programme[]` talk's `snapshot` is `none`, `writing`, `draft` or `reviewed` (Section 5e). `404 NOT_FOUND` if the link doesn't exist or translation is off.

### 5b. Get in (when the mode needs it)

`POST /v1/public/live/{slug}/access` exchanges a QR key, a screen key or the passcode for an attendee token:

```bash
# from a scanned QR link …/live/summit-2026?room=<room_id>&k=<key>
curl -sX POST https://api.audiobly.com/v1/public/live/summit-2026/access \
  -H "Content-Type: application/json" -d '{"key": "<k from the link>"}'
# or with the passcode
curl -sX POST https://api.audiobly.com/v1/public/live/summit-2026/access \
  -H "Content-Type: application/json" -d '{"passcode": "4821"}'
# → { "token": "…", "via": "qr" | "screen" | "code", "room_id": "…" | null }
```

| Error | Meaning |
|---|---|
| `401 PASSCODE_REQUIRED` | no valid key or passcode was sent |
| `403 WRONG_PASSCODE` | wrong passcode |
| `429 TOO_MANY_ATTEMPTS` | more than 10 passcode tries from one address in 10 minutes — wait |

Tokens last up to 20 hours, and stop working when the passcode changes (or, with a daily passcode, at the end of the day). In `open` mode no token is needed.

### 5c. Receive captions

`GET /v1/public/live/{slug}/stream` is a **Server-Sent Events** stream of captions in one language.

| Parameter | Notes |
|---|---|
| `lang` | **required** — a code from `languages` (`422 LANGUAGE_NOT_OFFERED` otherwise) |
| `token` | from 5b, unless the room is `open` (`401 PASSCODE_REQUIRED` otherwise) |
| `room` | only captions from this room |
| `session_id` | only captions from this talk |
| `client_id` | a random ID your page keeps per device — used only for anonymous listener counts |
| `mode` | `read` (captions), `listen` or `both` (also receive spoken-audio clips) |

```js
const es = new EventSource(
  `https://api.audiobly.com/v1/public/live/summit-2026/stream?lang=fr&room=${roomId}&token=${token}&client_id=${deviceId}&mode=both`);
es.addEventListener("caption", (e) => {
  const c = JSON.parse(e.data);   // { id, session_id, room_id, speaker, text, original, translated, … }
  show(c.text);
});
es.addEventListener("audio", (e) => {
  const a = JSON.parse(e.data);   // { id, lang, voice_name, url }
  play("https://api.audiobly.com" + a.url);
});
```

- **`caption` events** carry `id`, `session_id`, `room_id`, `speaker`, `source` (the spoken language), `text` (in your `lang`), `original` (the words as spoken), `translated` (`false` when `text` is the original), and `at` (Unix time).
- **`snapshot` events** carry `session_id` and `status` (`writing`, `draft` or `reviewed`) when a talk's snapshot starts being written or a new version is saved: fetch the snapshot again (5e). `qa` and `poll` events work the same way (Section 7).
- **`audio` events** (with `mode=listen|both`) point to a short MP3 of one translated sentence: `GET /v1/public/live/{slug}/audio/{capture_id}/{n}/{lang}.mp3`. Clips expire after a while (`404`).
- The stream opens with the most recent captions so a late joiner isn't looking at a blank screen, sends a keep-alive comment every 15 seconds, and resumes from the browser's `Last-Event-ID` after a reconnect. Reconnect (EventSource does this automatically) if the connection drops.

### 5d. Room screens and overlays

`GET /v1/public/live/{slug}/screen?k=<screen key>` — for a screen or overlay page built from a `screen_url`/`overlay_url` (the `k` parameter in those links). Returns `room_id`, `room`, `attendee_url` (what the room's QR code should open), `passcode` (shown in `strict` mode, or when `passcode_on_screen` is on) and a `token` for the caption stream. `404` if the key isn't valid.

### 5d2. Caption bookmarks (signed-in delegate)

A signed-in delegate (`X-Delegate-Session`) can keep a caption line. It is stored as one line in their private event note, so a bookmark made on this page also shows on your own event site, and the other way round.

| Call | Meaning |
|---|---|
| `POST /v1/public/live/{slug}/me/bookmarks` | keep a caption block: `{"session_id": "…", "text": "…", "clock": "12:40"}`. Send `clock` (`m:ss` or `HH:MM`) or `at` (the caption's Unix time). `201 {"created": true, …}`; a block already kept answers `200` with `"created": false` and no second line. |
| `GET /v1/public/live/{slug}/me/bookmarks` | the delegate's bookmarks in the order they were kept: `id`, `session_id`, `session_title`, `speaker`, `clock`, `text`, `line`. `?session_id=` shows one session's. |
| `DELETE /v1/public/live/{slug}/me/bookmarks/{bookmark_id}` | remove one (`204`, safe to repeat). Every other line of the note stays. |

Errors: `401 SIGNED_OUT`, `404 NOT_FOUND`, `422 TEXT_REQUIRED` / `CLOCK_REQUIRED` / `NOTE_FULL` (the note is full at 10,000 characters), `429 TOO_MANY_REQUESTS`.

### 5e. After the talk: snapshot, transcript and search

The same access rules as the caption stream apply: pass the attendee `token` for a talk in a `qr` or `strict` room (`401 PASSCODE_REQUIRED` otherwise). `lang` is optional (default: the spoken language; `422 LANGUAGE_NOT_OFFERED` for one the event does not offer).

`GET /v1/public/live/{slug}/sessions/{session_id}/snapshot?lang=fr` — the talk's snapshot:

```json
{ "session_id": "…", "status": "draft", "language": "fr",
  "summary": "One paragraph on what the talk covered, the main points made and where the discussion landed.",
  "takeaways": [ { "headline": "At most 9 words", "detail": "One sentence of at most 22 words." } ],
  "updated_at": "2026-11-09T10:42:00Z" }
```

`status` is `none` (snapshots are off, or the talk has not ended — the other fields are empty), `writing` (the talk has ended and the first version is on its way), `draft` (written automatically, not yet reviewed), or `reviewed` (the session was approved, or its final Session Report is approved). `source` says where the text comes from: `snapshot` (the automatic snapshot) or `published` (the session's final Session Report is approved: `summary` is the report's full overview and `takeaways` its first five, each one sentence in `headline` with an empty `detail`). A published summary always has `status` `reviewed`, so a client that only knows snapshots keeps working. `replaced_on_publish` is `true` on a snapshot (`source` `snapshot`) when publishing the session will replace it with the final summary. A draft report is never shown. Snapshots name no one and contain nothing that was not said in the talk. A snapshot is translated into `lang` when it was written in another language; `language` says which you got. `404 NOT_FOUND` for a talk that is not part of the event.

`GET /v1/public/live/{slug}/sessions/{session_id}/transcript?lang=fr` — the transcript of a talk that has ended (`409 NOT_ENDED` before). Once the session is Published in Audiobly, it is the edited transcript your editors approved. Until then it is what attendees followed during the talk, the live captions:

```json
{ "session_id": "…", "language": "fr", "ended": true, "source": "live",
  "segments": [ { "speaker": "Jan de Vries", "start": 12.0, "text": "…" } ] }
```

`speaker` is `null` for a voice nobody named; `start` is seconds from the start of the capture. `source` is `published` (the edited transcript) or `live` (the live captions). The text is in `lang` when the transcript or captions were translated into it, otherwise in the spoken language (`language` says which).

`GET /v1/public/live/{slug}/search?q=claims&lang=fr` — search the event (`q` at least 2 characters; at most 20 results per group, case-insensitive):

```json
{ "sessions": [ { "id": "…", "title": "…", "starts_at": "…", "status": "ended", "track": "Regulation", "speakers": ["…"] } ],
  "speakers": [ { "name": "…", "job_title": "…", "company": "…", "headshot": null, "session_ids": ["…"] } ],
  "snapshots": [ { "session_id": "…", "session_title": "…", "kind": "takeaway", "index": 0, "text": "…" } ] }
```

Talks match on title, track, speaker names and companies; speakers on name, job title and company; snapshots (only when `snapshots` is on) on their summary and takeaways.

### 5f. Delegate sign-in and saved sessions

This is how **My Profile** on the Audiobly event website signs a delegate in. Use it for your own attendee app. There is no password. The delegate types the email they booked with, and Audiobly sends **one** email with a sign-in link and a 6-digit code. The delegate signs in with the same delegate account as on your own site (*Use Audiobly on your own website*, Section 4). No API key is needed, only the event's `slug`.

**1. Start.** Audiobly emails the delegate, but only when the email has a live booking at the event. Cancelled and unpaid bookings do not count.

```bash
curl -sX POST https://api.audiobly.com/v1/public/live/summit-2026/signin/start \
  -H "Content-Type: application/json" -d '{"email": "anna.degroot@example.com"}'
# → 202 { "email": "anna.degroot@example.com", "resend_after": 30, "expires_in": 900 }
```

The link and the code work once, for 15 minutes. Asking again replaces both, and is allowed after `resend_after` seconds. The link opens the event website with `?signin=<token>`.

| Error | Meaning |
|---|---|
| `404 NO_BOOKING` | no live booking with this email at the event |
| `429 TOO_SOON` | asked again within 30 seconds; `retry_after` (also in the `Retry-After` header) says how long to wait |
| `429 TOO_MANY_ATTEMPTS` | too many sign-in emails for this address, or requests from this network, in the last hour |
| `502 SEND_FAILED` | the email could not be sent, for example to an address that bounced before |
| `503 SIGNIN_UNAVAILABLE` | sign-in is briefly unavailable; try again |

**2. Verify.** Send the link's token, or the email with the code:

```bash
curl -sX POST https://api.audiobly.com/v1/public/live/summit-2026/signin/verify \
  -H "Content-Type: application/json" -d '{"email": "anna.degroot@example.com", "code": "482913"}'
# or: -d '{"token": "<the signin token from the link>"}'
```

```json
{ "session_token": "eyJr…",
  "expires_at": "2026-12-10T09:12:00Z",
  "me": { "email": "anna.degroot@example.com", "name": "Anna de Groot", "first_name": "Anna",
          "job_title": "Editor", "company": "Media Trade Weekly", "stream_ticket": "eyJr…" } }
```

Keep `session_token` on the device and send it as the `X-Delegate-Session` header on the calls below. It lasts 30 days, for this event only. `me` comes from the booking, and the delegate's own profile changes win. `stream_ticket` is only for the caption stream's address (5g); never put `session_token` in an address.

| Error | Meaning |
|---|---|
| `400 CODE_WRONG` | the code is not right; `attempts_left` says how many tries are left |
| `410 CODE_EXPIRED` | expired, already used, replaced by a newer email, or five wrong codes |
| `404 NO_BOOKING` | the booking is no longer live |
| `422 MISSING` | send `token`, or `email` with `code` |
| `429 TOO_MANY_ATTEMPTS` | too many checks from this network; wait and try again |

**3. Signed in.**

```bash
S="X-Delegate-Session: $SESSION_TOKEN"
curl -s https://api.audiobly.com/v1/public/live/summit-2026/me -H "$S"
# → { "email": "…", "name": "…", "first_name": "…", "job_title": "…", "company": "…", "stream_ticket": "…" }
curl -s https://api.audiobly.com/v1/public/live/summit-2026/me/saved-sessions -H "$S"
# → { "data": [ { "session_id": "…", "saved_at": "2026-11-06T09:39:00Z" } ] }   (programme order)
curl -sX PUT https://api.audiobly.com/v1/public/live/summit-2026/me/saved-sessions/<session_id> -H "$S"
# → 200 { "session_id": "…", "saved_at": "…" }   (saving again keeps the first saved_at)
curl -sX DELETE https://api.audiobly.com/v1/public/live/summit-2026/me/saved-sessions/<session_id> -H "$S"
# → 204   (also when it was not saved)
curl -sX POST https://api.audiobly.com/v1/public/live/summit-2026/me/saved-sessions/merge -H "$S" \
  -H "Content-Type: application/json" -d '{"session_ids": ["…", "…"]}'
# → the full list, as GET
curl -sX POST https://api.audiobly.com/v1/public/live/summit-2026/signout -H "$S"
# → 204   (the token stops working at once)
```

- These are the same saves as `GET /v1/delegate-accounts/{ACCOUNT_ID}/saved-sessions` on your own site, and the organiser sees them under **Sessions** › **Saved sessions**.
- Use `merge` once, at sign-in, for sessions your app saved on the device before the delegate signed in (up to 500). It ignores ids that are not sessions of the event. Then clear the device's copy.
- Show saving only to signed-in delegates. `PUT` answers `422 NOT_BOOKED` when the booking is no longer live, and `404 NOT_FOUND` for a session that is not part of the event.
- Without a valid token, or when the booking is no longer live, the calls answer `401 SIGNED_OUT`. When the organiser has switched the website off, they answer `410 EVENT_CLOSED`.

---

### 5g. The signed-in delegate on Q&A, polls and captions, and page activity

When a delegate is signed in on the event webpage (5f), send their session on the anonymous routes too, so their questions, upvotes, poll answers and listening are kept on their account as well as on the device:

- Q&A ask, upvote and poll vote: add the `X-Delegate-Session` header.
- The caption stream: add `&delegate=<stream_ticket>`. An EventSource cannot send headers, so the stream takes its own ticket in the address: `stream_ticket` from `GET /v1/public/live/{slug}/me` (and from the sign-in answer's `me`). It only says who is listening; it cannot ask, vote or save, and it ends when the delegate signs out. The session token itself is never accepted there.

A missing, expired or wrong token or ticket is ignored: the request works anonymously, as before. The room's access rules still apply: in a `qr` or `strict` room, send the attendee `token` from 5b as well. Never put the session token in an address: addresses end up in logs. (Audiobly's own access log hides `token`, `delegate` and `session` values.)

Report what the delegate does on the page in batches:

```bash
curl -sX POST https://api.audiobly.com/v1/public/live/summit-2026/activity \
  -H "X-Delegate-Session: <session_token>" -H "Content-Type: application/json" \
  -d '{"items": [{"type": "session.opened", "session_id": "<session_id>"}, {"type": "search.used", "payload": {"results": 4}}]}'
# → 202 { "accepted": 2, "dropped": 0 }
```

Up to 50 items and 64 KB a call; each item has `type` (lower-case, dotted, at most 64 characters), optional `occurred_at`, `session_id` (a session of this event) and `payload` (an object, at most 4 KB). An item that cannot be kept (a `type` that is not dotted, a `payload` over 4 KB) is dropped and counted, and a `session_id` that is not a session of this event is cleared; an item of the wrong shape (a `type` over 64 characters, a `payload` that is not an object) makes the whole call `422`. When the page is closing, send it with `navigator.sendBeacon` to `…/activity`, with the session token in the body as `"session"` (`{"items": [...], "session": "<session_token>"}`, `text/plain` is accepted), since a beacon cannot send headers. 401 `SIGNED_OUT`, 413 too large, 422 not a batch, 429 too often.

## 6. Caption webhook

Set `webhook_url` to receive every caption, in every language, as it is produced — for your own captioning system, archive or display. Each caption is a `POST` with a JSON body:

```json
{ "type": "caption", "id": "…", "event_id": "…", "session_id": "…", "room_id": "…",
  "speaker": "Ada Lovelace", "source": "en",
  "text": { "en": "Welcome to day two.", "fr": "Bienvenue au deuxième jour." }, "at": 1793012345.2 }
```

Headers: `Content-Type: application/json`, `User-Agent: Audiobly-Live-Captions/1`, and `X-Audiobly-Signature: sha256=<hex>` — an HMAC-SHA256 of the raw request body with your `webhook_secret`. Verify it before trusting the body:

```python
import hmac, hashlib
expected = "sha256=" + hmac.new(secret.encode(), raw_body, hashlib.sha256).hexdigest()
ok = hmac.compare_digest(expected, request.headers["X-Audiobly-Signature"])
```

Delivery is best effort with a short timeout and no retries — respond quickly (any `2xx`), and don't treat the webhook as the only copy: the reviewed transcript is always available afterwards.

---

## 7. Q&A and polls

Attendees can ask questions, upvote them and answer polls on the same live page. **Q&A** and **Polls** are separate premium features, each switched on per account by Audiobly (`qa_entitled` / `polls_entitled` on the live settings). Polls are switched on per talk. Q&A opens by itself when each talk goes live and closes when its recording ends, unless you set it differently (Section 7a).

### 7a. Settings

`GET /v1/events/{EVENT_ID}/live-qa/settings` returns them; `PUT` changes them (needs `event_edit`). Send only the fields you want to change; the other live-page settings are kept.

```bash
curl -sX PUT https://api.audiobly.com/v1/events/$EVENT_ID/live-qa/settings \
  -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
  -d '{"qa_sessions": ["<SESSION_ID>"], "poll_sessions": ["<SESSION_ID>"], "qa_moderated": true}'
# → { "qa_sessions": ["…"], "poll_sessions": ["…"], "qa_closed_sessions": [],
#     "qa_moderated": true, "qa_anonymous": true, "qa_translate": true, "qa_close_on_end": true,   (qa_moderated is false unless you set it)
#     "qa_auto_open": true, "qa_off_sessions": [], "qa_reopened_sessions": [] }
```

| Field | Notes |
|---|---|
| `qa_auto_open` | `true` (default) = each talk's Q&A opens when the talk goes live, which is when its live capture receives its first words. Breaks, registration, lunch and networking sessions are left out. An event that stored no value and already lists `qa_sessions` (set up by hand before 1.3.17) reads `false` and keeps exactly those talks |
| `qa_sessions` | session IDs switched on by hand: open at once, whatever the capture is doing. Needs Q&A. |
| `qa_off_sessions` | session IDs with Q&A switched off by hand; the automatic rule skips them |
| `qa_reopened_sessions` | session IDs reopened by hand; they stay open after the recording ends |
| `poll_sessions` | session IDs with polls on. Needs Polls. |
| `qa_closed_sessions` | sessions whose Q&A is on but no longer taking questions |
| `qa_moderated` | `false` (default since 1.3.17) = every question shows straight away. `true` = a moderator approves each question before attendees see it, which needs someone approving questions throughout the event. Events that already used Q&A before 1.3.17 and had stored no value were set to `true` at the release, so they did not change |
| `qa_anonymous` | `true` (default) = attendees may ask without a name; `false` = a name is required |
| `qa_translate` | `true` (default) = questions and polls are translated into the attendee's language |
| `qa_close_on_end` | `true` (default) = questions close when the talk's recording ends. A capture that is set up but has not started, or is paused or reconnecting, does not close it |

**Each talk's state.** A talk's Q&A is `off`, `not_open` (it opens when the talk goes live), `open` or `closed` (the questions stay readable; new ones are refused). A choice made by hand for a talk always wins over the automatic rule.

| What | Endpoint |
|---|---|
| Every session with its Q&A state now | `GET /v1/events/{EVENT_ID}/live-qa/sessions` → `{auto_open, close_on_end, sessions: [{session_id, title, starts_at, takes_questions, enabled, state, mode, since}]}`. `mode` is `auto` (the rule decided) or `manual` (set by hand); `since` is when it opened or closed, when a capture tells us |
| Act on one session by hand (needs `event_edit`) | `POST /v1/events/{EVENT_ID}/sessions/{SESSION_ID}/live-qa/state` with `{"action": "on" \| "off" \| "open" \| "close" \| "reopen"}` → the same list. `open` opens now; `close` closes now; `reopen` opens again and keeps it open after the recording; `off` means no Q&A; `on` puts the talk back under the rule (with the rule off, it opens at once). `403 NOT_ENTITLED` without Q&A |

```bash
curl -sX POST https://api.audiobly.com/v1/events/$EVENT_ID/sessions/$SESSION_ID/live-qa/state \
  -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d '{"action": "open"}'
# → { "auto_open": true, "close_on_end": true,
#     "sessions": [ { "session_id": "…", "title": "AI one year on", "starts_at": "2026-11-18T09:05:00Z",
#                     "takes_questions": true, "enabled": true, "state": "open", "mode": "manual", "since": null }, … ] }
```

Session IDs that are not on the event are dropped. `PUT` returns `403 NOT_ENTITLED` when your account has neither Q&A nor Polls, when `qa_sessions` is not empty without Q&A, or when `poll_sessions` is not empty without Polls.

### 7b. Moderating (signed in)

These need the `event_edit` or `content_edit` permission.

| What | Endpoint |
|---|---|
| A talk's questions (optional `status`, and `lang` for a translation to read them in) | `GET /v1/events/{EVENT_ID}/sessions/{SESSION_ID}/live-qa/questions` |
| Approve (`live`), mark `answered`, dismiss, or put one question on the room screen (`on_screen`) | `PATCH /v1/events/{EVENT_ID}/live-qa/questions/{QUESTION_ID}` with `{"status": …, "on_screen": …}` |
| A talk's polls, drafts included, with results | `GET /v1/events/{EVENT_ID}/sessions/{SESSION_ID}/live-qa/polls` |
| Create a draft poll | `POST /v1/events/{EVENT_ID}/sessions/{SESSION_ID}/live-qa/polls` with `{"question", "kind": "single"\|"multiple"\|"rating", "options", "show_results"}` (2–12 options; a rating is a 1–5 score with no options) |
| Edit a poll (wording only while it is a draft, `409 POLL_STARTED`) | `PATCH /v1/events/{EVENT_ID}/live-qa/polls/{POLL_ID}` |
| Open / close a poll | `POST /v1/events/{EVENT_ID}/live-qa/polls/{POLL_ID}/open`, `…/close` |
| Delete a poll and its answers | `DELETE /v1/events/{EVENT_ID}/live-qa/polls/{POLL_ID}` |
| A talk's questions and poll results as CSV | `GET /v1/events/{EVENT_ID}/sessions/{SESSION_ID}/live-qa/export.csv` |

Marking a question `answered` sets its `answered_at` (returned on the moderator list, the `PATCH` response and the public Q&A list); moving it to any other status clears it. Questions answered before 1.3.14 have `answered_at: null`. A signed-in delegate's own questions are listed for your site by `GET /v1/delegate-accounts/{ACCOUNT_ID}/questions?event_id=` (*Build your own delegate hub* guide).

You can prepare polls ahead of the event. Opening a poll returns `403 NOT_ENTITLED` when your account does not have Polls, and `409 POLLS_OFF` when polls are not on for that talk.

Event totals for the organiser (Read), as shown above **Engagement** › **Polls** and **Q&A**:

- `GET /v1/events/{EVENT_ID}/poll-stats` → `{polls, states: {closed, open, ready}, sessions, votes, polls_run, votes_per_poll: [{poll_id, question, votes}], by_session: [{session_id, title, starts_at, votes}], per_session: [{session_id, polls, votes}], ratings: {polls, answers, average, spread: {"1".."5"}}, as_of}`. Votes are one per device per poll (its last answer); `votes_per_poll` is in the order the polls ran; `by_session` gives up to five, most first; `per_session` gives every session with a poll (ready ones included), for the sessions table; `ready` polls are prepared and not opened yet.
- `GET /v1/events/{EVENT_ID}/qa-stats` → `{questions, sessions, by_hour: [{hour, count}], states: {answered, live, waiting, dismissed}, upvotes, upvotes_per_question, top_question: {session_id, title, starts_at, text, upvotes}, by_session: [{session_id, title, starts_at, questions}], per_session: [{session_id, questions, answered, upvotes}], as_of}`. Dismissed questions are counted; `by_hour` runs in the event's time from the first to the last hour with a question; upvotes are one per device per question; `top_question` is `null` until the first upvote; `per_session` gives every session with a question, for the sessions table.

```bash
curl -s https://api.audiobly.com/v1/events/$EVENT_ID/poll-stats -H "Authorization: Bearer $KEY"
# → { "polls": 9, "states": { "closed": 6, "open": 1, "ready": 2 }, "sessions": 6, "votes": 271, "polls_run": 7,
#     "votes_per_poll": [ { "poll_id": "…", "question": "Do you trust the news you read most days?", "votes": 46 }, … ],
#     "by_session": [ { "session_id": "…", "title": "AI in the newsroom: rules that work", "starts_at": "2026-11-17T11:45:00Z", "votes": 85 }, … ],
#     "ratings": { "polls": 3, "answers": 58, "average": 3.9, "spread": { "1": 1, "2": 2, "3": 16, "4": 21, "5": 18 } },
#     "as_of": "2026-11-10T22:58:00Z" }
curl -s https://api.audiobly.com/v1/events/$EVENT_ID/qa-stats -H "Authorization: Bearer $KEY"
# → { "questions": 26, "sessions": 6, "by_hour": [ { "hour": 9, "count": 6 }, { "hour": 10, "count": 2 }, … ],
#     "states": { "answered": 15, "live": 3, "waiting": 6, "dismissed": 2 }, "upvotes": 157, "upvotes_per_question": 6.0,
#     "top_question": { "session_id": "…", "title": "Retail media and the publisher opportunity", "starts_at": "2026-11-17T11:00:00Z",
#                       "text": "Which retail partners share first-party data?", "upvotes": 22 },
#     "by_session": [ { "session_id": "…", "title": "AI in the newsroom: rules that work", "starts_at": "2026-11-17T11:45:00Z", "questions": 6 }, … ],
#     "as_of": "2026-11-10T22:58:00Z" }
```

### 7c. Public endpoints (attendees)

No API key. Rooms that need a passcode or QR key take the same `token` as the caption stream (Section 5b), as a `token` query parameter. `client_id` is the random ID your page keeps per device.

| What | Endpoint |
|---|---|
| Which talks have Q&A and polls on | `GET /v1/public/live/{slug}/interactive` → `qa_sessions`, `poll_sessions`, `closed_sessions`, `not_open_sessions`, `moderated`, `anonymous` |
| A talk's questions (`client_id`, `lang`, `sort` = `popular` or `recent`) | `GET /v1/public/live/{slug}/sessions/{session_id}/qa` |
| Ask a question | `POST /v1/public/live/{slug}/sessions/{session_id}/qa` with `{"client_id", "text", "name", "lang"}` → `201` |
| Edit or delete your own question (until it is answered) | `PATCH` / `DELETE /v1/public/live/{slug}/sessions/{session_id}/qa/{question_id}` |
| Upvote a question, or take the vote back | `POST /v1/public/live/{slug}/sessions/{session_id}/qa/{question_id}/vote` with `{"client_id"}` |
| A talk's open and closed polls | `GET /v1/public/live/{slug}/sessions/{session_id}/polls` |
| Answer a poll, or change your answer | `POST /v1/public/live/{slug}/sessions/{session_id}/polls/{poll_id}/vote` with `{"client_id", "choices": [1]}` |

`interactive` reports a feature your account does not have as off on every talk. `qa_sessions` lists every talk with Q&A on, including those that open by themselves when they go live; `not_open_sessions` are the ones waiting for that (they are also in `closed_sessions`, so a page that does not read the new field still shows no question box). The public Q&A list carries `state` (`off`, `not_open`, `open`, `closed`) beside `enabled` and `open`, and each session in the public programme carries `qa_state`. Show "Q&A opens when the session starts" for `not_open`. A `qa` message with `action: "settings"` arrives on the caption stream when a talk's Q&A opens or closes; refetch the list then.

| Error | Meaning |
|---|---|
| `403 QA_OFF` | Q&A is not on for this talk, or your account does not have Q&A |
| `403 QA_NOT_OPEN` | Q&A for this talk opens when the talk goes live |
| `403 QA_CLOSED` | questions for this talk are closed |
| `403 POLLS_OFF` | polls are not on for this talk, or your account does not have Polls |
| `409 POLL_CLOSED` | the poll is closed |
| `409 ALREADY_ANSWERED` / `409 NOT_VOTABLE` | the question is answered, or is not up for votes |
| `422 EMPTY_QUESTION`, `QUESTION_TOO_LONG`, `NAME_REQUIRED`, `INVALID_CHOICES` | the request needs correcting |
| `429 TOO_MANY_QUESTIONS` / `429 TOO_MANY_VOTES` | the device or network is asking or voting too fast — wait |
