Skip to main content

When to use

Create a new presentation. Returns a fresh shareId, one auto-generated share token, and a public shareUrl. To re-publish to an existing URL, use POST /updateSharedPresentation instead.

Endpoint

POST https://europe-west1-slideless-ai.cloudfunctions.net/uploadSharedPresentation

Auth

HeaderValue
X-Process-Manager-Keycko_… (or cka_…)
Content-Typeapplication/json
Recommended scope: presentations:write.

Request body

FieldTypeRequiredDescription
titlestringyesDisplay title (shown in the dashboard, not in the share URL)
htmlstringyesThe full HTML document, ≤ 10 MB
Example:
{
  "title": "Q4 review",
  "html": "<!doctype html><html>... full HTML ..."
}

Response (200)

FieldTypeDescription
shareIdUUIDv7 stringUnique ID; appears in the share URL
tokenIdUUIDv7 stringThe auto-created default token’s internal ID
tokenbase64url stringThe actual share token (384 bits of entropy)
shareUrlstringThe public URL — give this to recipients
Example:
{
  "shareId": "0192f1c3-8b1a-7c4d-9e3f-...",
  "tokenId": "0192f1c3-8b1a-7c4d-9e3f-...",
  "token": "AbCdEfGhIj...384-bit-base64url...",
  "shareUrl": "https://app.slideless.ai/share/0192f1c3-...?token=AbCdEf..."
}

Examples

curl

curl -sS -X POST \
  -H "X-Process-Manager-Key: $SLIDELESS_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @<(jq -Rs --arg title "Q4 review" '{html: ., title: $title}' < ./deck.html) \
  https://europe-west1-slideless-ai.cloudfunctions.net/uploadSharedPresentation

Node.js

import { readFile } from 'node:fs/promises';

const html = await readFile('./deck.html', 'utf-8');

const res = await fetch(
  'https://europe-west1-slideless-ai.cloudfunctions.net/uploadSharedPresentation',
  {
    method: 'POST',
    headers: {
      'X-Process-Manager-Key': process.env.SLIDELESS_API_KEY,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({ title: 'Q4 review', html })
  }
);

const { shareUrl } = await res.json();

Python

import os, json, requests

with open('deck.html', 'r', encoding='utf-8') as f:
    html = f.read()

res = requests.post(
    'https://europe-west1-slideless-ai.cloudfunctions.net/uploadSharedPresentation',
    headers={'X-Process-Manager-Key': os.environ['SLIDELESS_API_KEY']},
    json={'title': 'Q4 review', 'html': html}
)
res.raise_for_status()
print(res.json()['shareUrl'])

Errors

StatusCodeCauseFix
400invalid-argumenthtml or title missing or not a stringInclude both fields, both as strings
401unauthenticatedMissing or invalid API keySet X-Process-Manager-Key to a valid cko_…
405method-not-allowedUsed GET/PUT/etc.Use POST
413payload-too-largeHTML > 10 MBSlim down the deck (inline fewer images, drop unused JS)
500internalBackend errorRetry with exponential backoff

Side effects

  • HTML is uploaded to private GCS at shared_presentations/{shareId}/document.html
  • A Firestore record is created with the auto-generated default share token
  • The apiKeyId of the calling key is recorded for audit

Next