Skip to content

Uploads and documents

Signed PUT address, checks, types and limits.

As Markdown (for AI)OpenAPI

Contents and all reference pages

Files never travel in the JSON body. You create an upload, PUT the file to a signed address and complete it. Only then does Flow Marketing check the file header and scan for viruses, and release the file.

Afterwards you use images and logos as upl_… in the brand and in style film fields. PowerPoint, PDF and Word go through /documents and become a video.

Three steps

The signed address points into a quarantine on our storage. No file is used before /complete has checked it. Uploads that are never completed are deleted with their file after 24 hours.

  1. POST /uploads (or POST /documents) with file name and exact size in bytes. The answer contains upload_url, upload_method (PUT), upload_headers and upload_expires_in_s (900 = 15 minutes).
  2. PUT the file to upload_url with exactly the headers from upload_headers. For /uploads, type and size are part of the signature: the file must be exactly size_bytes long.
  3. POST /uploads/{id}/complete (or /documents/{id}/complete). Now the checks run. On success status is ready.
curl
# 1. create (size_bytes = exact file size)
curl -X POST https://flow-marketing.org/api/turbo/v1/uploads \
  -H "Authorization: Bearer $FLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"kind\": \"logo\", \"filename\": \"logo.png\", \"size_bytes\": $(wc -c < logo.png)}"

# 2. upload the file to upload_url within 15 minutes (headers from upload_headers)
curl -X PUT "$UPLOAD_URL" -H "Content-Type: image/png" --data-binary @logo.png

# 3. complete: header check, virus scan, image check
curl -X POST https://flow-marketing.org/api/turbo/v1/uploads/upl_4dF6gH8jK0lZ2xC4vB6n/complete \
  -H "Authorization: Bearer $FLOW_API_KEY"
JavaScript
import { readFile } from 'node:fs/promises'

const BASE = 'https://flow-marketing.org/api/turbo/v1'
const H = { Authorization: 'Bearer ' + process.env.FLOW_API_KEY, 'Content-Type': 'application/json' }
const file = await readFile('logo.png')

// 1. create
const up = await (await fetch(BASE + '/uploads', {
  method: 'POST',
  headers: H,
  body: JSON.stringify({ kind: 'logo', filename: 'logo.png', size_bytes: file.length }),
})).json()

// 2. PUT to the signed URL (15 minutes)
const put = await fetch(up.upload_url, { method: up.upload_method, headers: up.upload_headers, body: file })
if (!put.ok) throw new Error('upload failed: ' + put.status)

// 3. complete
const done = await (await fetch(BASE + '/uploads/' + up.id + '/complete', { method: 'POST', headers: H })).json()
console.log(done.id, done.status) // 'ready' → use done.id as brand.logo
Python
import os, requests

BASE = "https://flow-marketing.org/api/turbo/v1"
H = {"Authorization": "Bearer " + os.environ["FLOW_API_KEY"]}
data = open("logo.png", "rb").read()

# 1. create
up = requests.post(BASE + "/uploads", headers=H, json={"kind": "logo", "filename": "logo.png", "size_bytes": len(data)}, timeout=30).json()

# 2. PUT to the signed URL (15 minutes)
put = requests.put(up["upload_url"], data=data, headers=up["upload_headers"], timeout=120)
put.raise_for_status()

# 3. complete
done = requests.post(BASE + "/uploads/" + up["id"] + "/complete", headers=H, timeout=120).json()
print(done["id"], done["status"])  # "ready" → use done["id"] as brand.logo

Create an upload: POST /uploads

Answer 201: the upload object plus upload_url, upload_method, upload_headers, upload_expires_in_s and max_bytes. Unknown fields return 422. Scope: videos:write.

