> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.bibleit.dev/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.bibleit.dev/_mcp/server.

# Replace a saved presentation document

PUT https://api.bibleit.app/v1/presentations/{presentation_id}
Content-Type: application/json

**Required scopes:** `presentation.update`.

Full document replacement retaining supplied slide/element IDs; body accepts document only, not revision. Requires current document If-Match and returns an incremented revision and new ETag, including for identical saves. Current explicit scope, status/processing, ownership and precondition are checked under the workspace lock shared by browser edits, publication and credential changes. Invalid documents/media references return 422; slide/allocation exhaustion returns 409. Transport limit is 2,016,384 bytes; document limit is 2,000,000 encoded JSON bytes. Other REST controls retain their 16 KiB limit. Saving never changes a published Live snapshot.

**Response headers:**

- `ETag` (200): Strong validator covering presentation ID, organization, revision and rights-normalized document. Browser/editor saves and changed effective rights notices invalidate it.

Reference: https://docs.bibleit.dev/api-reference/organizations/presentations/replace-presentation

## Authentication

- `Authorization` header (bearer token, required) — Organization-owned service token. Issue the initial token in organization credential settings. Scopes are documented per operation via x-required-scopes; they are not OAuth scopes.

## Request

### Path parameters

- `presentation_id` (string, required) — Immutable presentation UUID; missing, personal or foreign organization resources return 404.

### Headers

- `If-Match` (string, required) — Strong validator covering presentation ID, organization, revision and rights-normalized document. Browser/editor saves and changed effective rights notices invalidate it. Missing:428; stale:412; malformed/weak/wildcard/list:422.

### Body (application/json)

This endpoint expects a PutPresentation.

- `document` (PresentationDocument, required) — Version-1 document, at most 2,000,000 encoded JSON bytes. Slide IDs are unique across the deck, element IDs within each slide. Omitted slide background is preserved as omitted. Save retains caller slide/element IDs; no automatic publishing. Existing same-workspace ready media references are checked by the domain; upload and portable import endpoints provide ready media. Uploading alone never modifies the saved document.

## Response

### 200

Successful operation

- `id` (string, required)
- `organization_id` (string, required)
- `revision` (integer, required)
- `document` (PresentationDocument, required) — Version-1 document, at most 2,000,000 encoded JSON bytes. Slide IDs are unique across the deck, element IDs within each slide. Omitted slide background is preserved as omitted. Save retains caller slide/element IDs; no automatic publishing. Existing same-workspace ready media references are checked by the domain; upload and portable import endpoints provide ready media. Uploading alone never modifies the saved document.

## Errors

### 401 Unauthorized Error

Error response. 400 malformed JSON; 401 invalid/expired/revoked token; 403 denied scope or domain policy; 404 unknown/foreign resource; 405 unsupported method; 409 quota/conflict or stopped Live; 412 stale state validator; 428 missing If-Match; 413 body too large; 415 unsupported media type; 422 invalid fields; 429 admission budget exhausted; 503 unavailable dependency.

- `type` (any, required)
- `title` (string, required)
- `status` (integer, required)
- `code` (string, required)
- `request_id` (string, required)

### 403 Forbidden Error

Error response. 400 malformed JSON; 401 invalid/expired/revoked token; 403 denied scope or domain policy; 404 unknown/foreign resource; 405 unsupported method; 409 quota/conflict or stopped Live; 412 stale state validator; 428 missing If-Match; 413 body too large; 415 unsupported media type; 422 invalid fields; 429 admission budget exhausted; 503 unavailable dependency.

- `type` (any, required)
- `title` (string, required)
- `status` (integer, required)
- `code` (string, required)
- `request_id` (string, required)

### 404 Not Found Error

Error response. 400 malformed JSON; 401 invalid/expired/revoked token; 403 denied scope or domain policy; 404 unknown/foreign resource; 405 unsupported method; 409 quota/conflict or stopped Live; 412 stale state validator; 428 missing If-Match; 413 body too large; 415 unsupported media type; 422 invalid fields; 429 admission budget exhausted; 503 unavailable dependency.

- `type` (any, required)
- `title` (string, required)
- `status` (integer, required)
- `code` (string, required)
- `request_id` (string, required)

### 429 Too Many Requests Error

Error response. 400 malformed JSON; 401 invalid/expired/revoked token; 403 denied scope or domain policy; 404 unknown/foreign resource; 405 unsupported method; 409 quota/conflict or stopped Live; 412 stale state validator; 428 missing If-Match; 413 body too large; 415 unsupported media type; 422 invalid fields; 429 admission budget exhausted; 503 unavailable dependency.

- `type` (any, required)
- `title` (string, required)
- `status` (integer, required)
- `code` (string, required)
- `request_id` (string, required)

### 503 Service Unavailable Error

Error response. 400 malformed JSON; 401 invalid/expired/revoked token; 403 denied scope or domain policy; 404 unknown/foreign resource; 405 unsupported method; 409 quota/conflict or stopped Live; 412 stale state validator; 428 missing If-Match; 413 body too large; 415 unsupported media type; 422 invalid fields; 429 admission budget exhausted; 503 unavailable dependency.

- `type` (any, required)
- `title` (string, required)
- `status` (integer, required)
- `code` (string, required)
- `request_id` (string, required)

## Types

### PresentationDocument

Version-1 document, at most 2,000,000 encoded JSON bytes. Slide IDs are unique across the deck, element IDs within each slide. Omitted slide background is preserved as omitted. Save retains caller slide/element IDs; no automatic publishing. Existing same-workspace ready media references are checked by the domain; upload and portable import endpoints provide ready media. Uploading alone never modifies the saved document.

