Objects

Update an Object

Update an Object in place. Only the properties you send are changed, and within metadata only the keys you send are changed, so you can update a single Metafield without resending the rest. Set status to published to publish a draft.

patch/buckets/{slug}/objects/{object_id}

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 updated Object.

Changes