Go back to an earlier version of a piece
POST/pieces/:pieceId/versions/:version/restore
Goes back to an earlier version: what that version held becomes the NEWEST version (later versions stay in the history; nothing is lost). FREE: nothing is ever charged. The version's finished slides or video are made again free where they must be (a version that was already made ready comes back ready). Answers 202 at once with the new version's version number; read the piece with GET /pieces/{pieceId} (the Location) until its finishing is false. The body is empty. Restoring again writes another version.
Request
Responses
- 202
- 401
- 403
- 404
- 409
- 429
Accepted. The restored version is the newest; its finish was handed over.
Response Headers
The piece: /api/public/v1/pieces/{pieceId}.
Unauthorized. Missing, malformed, unknown, revoked, or expired bearer token — or the token owner no longer holds the required entitlement (ENTITLEMENT_LOST). A uniform problem body is returned with a distinct code; no owner/condition detail (no-leak).
Forbidden. The key lacks the required scope (API_TOKEN_SCOPE_DENIED), or the account's plan does not include drafts (BETA_ACCESS_REQUIRED).
Not Found. No piece of this account has that id (PIECE_NOT_FOUND), or the piece has no such version (PIECE_VERSION_NOT_FOUND). Nothing was written.
Conflict. The piece kept changing while it was being restored (PIECE_REVISION_STALE), or a change or an animate is still landing on it (PIECE_MEDIA_BUSY). Nothing was written and nothing was charged; ask again after Retry-After.
Response Headers
Seconds to wait before asking again.
Too Many Requests. The per-token sliding window of 30 requests/minute was exceeded. The body is express-rate-limit's DEFAULT plain-text message (NOT the JSON problem+json envelope).
Response Headers
IETF draft-7 rate-limit policy/state (limit, remaining, reset).
Seconds to wait before retrying.