# Transcripts & photos

How to pull an event's **transcripts as finished files** (one document for the whole event, a ZIP, or one talk at a time), the **recordings** of each talk, and the event's **photos** — for an archive, a CMS, or your event website.

- **Base URL:** `https://api.audiobly.com` — all paths are under `/v1`.
- **Auth:** `Authorization: Bearer <API_KEY>` (an `sk_live_…` key from **Organisation → API Keys**). Transcript files need the `asset_view` permission; managing photos needs `content_edit` or `prep_manage`. Unscoped keys have all of these.
- **Plans:** everything in this guide is available on every plan.
- In the API, each talk on the programme is a **session**; `EVENT_ID` and `SESSION_ID` are their UUIDs.

---

## 1. List the transcripts and their editorial status

`GET /v1/events/{EVENT_ID}/transcripts`

```bash
curl -s https://api.audiobly.com/v1/events/$EVENT_ID/transcripts -H "Authorization: Bearer $KEY"
```

```json
{
  "data": [
    {
      "session_id": "…", "number": 1, "title": "Opening Keynote",
      "starts_at": "2026-09-05T09:15:00Z", "ends_at": "2026-09-05T10:00:00Z",
      "status": "published", "pipeline_status": "APPROVED",
      "speakers": ["Ada Lovelace"], "length_seconds": 2710.4,
      "version": 3, "version_created_at": "2026-09-05T14:02:11Z"
    }
  ],
  "counts": { "published": 6, "reviewed": 2, "raw": 3, "none": 1 }
}
```

Every session is listed in programme order, including ones without a transcript yet.

| Field | Meaning |
|---|---|
| `number` | position in the programme (1-based) |
| `status` | the **editorial status** — see below |
| `pipeline_status` | the session's processing status (e.g. `TRANSCRIBING`, `TRANSCRIPT_READY`, `IN_REVIEW`, `APPROVED`) |
| `speakers` | speaker names on the transcript |
| `length_seconds` | length of the transcribed audio |
| `version`, `version_created_at` | the latest transcript version and when it was made (`null` when there is none) |
| `counts` | how many sessions are in each editorial status |

**Editorial status**

| `status` | Meaning |
|---|---|
| `raw` | machine transcript, not yet reviewed by an editor — names, figures and terms may be wrong |
| `reviewed` | checked and corrected by an editor, not yet approved |
| `published` | approved — the final transcript of record |
| `none` | no transcript yet; never included in a download |

Downloads are allowed at **any** status. The status is printed inside every file (and in each file name in a ZIP), so nobody mistakes a raw machine transcript for the approved one.

---

## 2. Download transcripts as files

All three endpoints return the file itself (with a `Content-Disposition: attachment` file name), not JSON. Common query parameters:

| Parameter | Values | Default |
|---|---|---|
| `format` | `pdf`, `docx`, `txt` | `pdf` |
| `timestamps` | `true` / `false` — print the time of each turn | `true` |

Headings and labels are in the event's language.

### 2a. The whole event in one document

`GET /v1/events/{EVENT_ID}/transcripts/download`

Every transcribed session in programme order, with a contents page and each session's status. Extra parameter: `include_raw` (default `true`) — set `false` to leave out sessions whose transcript is still `raw` (they are listed as left out in the document).

```bash
curl -s "https://api.audiobly.com/v1/events/$EVENT_ID/transcripts/download?format=docx&include_raw=false" \
  -H "Authorization: Bearer $KEY" -OJ
```

`404 NOT_FOUND` if no session has a transcript to include yet.

### 2b. Selected sessions as a ZIP

`GET /v1/events/{EVENT_ID}/transcripts/zip?session_ids=<id>,<id>,…`

One file per selected session, in programme order, with the status in each file name. `session_ids` is **required** (comma-separated). Selected sessions without a transcript are skipped.

```bash
curl -s "https://api.audiobly.com/v1/events/$EVENT_ID/transcripts/zip?session_ids=$S1,$S2&format=pdf" \
  -H "Authorization: Bearer $KEY" -o transcripts.zip
```

`400 INVALID_REQUEST` for a malformed or empty `session_ids`; `404 NOT_FOUND` if none of them has a transcript.

### 2c. One session as a document

`GET /v1/events/{EVENT_ID}/transcripts/{SESSION_ID}/download?format=pdf`

The same layout as the full-event document, for one session. `404` if the session doesn't exist or has no transcript yet.

### 2d. One session in caption, data or translated formats

`GET /v1/events/{EVENT_ID}/sessions/{SESSION_ID}/transcript/download`

| Parameter | Values | Default |
|---|---|---|
| `format` | `txt`, `srt`, `vtt`, `json`, `docx`, `pdf` | `txt` |
| `timestamps` | `true` / `false` (human-readable formats) | `true` |
| `lang` | optional language code, e.g. `fr` — returns a **machine translation** of the transcript into that language | — |

Use this one for subtitle files (`srt`, `vtt`) or raw data (`json`). Roster names are applied. A translated download is labelled in the file as an unreviewed machine translation; the stored transcript is never changed. If translation is briefly unavailable you get `503 TRANSLATION_FAILED` — retry.

