Skip to main content
Every presentation and carousel is a project. You can change it through the API, or open its editor_url and edit it in Pekto.

Read a project

Without include=content you get the title, status, aspect ratio and dates. With it, data.content.variations holds the slides in order; each slide has its svgContent, title and notes.

Rename or change status

status is draft, published or archived.

Change one slide

Use patch_slide with the zero-based slide index. Only the fields you send change.
svg_content replaces that slide’s markup. Read the project first and change the existing SVG rather than writing a new one: Pekto’s editor relies on the ids and structure in its layouts.

Replace the whole document

Sending content replaces every slide at once and can’t be undone. Read the project, change what you need, and send the whole object back. Duplicate the project first if you want a copy to fall back to.

Rules for SVG

Saved slides are shown in the Pekto app and on shared pages, so markup that could run code is refused with 400 unsafe_content:
  • <script>, <iframe>, <object>, <embed> and similar elements
  • event attributes such as onload or onclick
  • javascript: links and data: URLs other than images
  • <use> pointing at other documents
Pekto’s own layouts, including text in <foreignObject>, styles, gradients, masks and embedded images, are all accepted.

Duplicate and delete

All of these need the projects:write scope.