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

# Presentations

> Read a deck and edit its slides in place.

A **presentation** is a deck of slides on a 1920 × 1080 canvas. `GET` returns
every slide and every element's `id`, `type`, `position` (`x`, `y`, `w`, `h`),
content and style. Read it first: edits address slides and elements by id.

`PATCH` takes a list of `operations`, applied in order and **all or nothing**.
An operation naming a slide or element the deck does not have returns
`presentation_operation_failed` (its message lists the ids the slide does have),
and a batch that would leave an invalid deck returns `presentation_edit_invalid`.
Either way nothing changes. The edit lands live for anyone with the deck open.

| Operation | Does |
| - | - |
| `update_element` | Move, resize, restyle, or change the text of one element |
| `align_elements` | Align or evenly distribute several elements on a slide |
| `add_image` | Place an image from an `https://` URL |
| `update_slide` | Rename a slide or set its speaker notes |
| `add_slide` | Insert a slide, in the shape `GET` returns |
| `remove_slide` | Delete a slide |

```ts SDK theme={null}
const {deck} = await custral.presentations.retrieve("page_3Ab9xK2mQ7");
await custral.presentations.edit("page_3Ab9xK2mQ7", {
  operations: [{kind: "update_slide", slideId: deck.slides[0].id, notes: "Open with the Q3 number."}],
});
```

> [!NOTE]
>
> Reading needs `documents:read`; editing needs `documents:write` and Can edit on the page.


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