Object revisions

Add a revision to an Object

Create a new revision of an Object without publishing it. The revision is created with status draft; publish it by updating the Object itself with status: published. Use this to stage an edit for review rather than changing live content.

post/buckets/{slug}/objects/{object_id}/revisions

Request body

titlestring
slugstring
status'published' | 'draft'
contentstring
metadataMetadata

Values of the Metafields defined on the Object type, keyed by Metafield key.

The value shape follows the Metafield type, and differs between write and read for two of them:

  • Text, textarea, markdown, and HTML Metafields are strings. Number Metafields are numbers, switches are booleans, dates are ISO 8601 strings.
  • Object Relationship Metafields are written as an Object id string (or an array of ids for the multiple variant) and returned as a nested Object (or array of Objects) once depth is at least 1.
  • File and Image Metafields are written as a media name string (or an array of names) and returned as an object with url and imgix_url, plus alt_text, width, and height when requested via props.
  • Repeater Metafields are arrays of objects keyed by the child Metafield keys.
thumbnailstring

Media name.

localestring
trigger_webhookboolean

Response

The created revision.

Changes

No recorded changes to this endpoint across all 1 revision of this API.