---
title: "Create a presentation"
method: POST
path: "/api/v1/presentations"
tags: ["presentations"]
---

# Create a presentation

`POST /api/v1/presentations`

## Request

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

Create a new presentation of yours, empty or complete in one call. "slides" is a list of
{"name", "name_tr", "w", "h", "bg", "fit", "background", "objects": [blocks]}; blocks may link to each other's
slides with {"kind": "slide", "slide_number": N} (1-based, in this list). Returns the new presentation
with the ids of its slides and blocks (every prop too with "response": "full").
Every presentation is in all the languages of the site (ru, en) at once: write the texts in "lang" and give the
other languages right away -- "title_tr", "name_tr" of every slide and "tr" in the props of every text, shape and
button block ({"en": "<html>"}); the layout is shared. The answer lists what is still "missing_translations".

## Request body

- object
  - `title` string, required: Title (at most 100 characters).
  - `lang` 'ru' | 'en': The language "title", slide names and blocks' "html" are written in (default: the one most of the words of the title, the slide names and the texts are in).
  - `title_tr` object: The title in the other languages of the site: {"en": "..."}.
  - `description` string: Description shown on the presentation page (optional).
  - `theme` 'light' | 'paper' | 'ocean' | 'coral' | 'dark' | 'forest': Default colours of the slides and of new blocks.
  - `slides` object[]: Slides with their blocks (optional).
    - `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}.
  - `database` object: Setup scripts of the databases the runnable code blocks work in, by language. Every viewer runs the blocks in a private database made from the script (up to 50000 characters each; an empty string removes a script).
    - `sql` string: PostgreSQL SQL that creates and fills the database.
    - `mongodb` string: MongoDB shell (mongosh JavaScript) that creates and fills the database.
    - `redis` string: Redis commands that creates and fills the database.
    - `clickhouse` string: ClickHouse SQL (statements separated by ";") that creates and fills the database.
  - `response` 'brief' | 'full': "brief" (default): only the ids, numbers and types of the slides and blocks; "full": every prop of every block too.
  - `project` string: Slug of one of your projects to create the presentation in (at its end); its blocks may then lead to the slides of the other presentations of that project.
  - `access` 'open' | 'public' | 'private': Who sees it (default "private": only you, until you publish it; "public": everybody reads it; "open": every signed-in person edits it 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)
