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

# Editing projects

> Read, rename, patch, duplicate and delete projects.

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

```bash theme={null}
curl "$PEKTO_API/projects/$PROJECT_ID?include=content" \
  -H "Authorization: Bearer $PEKTO_API_KEY"
```

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

```bash theme={null}
curl -X PATCH "$PEKTO_API/projects/$PROJECT_ID" \
  -H "Authorization: Bearer $PEKTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "title": "Q4 kickoff", "status": "published" }'
```

`status` is `draft`, `published` or `archived`.

## Change one slide

Use `patch_slide` with the zero-based slide `index`. Only the fields you send change.

```json theme={null}
{
  "patch_slide": {
    "index": 2,
    "title": "Being inconsistent",
    "notes": "Pause here and ask who posts weekly."
  }
}
```

`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

```bash theme={null}
# copy (returns the copy's editor_url)
curl -X POST "$PEKTO_API/projects/$PROJECT_ID/duplicate" -H "Authorization: Bearer $PEKTO_API_KEY"

# delete permanently
curl -X DELETE "$PEKTO_API/projects/$PROJECT_ID" -H "Authorization: Bearer $PEKTO_API_KEY"
```

All of these need the `projects:write` scope.


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