Pieces
List pieces (keyset-paginated)
Returns one page of the account's non-deleted pieces, newest edit first, in the uniform list envelope `{ data, pagination }`. Filter by `productId` and `kind`. Archived pieces are left out unless `archived` is `include` or `only`. Keep paginating while `pagination.nextCursor` is non-null, passing it back verbatim as `?cursor=`.
Get a piece
Returns one piece: its channel, caption, button, account, slides with their words, seconds and pictures, and the finished file once it is ready. Another account's piece, a deleted one and a missing one answer the same `404`.
Make a piece's finished slides
Makes the finished slide pictures (words in, one PNG per slide at the canvas size) of a still piece - a post, a carousel, a still story or ad - as it stands now. FREE: nothing is ever charged. A piece with edits not yet kept is kept as a new version first. Answers 202 at once; read the piece with `GET /pieces/{pieceId}` (the `Location`) until its `finishing` is false: its slides then read `finished: true` with their `pictureUrl`, at this `version`. A piece whose slides of this version are already made answers `finished` and makes nothing. Asking again while they are being made answers the same `version` and starts nothing new. The body is empty.
List a piece's versions (keyset-paginated)
Returns one page of the piece's versions, newest first, in the uniform list envelope `{ data, pagination }`. Each has a `name` to say to the person and a `version` number to go back to with `POST /pieces/{pieceId}/versions/{version}/restore`. Keep paginating while `pagination.nextCursor` is non-null, passing it back verbatim as `?cursor=`.
Go back to an earlier version of a piece
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.