FieldMeaning
kindrequired: image, logo or document
filenamerequired, with extension; up to 160 characters
size_bytesrequired: exact size, from 100 bytes up to the limit of the kind
content_typeoptional; the type follows from the extension
Response 201
{
  "id": "upl_4dF6gH8jK0lZ2xC4vB6n",
  "object": "upload",
  "kind": "logo",
  "status": "awaiting_upload",
  "filename": "logo.png",
  "content_type": "image/png",
  "size_bytes": 48213,
  "width": null,
  "height": null,
  "sha256": null,
  "error": null,
  "created_at": "2026-11-22T09:00:00.000Z",
  "ready_at": null,
  "upload_url": "https://...",
  "upload_method": "PUT",
  "upload_headers": { "content-type": "image/png" },
  "upload_expires_in_s": 900,
  "max_bytes": 15728640
}

Types and limits

Uploads: at most 200 per day (UTC) and account – deleting does not free any (429 daily_upload_limit). At most 3 checks run at the same time per account (429 upload_concurrency).

We do not accept SVG because it can contain scripts. Save logos as PNG with transparency or as WebP.

KindExtensionsSizeOther limits
image, logo.png, .jpg, .jpeg, .webp (no SVG)up to 15 MB (15,728,640 bytes)at most 50 megapixels
document (upload).pptx, .pdf, .docxup to 50 MB (52,428,800 bytes)–
/documents.pptx, .pdf, .docxup to 50 MBat most 30 documents per 24 hours and account

What completing checks

You may repeat /complete: if the upload is already ready, it comes back unchanged. Status values: awaiting_upload, checking, ready, rejected, failed. On rejection the reason is in error.code.

  • The file is there and has the announced size.
  • The file header matches the extension (PNG, JPEG, WebP; PDF starts with %PDF-, PowerPoint and Word are ZIP files).
  • Images: at most 50 megapixels – checked already in the header.
  • Virus scan. If something is found, the file is deleted.
  • Images are saved again: rotation from the camera data applied, metadata removed.
  • Image protection: nudity and intimate content are never stored.

Upload errors

StatusCodeMeaning
422validation_failedfield missing or unknown
422upload_typeextension not allowed, or the content does not match the extension
422 / 413upload_sizesize_bytes outside the limit, file empty or too large
409upload_missingthe file has not been uploaded yet
409upload_busybeing checked right now (Retry-After: 5)
409upload_statecan no longer be completed (for example rejected)
422upload_image_too_largemore than 50 megapixels
422upload_image_invalidimage cannot be read
422upload_virusvirus found, file deleted
422image_not_allowedrejected by image protection
503upload_scan_unavailablevirus check not possible right now; the file stays in quarantine – complete again in a minute
503upload_image_check_unavailable, image_check_unavailableimage check not possible right now; same as above
429upload_concurrencymore than 3 checks at the same time
429daily_upload_limit200 uploads reached for today

Using uploads

Uploads of kind document are not used by any video field yet. For videos from PowerPoint, PDF or Word use /documents.

  • brand.logo and brand.logo_dark in POST /videos and PATCH /videos/{id}: uploads of kind logo or image.
  • Logo and image fields of style film templates: logo fields take logo or image, image fields only image.
  • Only finished uploads (ready) of the same account and mode. A test key cannot use live uploads.

Reading and deleting uploads

GET /uploads returns the last 100 uploads of the mode, without pages. GET /uploads/{id} shows the state – never the content or storage paths. DELETE /uploads/{id} deletes file and entry; answer {"id", "object": "upload", "deleted": true}.

The upload object: id, kind, status, filename, content_type, size_bytes, width, height, sha256 (after the check), error, created_at, ready_at.

Documents: POST /documents

For videos from PowerPoint (.pptx), PDF and Word (.docx). Export Google Slides as .pptx or PDF first. Body: filename (with extension), size_bytes (integer, at most 50 MB), optional content_type. Answer 201 with the document object and upload details as with /uploads (PUT, 15 minutes).

After the PUT, POST /documents/{id}/complete reads the file: header, virus scan, then slides or pages. Reading happens on our own server; the file goes to no third-party service. Reading is free. Then build the video with POST /videos/from-document.

Errors of the document check have codes starting with document_; detail says what does not fit.

curl
# 1. create
curl -X POST https://flow-marketing.org/api/turbo/v1/documents \
  -H "Authorization: Bearer $FLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"filename\": \"pitch.pptx\", \"size_bytes\": $(wc -c < pitch.pptx)}"