```bash
curl -s "https://api.audiobly.com/v1/events/$EVENT_ID/sessions/$SESSION_ID/transcript/download?format=srt" \
  -H "Authorization: Bearer $KEY" -o keynote.srt
```

For the transcript as structured JSON (utterances with speaker and timing), use `GET /v1/events/{EVENT_ID}/sessions/{SESSION_ID}/transcript` — its shape is the JSON Schema at `GET /v1/schemas/transcript-v1.json`.

### Errors

| Status | Code | When |
|---|---|---|
| `400` | `INVALID_REQUEST` | unknown `format`, bad `session_ids` |
| `404` | `NOT_FOUND` | event/session not in your organisation, or nothing to download yet |
| `503` | `TRANSLATION_FAILED` | `lang` translation temporarily unavailable |

---

## 3. Download a talk's recording

`GET /v1/events/{EVENT_ID}/sessions/{SESSION_ID}/download`

The session's media as a file worth keeping: **MP3** for audio, **MP4** for video, whatever was originally uploaded or captured (WebM, MOV, WAV …). The conversion runs once in the background and is kept, so:

1. The first call returns `{"status": "preparing", "format": "mp3", "filename": "…"}`.
2. Call again after a short wait; when ready you get `{"status": "ready", "format": "mp3", "filename": "…", "url": "https://…", "expires_in": 7200}`.
3. Download `url` within `expires_in` seconds.

```bash
curl -s https://api.audiobly.com/v1/events/$EVENT_ID/sessions/$SESSION_ID/download -H "Authorization: Bearer $KEY"
```

`409 NO_AUDIO` if the session has no media. For the media exactly as stored, use `GET /v1/events/{EVENT_ID}/sessions/{SESSION_ID}/media-url`.

---

## 4. Photos

### 4a. List photos

`GET /v1/events/{EVENT_ID}/photos`

```json
{
  "data": [
    {
      "id": "…", "file_name": "IMG_0412.jpg",
      "web_url": "/v1/media/branding/…", "thumb_url": "/v1/media/branding/…",
      "width": 2048, "height": 1365, "taken_at": "2026-09-05T09:31:02Z",
      "published": true, "watermarked": true,
      "session": { "id": "…", "title": "Opening Keynote", "starts_at": "2026-09-05T09:15:00Z" },
      "tags": [
        { "id": "…", "kind": "speaker", "speaker_id": "…", "name": "Dr Ada Lovelace",
          "role": "Chief Engineer", "company": "Analytical Engines", "headshot_url": "…", "public": true }
      ]
    }
  ],
  "counts": { "total": 120, "tagged": 84, "untagged": 36, "hidden": 4 },
  "watermark_url": "/v1/media/branding/…"
}
```

| Field | Meaning |
|---|---|
| `web_url`, `thumb_url` | display and thumbnail versions (watermarked when the event has a watermark). Relative — prefix `https://api.audiobly.com`. |
| `published` | `false` = hidden from the website feed |
| `session`, `session_set` | the talk the photo belongs to. When `session_set` is `false` it is matched automatically from the time the photo was taken; `true` means an editor chose it (a chosen `null` = arrivals, breaks, the room). |
| `tags[]` | people in the photo: `kind` is `speaker`, `attendee` or `other` (a name typed in by hand); `public` says whether the tag may be shown publicly |
| `suggested[]` | people on stage at the time the photo was taken — tagging suggestions (admin view only) |

**Website feed:** add `?public=true` to get only **published** photos and only the tags cleared for public display (speaker tags are public by default; attendee and hand-typed tags are private unless marked public). Use this from your event website's server with your API key.

```bash
curl -s "https://api.audiobly.com/v1/events/$EVENT_ID/photos?public=true" -H "Authorization: Bearer $KEY"
```

### 4b. People you can tag

`GET /v1/events/{EVENT_ID}/photos/people` returns the event's speakers and attendees as tag candidates: `[{kind, speaker_id | attendee_id, name, role, company, headshot_url}]`.

### 4c. Managing photos

| Action | Endpoint |
|---|---|
| Upload one photo (multipart, `file`; JPG, PNG or WEBP under 40 MB) | `POST /v1/events/{EVENT_ID}/photos` |
| Show/hide on the website | `PATCH /v1/events/{EVENT_ID}/photos/{PHOTO_ID}` with `{"published": false}` |
| Set the people in a photo (replaces the list, max 50) | `PUT /v1/events/{EVENT_ID}/photos/{PHOTO_ID}/tags` with `{"tags": [{"speaker_id": "…"}, {"attendee_id": "…", "public": true}, {"name": "Guest", "company": "…"}]}` |
| Put photos in a session (or none) | `POST /v1/events/{EVENT_ID}/photos/assign-session` with `{"photo_ids": [...], "session_id": "…" or null}` |
| Delete a photo | `DELETE /v1/events/{EVENT_ID}/photos/{PHOTO_ID}` |
| Set / remove the watermark | `PUT /v1/events/{EVENT_ID}/photos/watermark` (multipart) · `DELETE /v1/events/{EVENT_ID}/photos/watermark` |
| Re-apply the current watermark to every photo | `POST /v1/events/{EVENT_ID}/photos/rerender` (202; progress in the list's `rerender` field) |

Upload errors return `400` with a plain message (unsupported type, over 40 MB, unreadable image).
