Skip to content

Create Section

Adds a section to a theme and channel. The section is created switched off with a staged on-state, so it is drawn in the editor and its preview but not on the storefront until it has been built and published.

Content is not part of creation. Add it with Stage edits or Update section afterwards.

Endpoint

MethodPathPurpose
POST/api/admin/appearance/themes/{code}/sectionsCreate a section

Path parameters

ParameterDescription
codeTheme the section belongs to.

Query parameters

ParameterDescription
channelChannel the section is created for. Falls back to the current channel.

Request body

FieldTypeRequiredDescription
namestringYesName shown in the editor.
typestringYesimage_carousel, product_carousel, category_carousel, footer_links, static_content or services_content.

Response fields

The created section, same shape as Get section, with message set.

Use cases

  • Add a promo banner to one channel — create with type: image_carousel, upload the slide through Upload media, stage the returned path in the section's options, then publish.

Best practices

  • status comes back 0 on purpose. A new section is off until published; sending a status in the body does not change that, and switching it on is Stage status followed by a publish.
  • sortOrder is assigned, not chosen. The section is appended to the end and the whole set is renumbered, with footer_links kept last — send a Stage order afterwards to place it.
  • A channel gets one footer. Creating a second footer_links section for the same theme and channel is rejected with 422.

Errors

StatusWhen
404Unknown theme code.
422name missing, type missing or not one of the six, or a second footer_links section.

Permissions

Requires appearance.sections.create.

Released under the MIT License.