# 2. PUT the file (headers from upload_headers)
curl -X PUT "$UPLOAD_URL" \
  -H "Content-Type: application/vnd.openxmlformats-officedocument.presentationml.presentation" \
  --data-binary @pitch.pptx

# 3. complete: type check, virus scan, read slides
curl -X POST https://flow-marketing.org/api/turbo/v1/documents/dok_8sD0fG2hJ4kL6zX8cV0b/complete \
  -H "Authorization: Bearer $FLOW_API_KEY"
JavaScript
import { readFile } from 'node:fs/promises'

const BASE = 'https://flow-marketing.org/api/turbo/v1'
const H = { Authorization: 'Bearer ' + process.env.FLOW_API_KEY, 'Content-Type': 'application/json' }
const file = await readFile('pitch.pptx')

const doc = await (await fetch(BASE + '/documents', {
  method: 'POST',
  headers: H,
  body: JSON.stringify({ filename: 'pitch.pptx', size_bytes: file.length }),
})).json()
await fetch(doc.upload_url, { method: doc.upload_method, headers: doc.upload_headers, body: file })
const read = await (await fetch(BASE + '/documents/' + doc.id + '/complete', { method: 'POST', headers: H })).json()
console.log(read.status, read.title, read.pages_total, read.warnings)
Python
import os, requests

BASE = "https://flow-marketing.org/api/turbo/v1"
H = {"Authorization": "Bearer " + os.environ["FLOW_API_KEY"]}
data = open("pitch.pptx", "rb").read()

doc = requests.post(BASE + "/documents", headers=H, json={"filename": "pitch.pptx", "size_bytes": len(data)}, timeout=30).json()
requests.put(doc["upload_url"], data=data, headers=doc["upload_headers"], timeout=300).raise_for_status()
read = requests.post(BASE + "/documents/" + doc["id"] + "/complete", headers=H, timeout=300).json()
print(read["status"], read["title"], read["pages_total"], read["warnings"])
Response to complete (shortened)
{
  "id": "dok_8sD0fG2hJ4kL6zX8cV0b",
  "object": "document",
  "status": "ready",
  "kind": "pptx",
  "filename": "pitch.pptx",
  "size_bytes": 2483910,
  "error_code": null,
  "title": "Musterwerk 2027",
  "language": "de",
  "pages_total": 12,
  "pages": [
    { "number": 1, "title": "Musterwerk 2027", "hidden": false, "bullets": 0, "has_notes": true, "numbers": [], "chart": null, "table": false, "images": 1 },
    { "number": 2, "title": "Umsatz", "hidden": false, "bullets": 3, "has_notes": true, "numbers": [{ "value": 42, "unit": "%" }], "chart": { "title": "Umsatz je Quartal", "points": 4 }, "table": false, "images": 0 }
  ],
  "images": 5,
  "warnings": [],
  "video_id": null,
  "created_at": "2026-11-22T09:00:00.000Z",
  "delete_after": "2026-11-29T09:00:00.000Z"
}

The document object

GET /documents/{id} shows the state and what was read – only the structure, never the full content. DELETE /documents/{id} deletes the document with its images; answer {"id", "object": "document", "deleted": true}. There is no list of all documents.

FieldMeaning
iddok_ plus 20 characters
statusawaiting_upload, processing, ready, rejected, failed, deleted
kindpptx, pdf or docx
filename, size_bytesas announced
error_codereason on rejection, otherwise null
title, languagetitle and language read (de or en)
pages_totalnumber of slides or pages
pagesper page: number, title, hidden, bullets (number of points), has_notes, numbers (value, unit), chart (title, points), table, images
imagesnumber of images
warningsnotes with code, de, en
video_idthe video last built from it
created_at, delete_aftercreated; when we delete document and images

Did this help?

Still have a question?

Mo is an AI and answers right away from these articles. A person on our team replies within 24 hours on business days.

Some services degraded
Create a videoNo subscription needed · cancel any time