# Transcripts and media

Transcripts, subtitles, transcript search, photos and media files.

Base URL: https://api.audiobly.com

### GET /v1/events/{event_id}/transcript

Get transcript

Get an event's event-level transcript: the latest version, or a specific `version`. Returns
404 NOT_FOUND if the event has no such transcript.

Scope: any key

Parameters:

- `event_id` (path, string (uuid), required)
- `version` (query, integer)

Responses:

- 200: Successful Response
- 422: The request did not validate.
- 401: The key is missing, unknown, revoked or expired.
- 403: The key lacks the scope this call needs, or the organisation is not on Enterprise.
- 429: Over the request rate. Wait for Retry-After seconds.

### GET /v1/events/{event_id}/speaker-mappings

List event speaker mappings

Which roster speaker each diarized label ("Speaker 0") is assigned to, for the event's
latest event-level transcript. Any key that can read the transcript can read its names.

Scope: any key

Parameters:

- `event_id` (path, string (uuid), required)

Responses:

- 200: Successful Response
- 422: The request did not validate.
- 401: The key is missing, unknown, revoked or expired.
- 403: The key lacks the scope this call needs, or the organisation is not on Enterprise.
- 429: Over the request rate. Wait for Retry-After seconds.

### POST /v1/events/{event_id}/recanonicalize

Recanonicalise a transcript

Re-apply house-spelling canonicalisation to this event's already-stored transcripts
(event-scope + each session) without re-transcribing. Enqueues ``recanonicalize_event``,
which appends a new transcript version to any stream whose text changes and is otherwise
a no-op. Admin/editor only, org-scoped.

Scope: content_edit or content_review

Parameters:

- `event_id` (path, string (uuid), required)

Responses:

- 202: Successful Response
- 422: The request did not validate.
- 401: The key is missing, unknown, revoked or expired.
- 403: The key lacks the scope this call needs, or the organisation is not on Enterprise.
- 429: Over the request rate. Wait for Retry-After seconds.

### POST /v1/events/{event_id}/transcript/extract-text

Extract transcript text

Read the text out of a .docx transcript so the import dialog can show it.

Customers are sent transcripts as Word documents at least as often as plain text, and the
dialog could only read text files — a .docx loaded as zip bytes. Extraction happens here
rather than in the browser because python-docx is already a dependency; nothing is stored,
and the text still goes through the normal import (and review) once the user confirms it.

Scope: content_edit

Parameters:

- `event_id` (path, string (uuid), required)

Body (multipart form):

- `file` (string, required): The file to upload.

Responses:

- 200: Successful Response
- 422: The request did not validate.
- 401: The key is missing, unknown, revoked or expired.
- 403: The key lacks the scope this call needs, or the organisation is not on Enterprise.
- 429: Over the request rate. Wait for Retry-After seconds.

### GET /v1/transcripts/search

Search transcripts

Full-text search across your organisation's transcripts that an editor has signed off
(editorial status `reviewed` or `published`; raw machine transcripts are never searched).
Only the latest version of each transcript is searched. Each hit is one utterance: the
event, the session (talk) when the transcript belongs to one, the speaker, its start and
end time in seconds, and a snippet with the matched words in `**bold**`. Results are ranked
by relevance. Words are matched by their English stem, so `pricing` also finds `price`.
Every word must occur in the utterance (use `OR` for alternatives); for a delegate's
free-text question use `POST /v1/events/{event_id}/ask` with `mode: "moments"` instead.
`event_id` and `session_id` narrow the search to one event or one session.

Scope: read

Parameters:

- `q` (query, string, required): Search words. Supports "quoted phrases", OR, and -excluded words.
- `event_id` (query, string (uuid)): Search one event only.
- `session_id` (query, string (uuid)): Search one session (talk) only.
- `limit` (query, integer)
- `offset` (query, integer)

Responses:

- 200: Successful Response
- 422: The request did not validate.
- 401: The key is missing, unknown, revoked or expired.
- 403: The key lacks the scope this call needs, or the organisation is not on Enterprise.
- 429: Over the request rate. Wait for Retry-After seconds.

### GET /v1/events/{event_id}/transcripts

List event transcripts

Every session in programme order with its editorial status and latest transcript.

Scope: asset_view

Parameters:

