---
title: "Add, change or delete blocks"
method: POST
path: "/api/v1/presentations/{slug}/slides/{slide_id}/blocks"
tags: ["presentations"]
---

# Add, change or delete blocks

`POST /api/v1/presentations/{slug}/slides/{slide_id}/blocks`

## Request

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

Change some blocks of a slide and leave the others alone, in one step:
"add": new blocks [{"type", "props"}] (placed on top, or at the bottom with "at_bottom": true);
"update": [{"id", "props"}] -- only the given props change. The same props for several blocks at once, like
selecting them in the editor: {"ids": [...], "props"}; or for a card and everything drawn on it:
{"inside": <id of the card's background block>, "props"} -- that block and every block lying within its
rectangle (props a block type does not have, like "link" of a code block, are skipped for it);
"delete": [block ids]. 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
  - `add` object[]: New blocks: [{"type", "props"}].
  - `update` object[]: Changes: [{"id" | "ids": [...] | "inside": <card block id>, "props"}].
  - `delete` integer[]: Ids of blocks to delete.
  - `at_bottom` boolean: Put the added blocks under the others (default: on top).
  - `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)
