Imports
How content enters Renza. An import takes HTML (upload, paste, or URL), parses the slide contract, and yields a deck plus its first artifact — or a new artifact version on an existing deck when you reuse an `external_id`.
Related guides: Import a deck
Attributes
idstringrequiredobjectstringrequiredsourcestringrequiredPossible values:
upload,paste,urlstatusstringrequiredPossible values:
pending,processing,succeeded,faileddeckstring | nullrequiredartifactstring | nullrequiredexternal_idstring | nullrequirederrorstring | nullrequiredlivemodebooleanrequiredcreated_attimestamprequiredupdated_attimestamprequireduploadsarray of objectoptionalDirect upload only (status `pending`): PUT each declared file's raw bytes to its `url` (exact declared size), then call finalize. Returned once, on create.
List imports
GET/v1/imports
Lists imports in the active org, newest first. Filter by `status`.
Requires an API key (bearer), scoped to the active org.
Query parameters
limitintegeroptionaldefault 201–100cursorstringoptionalorderstringoptionaldefault "created_at.desc"Possible values:
created_at.desc,created_at.ascstatusstringoptionalPossible values:
pending,processing,succeeded,failed
Import a deck
POST/v1/imports
Parses the slide contract, stores the HTML, and creates a deck + artifact (+ slides). With `external_id`, re-importing adds a new artifact version to the same deck.
Requires an API key (bearer), scoped to the active org. Supports idempotency keys.
Body parameters
sourcestringrequiredPossible values:
upload,pastehtmlstringoptionalSingle-file: the raw deck HTML. Provide this OR `files`.
filesarray of objectoptionalMulti-file bundle (entry HTML + its assets) inline; the entry is auto-detected. Provide this OR `html`. ~3 MB total cap — larger bundles use `assets` (direct upload).
entry_pathstringoptionalDirect upload: the entry HTML's bundle-relative path (default `index.html`). Asset paths resolve relative to it.
assetsarray of objectoptionalDirect upload (large bundles, up to 100 MB): send the entry as `html` and DECLARE the other files here instead of inlining them. The import is created `pending` with an upload URL per file; PUT each file, then `POST /v1/imports/{id}/finalize`. Nothing is visible until finalize.
titlestringoptionalmax 300 charsexternal_idstringoptionalmax 200 charsReuse + version the deck with this id (update-in-place). Omitted → the server derives a FRESH id from the title (never touching an existing deck) and returns it as `external_id`; republish with it to version the same deck at the same link.
Returns
201The completed import (deck + artifact created).
Failures use the standard error envelope with a closed set of codes.
Retrieve an import
GET/v1/imports/{id}
Fetches an import by Renza id or by `external_id` within the active org.
Requires an API key (bearer), scoped to the active org.
Path parameters
idstringrequired
Claim anonymous imports
POST/v1/imports/claim
Reattributes the anonymous imports tracked against `anon_token` into the active org as real decks (the CLI's `~/.renza` token after `renza login`). Returns the created deck ids.
Requires an API key (bearer), scoped to the active org. Supports idempotency keys.
Runs automatically during `renza login` — anonymous uploads are claimed into the org.
Body parameters
anon_tokenstringrequiredThe client-held anon token whose anonymous imports to claim.
Returns
200The decks created from the claimed tries.
Failures use the standard error envelope with a closed set of codes.
Finalize a direct upload
POST/v1/imports/{id}/finalize
Completes a `pending` direct-upload import once every declared file has been PUT to its upload URL: creates (or versions) the deck and makes the new version current. Idempotent — finalizing a succeeded import returns it. 409 if files are still missing or the upload expired (2 h).
Requires an API key (bearer), scoped to the active org. Supports idempotency keys.
Runs automatically inside `renza publish` for large bundles.
Path parameters
idstringrequired
Anonymous import (no auth)
POST/v1/public/imports
Public. Hosts a single HTML deck without an account and tracks it against the supplied `anon_token`, returning a `/try/<id>` link. Pass the same `external_id` again to update that try in place (same link). Sign in later and claim the token's imports into a real org. Larger/multi-file imports require authentication.
Public — no authentication required. Supports idempotency keys.
`renza publish` uses this path when you're not logged in.
Body parameters
htmlstringoptionalSingle-file: the raw deck HTML. Provide this OR `files`.
filesarray of objectoptionalBounded multi-file bundle (entry + assets), entry auto-detected. Max 20 files / ~3 MB — sign in for larger bundles.
anon_tokenstringrequiredA client-held token the import is tracked against (the claim key).
external_idstringoptionalmax 255 charsStable id, unique per anon token. Republishing with the same one UPDATES the existing try in place — same /try link, fresh content and TTL — instead of minting a new link. Omitted → the server derives a fresh one from the deck title and returns it as `external_id`; reuse it to update in place.
Returns
200An existing try, updated in place (matched by `external_id`).201The hosted anonymous import.
Failures use the standard error envelope with a closed set of codes.