- `event_id` (path, string (uuid), required)

Responses:

- 200: Successful Response
- 422: The request did not validate.
- 401: The key is missing, unknown, revoked or expired.
- 403: The key lacks the scope this call needs, or the organisation is not on Enterprise.
- 429: Over the request rate. Wait for Retry-After seconds.

### GET /v1/events/{event_id}/transcripts/download

Download event transcript

The whole event in one document: every transcribed session in programme order, with a
contents page and each session's status.

Scope: asset_view

Parameters:

- `event_id` (path, string (uuid), required)
- `format` (query, string)
- `timestamps` (query, boolean)
- `include_raw` (query, boolean)

Responses:

- 200: Successful Response
- 422: The request did not validate.
- 401: The key is missing, unknown, revoked or expired.
- 403: The key lacks the scope this call needs, or the organisation is not on Enterprise.
- 429: Over the request rate. Wait for Retry-After seconds.

### GET /v1/events/{event_id}/transcripts/zip

Download selected transcripts

The selected sessions, one file each, in a ZIP (programme order, status in each name).
Selected sessions without a transcript are skipped.

Scope: asset_view

Parameters:

- `event_id` (path, string (uuid), required)
- `session_ids` (query, string, required): Comma-separated session ids
- `format` (query, string)
- `timestamps` (query, boolean)

Responses:

- 200: Successful Response
- 422: The request did not validate.
- 401: The key is missing, unknown, revoked or expired.
- 403: The key lacks the scope this call needs, or the organisation is not on Enterprise.
- 429: Over the request rate. Wait for Retry-After seconds.

### GET /v1/events/{event_id}/transcripts/{session_id}/download

Download one transcript

One session's transcript, its status printed inside and in the file name.

Scope: asset_view

Parameters:

- `event_id` (path, string (uuid), required)
- `session_id` (path, string (uuid), required)
- `format` (query, string)
- `timestamps` (query, boolean)

Responses:

- 200: Successful Response
- 422: The request did not validate.
- 401: The key is missing, unknown, revoked or expired.
- 403: The key lacks the scope this call needs, or the organisation is not on Enterprise.
- 429: Over the request rate. Wait for Retry-After seconds.

### GET /v1/events/{event_id}/sessions/{session_id}/translations

List session translations

The session's subtitle translations, newest per language. `current` is false when the
transcript was edited after the translation was made.

Scope: asset_view

Parameters:

- `event_id` (path, string (uuid), required)
- `session_id` (path, string (uuid), required)

Responses:

- 200: Successful Response
- 422: The request did not validate.
- 401: The key is missing, unknown, revoked or expired.
- 403: The key lacks the scope this call needs, or the organisation is not on Enterprise.
- 429: Over the request rate. Wait for Retry-After seconds.

### POST /v1/events/{event_id}/sessions/{session_id}/translations

Create session translation

Translate the session's current transcript (or return the translation that exists).
Lines unchanged since an earlier translation keep their text, editors' corrections
included; only new or changed lines are machine-translated.

Scope: content_edit

Parameters:

- `event_id` (path, string (uuid), required)
- `session_id` (path, string (uuid), required)

Body (JSON):

- `language` (string, required): Target language code, e.g. nl or en

Responses:

- 200: Successful Response
- 422: The request did not validate.
- 401: The key is missing, unknown, revoked or expired.
- 403: The key lacks the scope this call needs, or the organisation is not on Enterprise.
- 429: Over the request rate. Wait for Retry-After seconds.

### GET /v1/events/{event_id}/sessions/{session_id}/translations/{language}

Get session translation

Every line: timing, speaker, the original, the machine translation and the current text.

Scope: asset_view

Parameters:

- `event_id` (path, string (uuid), required)
- `session_id` (path, string (uuid), required)
- `language` (path, string, required)

Responses:

- 200: Successful Response
- 422: The request did not validate.
- 401: The key is missing, unknown, revoked or expired.
- 403: The key lacks the scope this call needs, or the organisation is not on Enterprise.
- 429: Over the request rate. Wait for Retry-After seconds.

### PATCH /v1/events/{event_id}/sessions/{session_id}/translations/{language}

Update session translation

Correct lines and/or mark the translation Reviewed (or back to Draft).

Scope: content_edit

Parameters:

