---
title: "Change a slide"
method: PATCH
path: "/api/v1/presentations/{slug}/slides/{slide_id}"
tags: ["presentations"]
---

# Change a slide

`PATCH /api/v1/presentations/{slug}/slides/{slide_id}`

## Request

- Base URL: `https://easeweb.host`
- URL: `https://easeweb.host/api/v1/presentations/{slug}/slides/{slide_id}`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `sessionid`

Change a slide: its name, size, background colour / picture, entrance transition, and -- when "objects" is given -- its
COMPLETE list of blocks: blocks with an existing "id" are kept (their props are merged with the given
ones), blocks without an id are added, blocks not in the list are deleted. Returns the slide (ids only unless "response" is "full").

## Path parameters

- `slug` string, required: The presentation's slug (its address: /movie/<slug>/).
- `slide_id` integer, required: The id of a slide (stable, the "id" of the slide in the presentation). Its number (position) changes when slides are reordered.

## Request body

- object
  - `name` string: Slide name (at most 100 characters), in the language of the presentation.
  - `name_tr` object: The slide name in the other languages of the site: {"en": "..."}.
  - `w` integer: Canvas width in px (200-4000, default 1280).
  - `h` integer: Canvas height in px (default 720).
  - `bg` string: Background colour, #rrggbb.
  - `fit` 'contain' | 'cover' | 'stretch': How the background picture fits.
  - `transition` 'none' | 'fade' | 'slide-left' | 'slide-right' | 'zoom': Entrance effect of this incoming slide (default: none).
  - `transition_duration` integer: Animation duration in milliseconds (100-3000, default 500); not auto advance. Values outside the range are clamped.
  - `background` string, nullable: Background picture: the "src" of an uploaded picture; null removes it.
  - `objects` object[]: Blocks of the slide, bottom to top: [{"type": "text"|"shape"|"button"|"line"|"image"|"code", "props": {...}}]. Missing props take the presentation theme's defaults (every prop is described in the block format reference). A link to a slide of the same presentation may be given as {"kind": "slide", "slide_number": N}.
  - `base_version` string: Optional: the "version" of the slide as you read it. The change is refused (409 conflict) when somebody changed the slide meanwhile, instead of overwriting their work.
  - `response` 'brief' | 'full': "brief" (default): only the ids, numbers and types of the slides and blocks; "full": every prop of every block too.

## Response `200`

OK

- object

## Other responses

- `4XX`: Error

---

[API](https://skmtc.dev/easeweb/apis/easeweb-presentations-api.md) · [All operations](https://skmtc.dev/easeweb/apis/easeweb-presentations-api/llms.txt) · [OpenAPI document](https://skmtc.dev/easeweb/apis/easeweb-presentations-api/revisions/9f5566adb5d1?raw)