- `version` (integer, required)
- `name` (string, required) — UTF-8 text, at most 200 bytes; NUL is rejected.
- `slides` (list of PresentationSlide, required)

### PresentationSlide

- `id` (string, required)
- `elements` (list of PresentationElement, required)
- `background` (string, optional)

### PresentationElement

- `type`: `text` (text)
  - `height` (integer, required)
  - `id` (string, required)
  - `text` (string, required) — UTF-8 text, at most 20000 bytes; NUL is rejected.
  - `width` (integer, required)
  - `x` (integer, required)
  - `y` (integer, required)
  - `rotation` (integer, optional)
  - `style` (PresentationElementStyle, optional)
- `type`: `verse` (verse)
  - `attribution` (string, required) — UTF-8 text, at most 2000 bytes; NUL is rejected.
  - `edition` (string, required) — UTF-8 text, at most 2000 bytes; NUL is rejected.
  - `height` (integer, required)
  - `id` (string, required)
  - `reference` (string, required) — UTF-8 text, at most 200 bytes; NUL is rejected.
  - `text` (string, required) — UTF-8 text, at most 20000 bytes; NUL is rejected.
  - `translation` (string, required) — UTF-8 text, at most 200 bytes; NUL is rejected.
  - `width` (integer, required)
  - `x` (integer, required)
  - `y` (integer, required)
  - `rotation` (integer, optional)
  - `style` (PresentationElementStyle, optional)
- `type`: `shape` (shape)
  - `height` (integer, required)
  - `id` (string, required)
  - `shape` (enum, required)
    - Allowed values: `rectangle`, `rounded_rectangle`, `ellipse`, `triangle`, `diamond`, `arrow`, `line`, `line_arrow`, `elbow_connector`, `curved_connector`
  - `width` (integer, required)
  - `x` (integer, required)
  - `y` (integer, required)
  - `rotation` (integer, optional)
  - `style` (PresentationElementStyle, optional)
- `type`: `image` (image)
  - `alt` (string, required) — UTF-8 text, at most 1000 bytes; NUL is rejected.
  - `asset` (string, required)
  - `fit` (enum, required)
    - Allowed values: `contain`, `cover`
  - `height` (integer, required)
  - `id` (string, required)
  - `width` (integer, required)
  - `x` (integer, required)
  - `y` (integer, required)
  - `rotation` (integer, optional)
  - `style` (PresentationElementStyle, optional)
- `type`: `video` (video)
  - `asset` (string, required)
  - `fit` (enum, required)
    - Allowed values: `contain`, `cover`
  - `height` (integer, required)
  - `id` (string, required)
  - `width` (integer, required)
  - `x` (integer, required)
  - `y` (integer, required)
  - `loop` (boolean, optional)
  - `muted` (boolean, optional)
  - `poster` (string, optional)
  - `rotation` (integer, optional)
  - `style` (PresentationElementStyle, optional)
- `type`: `youtube` (youtube)
  - `height` (integer, required)
  - `id` (string, required)
  - `video_id` (string, required)
  - `width` (integer, required)
  - `x` (integer, required)
  - `y` (integer, required)
  - `rotation` (integer, optional)
  - `style` (PresentationElementStyle, optional)

### PresentationElementStyle

- `font_size` (double, optional)
- `font_family` (enum, optional)
  - Allowed values: `sans`, `serif`, `mono`
- `color` (string, optional)
- `bold` (boolean, optional)
- `italic` (boolean, optional)
- `align` (enum, optional)
  - Allowed values: `left`, `center`, `right`
- `line_height` (double, optional)
- `fill` (string, optional)
- `stroke` (string, optional)
- `stroke_width` (double, optional)
- `stroke_style` (enum, optional)
  - Allowed values: `solid`, `dashed`, `dotted`
- `opacity` (double, optional)

## Examples

**Request**

```json
{
  "document": {
    "version": 1,
    "name": "Sunday",
    "slides": [
      {
        "id": "opening",
        "elements": [
          {
            "height": 560,
            "id": "heading",
            "text": "Welcome",
            "type": null,
            "width": 1120,
            "x": 80,
            "y": 80
          }
        ],
        "background": "#ffffff"
      }
    ]
  }
}
```

**Response**

```json
{
  "id": "string",
  "organization_id": "string",
  "revision": 1,
  "document": {
    "version": 1,
    "name": "Sunday",
    "slides": [
      {
        "id": "opening",
        "elements": [
          {
            "height": 560,
            "id": "heading",
            "text": "Welcome",
            "type": null,
            "width": 1120,
            "x": 80,
            "y": 80
          }
        ],
        "background": "#ffffff"
      }
    ]
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.bibleit.app/v1/presentations/presentation_id"

payload = { "document": {
        "version": 1,
        "name": "Sunday",
        "slides": [
            {
                "id": "opening",
                "elements": [
                    {
                        "height": 560,
                        "id": "heading",
                        "text": "Welcome",
                        "type": None,
                        "width": 1120,
                        "x": 80,
                        "y": 80
                    }
                ],
                "background": "#ffffff"
            }
        ]
    } }
headers = {
    "If-Match": "If-Match",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.bibleit.app/v1/presentations/presentation_id"

	payload := strings.NewReader("{\n  \"document\": {\n    \"version\": 1,\n    \"name\": \"Sunday\",\n    \"slides\": [\n      {\n        \"id\": \"opening\",\n        \"elements\": [\n          {\n            \"height\": 560,\n            \"id\": \"heading\",\n            \"text\": \"Welcome\",\n            \"type\": null,\n            \"width\": 1120,\n            \"x\": 80,\n            \"y\": 80\n          }\n        ],\n        \"background\": \"#ffffff\"\n      }\n    ]\n  }\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("If-Match", "If-Match")
	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```