- `event_id` (path, string (uuid), required)
- `session_id` (path, string (uuid), required)
- `language` (path, string, required)

Body (JSON):

- `lines` (array of LineEdit): The edited lines of the translation, each with its line number and new text.
- `reviewed` (boolean): true marks the translation Reviewed, false back to Draft

Responses:

- 200: Successful Response
- 422: The request did not validate.
- 401: The key is missing, unknown, revoked or expired.
- 403: The key lacks the scope this call needs, or the organisation is not on Enterprise.
- 429: Over the request rate. Wait for Retry-After seconds.

### DELETE /v1/events/{event_id}/sessions/{session_id}/translations/{language}

Delete session translation

Discard the session's translations into this language, every version, edits included,
so the next one starts from a fresh machine translation.

Scope: content_edit

Parameters:

- `event_id` (path, string (uuid), required)
- `session_id` (path, string (uuid), required)
- `language` (path, string, required)

Responses:

- 204: Successful Response
- 422: The request did not validate.
- 401: The key is missing, unknown, revoked or expired.
- 403: The key lacks the scope this call needs, or the organisation is not on Enterprise.
- 429: Over the request rate. Wait for Retry-After seconds.

### GET /v1/events/{event_id}/subtitles

List event subtitles

Per session, where its subtitles stand in `language`: none, translating, draft,
reviewed, failed, outdated (the transcript changed since), or same_language (spoken in
it already). Without `language`, the original-language subtitles.

Scope: asset_view

Parameters:

- `event_id` (path, string (uuid), required)
- `language` (query, string)

Responses:

- 200: Successful Response
- 422: The request did not validate.
- 401: The key is missing, unknown, revoked or expired.
- 403: The key lacks the scope this call needs, or the organisation is not on Enterprise.
- 429: Over the request rate. Wait for Retry-After seconds.

### POST /v1/events/{event_id}/subtitles/translate

Translate event subtitles

Translate every transcribed session (or the chosen ones) in the background. Sessions
already translated for their current transcript are left alone, edits and all.

Scope: content_edit

Parameters:

- `event_id` (path, string (uuid), required)

Body (JSON):

- `language` (string, required): A language code such as en or fr.
- `session_ids` (array of string (uuid)): Only these sessions (default: all)

Responses:

- 202: Successful Response
- 422: The request did not validate.
- 401: The key is missing, unknown, revoked or expired.
- 403: The key lacks the scope this call needs, or the organisation is not on Enterprise.
- 429: Over the request rate. Wait for Retry-After seconds.

### GET /v1/events/{event_id}/subtitles/zip

Download event subtitles

Every session's subtitles in one ZIP, one file per session in programme order.

With `language`, a session's translation is included once it is translated (Draft or
Reviewed); sessions spoken in that language come as they are. Sessions left out are
listed, with the reason, in a README.txt inside the ZIP.

Scope: asset_view

Parameters:

- `event_id` (path, string (uuid), required)
- `format` (query, one of srt, vtt)
- `language` (query, string)
- `session_ids` (query, string): Comma-separated session ids (default: all)

Responses:

- 200: Successful Response
- 422: The request did not validate.
- 401: The key is missing, unknown, revoked or expired.
- 403: The key lacks the scope this call needs, or the organisation is not on Enterprise.
- 429: Over the request rate. Wait for Retry-After seconds.

### GET /v1/search

Global search

Search the organisation's events, speakers, attendees, sponsors and sessions by name/title
text. Restrict with `types` (comma-separated) and cap hits per type with `limit`; queries
shorter than 2 characters return no results.

Scope: any key

Parameters:

- `q` (query, string, required): Search text
- `types` (query, string): Comma-separated subset of SEARCHABLE_TYPES
- `limit` (query, integer): Max hits per type

Responses:

- 200: Successful Response
- 422: The request did not validate.
- 401: The key is missing, unknown, revoked or expired.
- 403: The key lacks the scope this call needs, or the organisation is not on Enterprise.
- 429: Over the request rate. Wait for Retry-After seconds.

### GET /v1/schemas/transcript-v1.json

Get the transcript v1 schema

The JSON Schema for the version-1 transcript export format, for validating transcripts you
receive from the API or webhooks.

Scope: any key

Responses:

- 200: Successful Response
- 401: The key is missing, unknown, revoked or expired.
- 403: The key lacks the scope this call needs, or the organisation is not on Enterprise.
- 429: Over the request rate. Wait for Retry-After seconds.

### GET /v1/events/{event_id}/photos

List photos

The event's photos in capture-time order, with their tags, counts (total, tagged,
untagged, hidden), the current watermark and any re-watermarking progress. `public=true`
returns the website feed: published photos with public tags only.

Scope: any key

Parameters:

- `event_id` (path, string (uuid), required)
- `public` (query, boolean): Website feed: published photos, public tags only.

Responses:

- 200: Successful Response
- 422: The request did not validate.
- 401: The key is missing, unknown, revoked or expired.
- 403: The key lacks the scope this call needs, or the organisation is not on Enterprise.
- 429: Over the request rate. Wait for Retry-After seconds.

### POST /v1/events/{event_id}/photos

Upload photo

One photo per request; the admin uploads a batch a few at a time. Watermarked on the
way in with the event's current watermark.

Scope: content_edit or prep_manage

Parameters:

- `event_id` (path, string (uuid), required)

Body (multipart form):

- `file` (string, required): The file to upload.

Responses:

- 201: Successful Response
- 422: The request did not validate.
- 401: The key is missing, unknown, revoked or expired.
- 403: The key lacks the scope this call needs, or the organisation is not on Enterprise.
- 429: Over the request rate. Wait for Retry-After seconds.

### PATCH /v1/events/{event_id}/photos/{photo_id}

Update photo

Publish or hide a photo on the website feed (`published`). 404 if the photo is not part
of this event.

Scope: any key

Parameters:

- `event_id` (path, string (uuid), required)
- `photo_id` (path, string (uuid), required)

Body (JSON):

- `published` (boolean): Whether this is visible on the public pages.

Responses:

- 200: Successful Response
- 422: The request did not validate.
- 401: The key is missing, unknown, revoked or expired.
- 403: The key lacks the scope this call needs, or the organisation is not on Enterprise.
- 429: Over the request rate. Wait for Retry-After seconds.

### DELETE /v1/events/{event_id}/photos/{photo_id}

Delete photo

Delete a photo and its stored files. Returns 204; 404 if the photo is not part of this
event.

Scope: any key

Parameters:

- `event_id` (path, string (uuid), required)
- `photo_id` (path, string (uuid), required)

Responses:

- 204: Successful Response
- 422: The request did not validate.
- 401: The key is missing, unknown, revoked or expired.
- 403: The key lacks the scope this call needs, or the organisation is not on Enterprise.
- 429: Over the request rate. Wait for Retry-After seconds.

### POST /v1/events/{event_id}/photos/assign-session

Assign session

Reassign photos whose capture time put them in the wrong session (a camera clock off,
a session that started early or overran). The choice holds over the time from then on.

Scope: content_edit or prep_manage

Parameters:

- `event_id` (path, string (uuid), required)

Body (JSON):

- `photo_ids` (array of string (uuid), required): The ids of the photos to act on.
- `session_id` (string (uuid)): The id of the session this relates to.

Responses:

- 200: Successful Response
- 422: The request did not validate.
- 401: The key is missing, unknown, revoked or expired.
- 403: The key lacks the scope this call needs, or the organisation is not on Enterprise.
- 429: Over the request rate. Wait for Retry-After seconds.

### PUT /v1/events/{event_id}/photos/{photo_id}/tags

Set tags

Replace who is in the photo. Each entry is a speaker, an attendee (both must belong to
this event) or a typed-in name. Duplicates collapse to one.

Scope: any key

Parameters:

- `event_id` (path, string (uuid), required)
- `photo_id` (path, string (uuid), required)

Body (JSON):

- `tags` (array of TagIn): Labels used to group or filter these records.

Responses:

- 200: Successful Response
- 422: The request did not validate.
- 401: The key is missing, unknown, revoked or expired.
- 403: The key lacks the scope this call needs, or the organisation is not on Enterprise.
- 429: Over the request rate. Wait for Retry-After seconds.

### GET /v1/events/{event_id}/photos/people

Taggable people

Everyone who can be tagged: the event's speakers, then its attendees.

Scope: content_edit or prep_manage

Parameters:

- `event_id` (path, string (uuid), required)

Responses:

- 200: Successful Response
- 422: The request did not validate.
- 401: The key is missing, unknown, revoked or expired.
- 403: The key lacks the scope this call needs, or the organisation is not on Enterprise.
- 429: Over the request rate. Wait for Retry-After seconds.

### PUT /v1/events/{event_id}/photos/watermark

Set watermark

Set the watermark: a PNG (transparency respected) stamped bottom-right. Applies to
photos uploaded from now on; POST /rerender applies it to the ones already there.

Scope: content_edit or prep_manage

Parameters:

- `event_id` (path, string (uuid), required)

Body (multipart form):

- `file` (string, required): The file to upload.

Responses:

- 200: Successful Response
- 422: The request did not validate.
- 401: The key is missing, unknown, revoked or expired.
- 403: The key lacks the scope this call needs, or the organisation is not on Enterprise.
- 429: Over the request rate. Wait for Retry-After seconds.

### DELETE /v1/events/{event_id}/photos/watermark

Remove watermark

Remove the event's photo watermark so new uploads are not stamped; photos already
watermarked keep it until re-rendered. Returns the updated photo list.

Scope: content_edit or prep_manage

Parameters:

- `event_id` (path, string (uuid), required)

Responses:

- 200: Successful Response
- 422: The request did not validate.
- 401: The key is missing, unknown, revoked or expired.
- 403: The key lacks the scope this call needs, or the organisation is not on Enterprise.
- 429: Over the request rate. Wait for Retry-After seconds.

### POST /v1/events/{event_id}/photos/rerender

Re-render a photo

Re-draw every photo's web copies with the event's current watermark (or none).

Progress is recorded on the event and returned by `GET /photos` as `rerender`, so the
admin shows a real progress bar. A run already in progress is returned as-is rather than
queued twice.

Scope: content_edit or prep_manage

Parameters:

- `event_id` (path, string (uuid), required)

Responses:

- 202: Successful Response
- 422: The request did not validate.
- 401: The key is missing, unknown, revoked or expired.
- 403: The key lacks the scope this call needs, or the organisation is not on Enterprise.
- 429: Over the request rate. Wait for Retry-After seconds.

### POST /v1/branding/logo

Upload logo

Upload a brand logo; returns a stable URL to store in brand_logo_url (customer,
brand, product or sub-product level). Org-scoped by the caller's organisation.

Scope: org_manage

Body (multipart form):

- `file` (string, required): The file to upload.

Responses:

- 200: Successful Response
- 422: The request did not validate.
- 401: The key is missing, unknown, revoked or expired.
- 403: The key lacks the scope this call needs, or the organisation is not on Enterprise.
- 429: Over the request rate. Wait for Retry-After seconds.

### POST /v1/branding/headshot

Upload headshot

Upload a speaker or attendee headshot; returns a stable URL to store in ``headshot_url``.

This exists because until now the field only accepted a URL, so anyone preparing an event
had to find the person's face already hosted somewhere on the web and point at it. That is
not a small inconvenience — those links are someone else's to break. Of the 59 portraits on
one live event site, twelve were hotlinked off LinkedIn, Google's thumbnail cache and
various press sites, and the LinkedIn ones already serve nothing at all because LinkedIn
blocks hotlinking. Uploading puts the image somewhere we control and can serve.

Deliberately NOT scoped to an event or a speaker id. The edit dialog offers the upload
before a new speaker has been saved, so there is no id to hang it on yet, and the caller
stores the returned URL through the ordinary speaker write. PREP_MANAGE, because that is
what writing a speaker already takes.

Scope: prep_manage

Body (multipart form):

- `file` (string, required): The file to upload.

Responses:

- 200: Successful Response
- 422: The request did not validate.
- 401: The key is missing, unknown, revoked or expired.
- 403: The key lacks the scope this call needs, or the organisation is not on Enterprise.
- 429: Over the request rate. Wait for Retry-After seconds.

### POST /v1/branding/sponsor-logo

Upload sponsor logo

Upload a sponsor's or partner's logo; returns a stable URL to store in the sponsor's
``logo_url``. Like the headshot upload: not tied to a sponsor id (the dialog offers it before
a new sponsor is saved), PREP_MANAGE because that is what editing a sponsor takes, and the
same raster-only rules (an SVG can carry script).

