Skip to content

Stage Edits

Holds a section's content as an unpublished draft for one locale. The storefront keeps drawing the published content until Publish promotes it, and Preview shows what it would look like meanwhile.

Endpoint

MethodPathPurpose
POST/api/admin/appearance/sections/{id}/draftStage content for a section

Path parameters

ParameterDescription
idSection ID.

Query parameters

ParameterDescription
localeLocale the options belong to. Must be one the channel runs; otherwise the app locale, then the channel's first locale.

Request body

FieldTypeRequiredDescription
optionsobjectYesThe full option set for the locale, shaped by the section's type.

Response fields

FieldTypeDescription
sectionIdintegerSection the draft belongs to.
localestringLocale the draft was written for.
hasDraftbooleanWhether the section now holds any staged edit.
messagestringConfirmation text.

Use cases

  • Autosave an editor — post the whole option set on each change; the draft is replaced, never merged, so the last call wins.
  • Translate before going live — stage each locale separately, then publish once and every locale goes live together.

Best practices

  • Send the complete option set. The draft replaces the previous one for that locale rather than merging into it, so a partial body drops the fields it omits. Read the current values from Section fields first.
  • Upload media before staging. Upload media returns a stored path; the path only becomes part of the section when it appears in the options you stage here.
  • Staging content does not switch a section on. A section created off stays off until Stage status and a publish.

Errors

StatusWhen
404No section with this ID.
422options missing or not an object.

Permissions

Requires appearance.sections.edit.

Released under the MIT License.