> ## Documentation Index
> Fetch the complete documentation index at: https://docs.animo.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Schedule

# Schedule

## Overview

An event's **schedule** is four things that nest:

| Resource | What it is | Belongs to |
| - | - | - |
| **Timetable** | One day of the agenda, with the hours it runs between | the event |
| **Location** | A stage, room or track within that day | the timetable |
| **Activity** | One session, inside a location | a location of one day |
| **Speaker** | A person billed on sessions | the **company**, not an event |

A speaker is reused across every event the company runs, the way a
[discount](https://docs.animo.co/endpoints/discounts.md) is — so speakers live at `/{company}/speakers`, not under an
event. The sessions they are billed on hang off the event.

**Subscription:** All plans, including Free.

### Scopes

Every endpoint under `/event/{organizingEvent}/schedule` needs **`events:read` as well
as its own `schedule:*` scope**. The event route group names `events:read`, and a token
must carry every scope on the stack — so a token holding only `schedule:read` gets a
`403` on `GET /schedule`, with nothing in the URL to suggest why.

**Every write also needs `schedule:read`.** The schedule and speaker route groups name
it, so creating, updating or deleting takes `schedule:read` plus the write scope — a
token holding only `schedule:create` gets a `403`.

`/{company}/speakers` sits at company level and does not need `events:read`.

| Scope | What it allows |
| - | - |
| `schedule:read` | Read the schedule and the company's speakers |
| `schedule:create` | Add days, locations, activities and speakers |
| `schedule:update` | Change them |
| `schedule:delete` | Delete them |

### An event has no schedule until one is created

`GET /schedule` returns an empty list for an event nobody has built an agenda for, and
**creates nothing**. The admin page draws a skeleton of default days in that situation;
the API deliberately does not — a read behind a read-only scope must not write. Call
[Create timetable](#create-timetable) to add the first day.

`GET /schedule` is also **not paginated**. The schedule is a structure, not a feed, and
a caller that read half of it would have read nothing useful.

## Identifiers

| Resource | Addressed by | Note |
| - | - | - |
| Timetable | sqid | `date` is editable, so it cannot be the id |
| Location | **slug** | Unique only within its own day, so always nested under a timetable |
| Activity | sqid | Globally unique, so reached flat at `/schedule/activities/{id}` |
| Speaker | sqid | |

**A location slug is generated from the name when the location is created and is never
regenerated.** Renaming a location does not move the resource: a location created as
"Main Stage" and renamed to "Grand Stage" is still `main-stage`. Two locations with the
same name in one day get `main-stage` and `main-stage-1`, so do not assume the slug from
the name — read it from the response.

## Times

Every time in the schedule is **wall clock in the event's timezone**, formatted `HH:mm`.
None of them is an ISO timestamp and none carries a UTC offset; the date they belong to
is the day's own `date`.

* An activity's `duration` is in **minutes**.
* An activity's `ends_at` is derived from `starts_at` and `duration`. It is read-only —
  sending it is ignored.
* A timetable's `starts_at` / `ends_at` are the bounds the agenda is drawn between.
  **Adding an activity outside them widens the day to fit** rather than being refused,
  which is what the admin editor does. The day never widens past `23:59` of its
  own date, so an activity that runs past midnight takes it that far and no further.

## Verbs

The mix is deliberate, not an oversight:

| Operation | Verb | Why |
| - | - | - |
| Update timetable | `PATCH` | carries no file |
| Update location | `PATCH` | carries no file |
| Update activity | **`POST`** | can carry an `image` file part |
| Update speaker | **`POST`** | can carry an `avatar` file part |

A request that carries a file is `multipart/form-data`, which `PATCH` does not reach in
most HTTP clients. `POST /page` already solved this the same way; there is no `_method`
spoofing to do.

## Images

The activity `image` and the speaker `avatar` are **fields of their record**, not
separate resources. Send them as file parts on the same create or update request, with
the rest of the fields alongside.

* Accepted: `jpg`, `jpeg`, `png`, `webp`, `apng`, `avif`, at most **1 MB**.
* Sending `image: null` / `avatar: null` **removes** the stored file.
* `multipart/form-data` sends every field as a string, which is fine: `"duration": "45"`
  is accepted exactly like `45`.

### Speaker avatars are always populated

`avatar_url` is never `null` and is never a gravatar URL. A speaker with no uploaded
photo gets an initials placeholder rendered as a `data:image/svg+xml;base64,…` URI you
can put straight into an `<img src>`. Do not write a null check for it — it will never
fire.

## Endpoints

### Get the schedule

* **Method:** `GET`
* **Path:** `/api/v1/{company}/event/{organizingEvent}/schedule`
* **Scopes:** `events:read` + `schedule:read`

The whole agenda in one call, ordered by `date`, then location `position`, then activity
`starts_at`. Not paginated.

There is deliberately **no** index of timetables and no single `GET` for a location:
this call returns both, nested where they belong.

#### Response `200`

```json theme={null}
{
  "data": [
    {
      "id": "ZWitU",
      "date": "2026-04-25",
      "starts_at": "09:00",
      "ends_at": "18:00",
      "locations": [
        {
          "slug": "main-stage",
          "name": "Main Stage",
          "subtitle": null,
          "description": null,
          "position": 1,
          "activities": [
            {
              "id": "k2Jd9",
              "title": "Opening keynote",
              "subtitle": null,
              "description": null,
              "type": "generic",
              "starts_at": "09:30",
              "duration": 45,
              "ends_at": "10:15",
              "image_url": null,
              "location": "main-stage",
              "timetable_id": "ZWitU",
              "speakers": [
                {
                  "id": "Qp3xV",
                  "first_name": "Jane",
                  "last_name": "Doe",
                  "name": "Jane Doe",
                  "email": "jane@acme.test",
                  "job_title": "CTO",
                  "company_name": "Acme",
                  "short_bio": "Builds things.",
                  "bio": "Builds things, at length.",
                  "avatar_url": "data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94..."
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}
```

#### Activity fields

| Field | Type | Description |
| - | - | - |
| `id` | string | Activity sqid |
| `title` | string | |
| `subtitle` | string\|null | |
| `description` | string\|null | Max 2048 characters |
| `type` | string | `generic` or `break`. A break renders as a gap rather than a session |
| `starts_at` | string | `HH:mm` wall clock in the event timezone |
| `duration` | integer | Minutes |
| `ends_at` | string | Derived, read-only |
| `image_url` | string\|null | |
| `location` | string | Slug of the location it sits in |
| `timetable_id` | string | Sqid of the day it sits on |
| `speakers` | array | The speakers billed on it |

***

### Create timetable

* **Method:** `POST`
* **Path:** `/api/v1/{company}/event/{organizingEvent}/schedule/timetables/create`
* **Scopes:** `events:read` + `schedule:read` + `schedule:create`

**The new day comes with one location already on it**, so it can hold an activity
straight away. Read its slug from the response.

#### Request body

```json theme={null}
{ "date": "2026-04-25", "starts_at": "09:00", "ends_at": "18:00" }
```

| Field | Required | Description |
| - | - | - |
| `date` | Yes | `YYYY-MM-DD`. Must not be a date another day of this event already uses |
| `starts_at` | Yes | `HH:mm` |
| `ends_at` | Yes | `HH:mm`, after `starts_at` |

A duplicate `date` is `422`, not a silent second day.

#### Response `201`

A single timetable in a `data` envelope, with its `locations`.

***

### Show timetable

* **Method:** `GET`
* **Path:** `/api/v1/{company}/event/{organizingEvent}/schedule/timetables/{timetable}`
* **Scopes:** `events:read` + `schedule:read`

One day with its locations and activities. A timetable sqid from another event is `404`.

***

### Update timetable

* **Method:** `PATCH`
* **Path:** `/api/v1/{company}/event/{organizingEvent}/schedule/timetables/{timetable}`
* **Scopes:** `events:read` + `schedule:read` + `schedule:update`

Partial: a field you do not send keeps the value it has. Moving the `date` does not move
the activities on it — they keep their wall-clock times, which are then read against the
new date.

***

### Delete timetable

* **Method:** `DELETE`
* **Path:** `/api/v1/{company}/event/{organizingEvent}/schedule/timetables/{timetable}`
* **Scopes:** `events:read` + `schedule:read` + `schedule:delete`

**Deletes the day's locations and all of their activities with it.** The speakers billed
on those activities belong to the company and survive.

#### Response `204`

No content.

***

### Create location

* **Method:** `POST`
* **Path:** `/api/v1/{company}/event/{organizingEvent}/schedule/timetables/{timetable}/locations/create`
* **Scopes:** `events:read` + `schedule:read` + `schedule:create`

#### Request body

```json theme={null}
{ "name": "Main Stage", "subtitle": "Where it all happens", "position": 1 }
```

| Field | Required | Description |
| - | - | - |
| `name` | Yes | Max 255 characters. The slug is made from this, once |
| `subtitle` | No | Max 255 characters |
| `description` | No | Max 1000 characters |
| `position` | No | Order within the day, from 1. Defaults to last |

#### Response `201`

A single location in a `data` envelope, carrying the `slug` it is addressed by from then
on.

***

### Update location

* **Method:** `PATCH`
* **Path:** `/api/v1/{company}/event/{organizingEvent}/schedule/timetables/{timetable}/locations/{scheduleLocation}`
* **Scopes:** `events:read` + `schedule:read` + `schedule:update`

Partial. **Renaming does not change the slug.** A slug from another day is `404`.

***

### Delete location

* **Method:** `DELETE`
* **Path:** `/api/v1/{company}/event/{organizingEvent}/schedule/timetables/{timetable}/locations/{scheduleLocation}`
* **Scopes:** `events:read` + `schedule:read` + `schedule:delete`

**Deletes every activity in the location.** The speakers survive.

**A day must keep at least one location.** Deleting the last one is `422` — a day with no
location cannot hold an activity. Delete the whole day instead.

#### Response `204`

No content.

***

### Create activity

* **Method:** `POST`
* **Path:** `/api/v1/{company}/event/{organizingEvent}/schedule/timetables/{timetable}/activities/create`
* **Scopes:** `events:read` + `schedule:read` + `schedule:create`
* **Content type:** `application/json` or `multipart/form-data` (required to send `image`)

Nested under the day because `location` is a slug, which only means anything within that
day.

#### Request body

```json theme={null}
{
  "title": "Opening keynote",
  "location": "main-stage",
  "starts_at": "09:30",
  "duration": 45,
  "type": "generic",
  "speakers": ["Qp3xV"]
}
```

| Field | Required | Description |
| - | - | - |
| `title` | Yes | Max 255 characters |
| `location` | Yes | Slug of a location **of this day** |
| `starts_at` | Yes | `HH:mm` wall clock in the event timezone |
| `duration` | Yes | Minutes, from 1 to 1440. `"45"` is accepted |
| `subtitle` | No | Max 255 characters |
| `description` | No | Max 2048 characters |
| `type` | No | `generic` (default) or `break` |
| `image` | No | File part; see [Images](#images) |
| `speakers` | No | Speaker sqids; see below |

An activity that starts before the day's `starts_at` or ends after its `ends_at` **widens
the day** to fit.

#### Response `201`

A single activity in a `data` envelope.

***

### Show activity

* **Method:** `GET`
* **Path:** `/api/v1/{company}/event/{organizingEvent}/schedule/activities/{activity}`
* **Scopes:** `events:read` + `schedule:read`

Flat, because an activity sqid is globally unique. A sqid from another event is `404`.

***

### Update activity

* **Method:** `POST` (not `PATCH` — it can carry a file; see [Verbs](#verbs))
* **Path:** `/api/v1/{company}/event/{organizingEvent}/schedule/activities/{activity}`
* **Scopes:** `events:read` + `schedule:read` + `schedule:update`

Partial: a field you do not send keeps the value it has.

`location` **moves the activity to another location of the same day**. Moving it to
another day is not supported and is `422`: the start time is wall clock against that
day's date. Create it on the other day and delete this one instead.

`image: null` removes the stored image.

#### `speakers` replaces the whole list

Sending `speakers` replaces every speaker billed on the activity, it does not add to
them:

* `["Qp3xV", "k2Jd9"]` — exactly these two, anyone else is removed
* `[]` — removes them all
* key absent — the list is left alone

Read the current ids from `GET /schedule` and send them back alongside the new one. Every
sqid must belong to **this event's company**; one that does not is `422` with nothing
written.

***

### Delete activity

* **Method:** `DELETE`
* **Path:** `/api/v1/{company}/event/{organizingEvent}/schedule/activities/{activity}`
* **Scopes:** `events:read` + `schedule:read` + `schedule:delete`

Deletes the activity and its image. The speakers billed on it survive.

#### Response `204`

No content.

***

### List speakers

* **Method:** `GET`
* **Path:** `/api/v1/{company}/speakers`
* **Scope:** `schedule:read` (no `events:read` — this is a company-level resource)

Paginated; see [Conventions — Pagination](https://docs.animo.co/conventions.md#pagination).

#### Query parameters

| Name | Type | Description |
| - | - | - |
| `q` | string | Case-insensitive substring filter on first or last name |
| `page` | integer | Pagination page |

***

### Show speaker

* **Method:** `GET`
* **Path:** `/api/v1/{company}/speakers/{speaker}`
* **Scope:** `schedule:read`

A sqid from another company is `404`.

***

### Create speaker

* **Method:** `POST`
* **Path:** `/api/v1/{company}/speakers/create`
* **Scopes:** `schedule:read` + `schedule:create`
* **Content type:** `application/json` or `multipart/form-data` (required to send `avatar`)

#### Request body

```json theme={null}
{
  "first_name": "Jane",
  "last_name": "Doe",
  "email": "jane@acme.test",
  "job_title": "CTO",
  "company_name": "Acme",
  "short_bio": "Builds things.",
  "bio": "Builds things, at length."
}
```

| Field | Required | Description |
| - | - | - |
| `first_name` | Yes | Max 255 characters |
| `last_name` | No | Max 255 characters |
| `email` | No | Max 255 characters. Shown on the programme; Animo never sends a speaker email, so this is not validated as strictly as an address Animo writes to |
| `job_title` | No | Max 255 characters |
| `company_name` | No | The organisation the speaker is billed from, not the Animo company |
| `short_bio` | No | Max 255 characters |
| `bio` | No | Max 1500 characters |
| `avatar` | No | File part; see [Images](#images) |

Creating a speaker does not put them on a session. Take the `id` from the response and
name it in `speakers` on an activity.

#### Response `201`

A single speaker in a `data` envelope.

***

### Update speaker

* **Method:** `POST` (not `PATCH` — it can carry a file; see [Verbs](#verbs))
* **Path:** `/api/v1/{company}/speakers/{speaker}`
* **Scopes:** `schedule:read` + `schedule:update`

Partial. `short_bio` and `bio` are independent: sending one keeps the other.

`avatar: null` removes the stored photo.

The change shows on every session the speaker is billed on, across every event of the
company.

***

### Delete speaker

* **Method:** `DELETE`
* **Path:** `/api/v1/{company}/speakers/{speaker}`
* **Scopes:** `schedule:read` + `schedule:delete`

**Removes the speaker from every activity on every event of the company.** The activities
themselves are untouched. Use [Update activity](#update-activity) to take a speaker off
one session instead.

#### Response `204`

No content.

## Errors

| Status | When |
| - | - |
| `403` | The token is missing `events:read`, `schedule:read`, or the `schedule:*` write scope for this operation |
| `404` | A timetable, activity or speaker that belongs to another event or company; a location slug from another day; an event the company attends rather than organizes |
| `422` | A duplicate day `date`; a `location` on another day; a speaker sqid from another company; deleting the last location of a day |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.