Scope: prep_manage

Body (multipart form):

- `file` (string, required): The file to upload.

Responses:

- 200: Successful Response
- 422: The request did not validate.
- 401: The key is missing, unknown, revoked or expired.
- 403: The key lacks the scope this call needs, or the organisation is not on Enterprise.
- 429: Over the request rate. Wait for Retry-After seconds.

### POST /v1/branding/site-icon

Upload site icon

Upload an event website's icon (browser tab, bookmarks, phone home screen); returns the
URL to store as the live page's `share.icon_url`. A square PNG of at least 512 × 512, or an
SVG with no scripts, under 5 MB. 400 `INVALID_REQUEST` says what is wrong.

Scope: event_edit

Body (multipart form):

- `file` (string, required): The file to upload.

Responses:

- 200: Successful Response
- 422: The request did not validate.
- 401: The key is missing, unknown, revoked or expired.
- 403: The key lacks the scope this call needs, or the organisation is not on Enterprise.
- 429: Over the request rate. Wait for Retry-After seconds.

### POST /v1/branding/share-image

Upload share image

Upload the image a shared event website link shows; returns the URL to store as the live
page's `share.image_url`. PNG, JPG or WEBP, at least 1200 × 630 and about that shape
(1.8–2.0 : 1), under 5 MB. 400 `INVALID_REQUEST` says what is wrong.

Scope: event_edit

Body (multipart form):

- `file` (string, required): The file to upload.

Responses:

- 200: Successful Response
- 422: The request did not validate.
- 401: The key is missing, unknown, revoked or expired.
- 403: The key lacks the scope this call needs, or the organisation is not on Enterprise.
- 429: Over the request rate. Wait for Retry-After seconds.

### POST /v1/branding/image/frame

Frame image

Save the part of an image that should show in a round headshot or a square logo.

The edit dialogs let people zoom and drag an image into its icon. The browser can show any
image but cannot read the pixels of one from another site, so the crop happens here: the
browser sends the visible square, and this stores that square as a new image under the
organisation's branding prefix, like any upload. A pasted link is fetched once through the
SSRF-guarded client (public addresses only), after which the picture is ours to serve, not
a hotlink someone else can break.

Scope: prep_manage

Body (JSON):

- `source` (string, required): An image this organisation uploaded (`/v1/media/branding/...`) or a public http(s) link to one.
- `x` (number, required): Left edge, as a fraction of the image width.
- `y` (number, required): Top edge, as a fraction of the image height.
- `width` (number, required): Width, as a fraction of the image width.
- `height` (number, required): Height, as a fraction of the image height.
- `shape` (one of circular, rounded): "circular" for a headshot (saved as JPEG), "rounded" for a logo (PNG, keeping transparency).

Responses:

- 200: Successful Response
- 422: The request did not validate.
- 401: The key is missing, unknown, revoked or expired.
- 403: The key lacks the scope this call needs, or the organisation is not on Enterprise.
- 429: Over the request rate. Wait for Retry-After seconds.

### GET /v1/media/{path}

Serve media

Read-only serving of branding assets, presigned and redirected.

Two classes of object share this prefix and they are NOT equally public:

* **Brand assets** (logos) stay unauthenticated. Public event and registration pages
  embed them with no login, and an ``<img src>`` cannot carry a bearer token.
* **Report output** (``branding/<org>/reports/...``) requires a signed, expiring token.
  These carry analyst-grade content — quotes, sentiment, sponsor and attendee
  intelligence — and were previously served to anyone holding the URL, forever, because
  the endpoint re-presigned on every hit. A bearer token is not an option (reports
  download from a plain ``<a href>``), so the capability lives in the URL instead:
  scoped to one key and one org, and expiring. See ``app.media_tokens``.

A bad token and a missing object answer identically (404), so this can neither confirm
that a report exists nor be used to probe another tenant's keys.

Scope: any key

Parameters:

- `path` (path, string, required)
- `t` (query, string)

Responses:

- 200: Successful Response
- 422: The request did not validate.
- 401: The key is missing, unknown, revoked or expired.
- 403: The key lacks the scope this call needs, or the organisation is not on Enterprise.
- 429: Over the request rate. Wait for Retry-After seconds.
