---
title: "Create a section"
method: POST
path: "/appearance/themes/{code}/sections"
tags: ["Admin Appearance: Sections"]
---

# Create a section

`POST /appearance/themes/{code}/sections`

## Request

- Base URL: `http://localhost:8000/api/admin`
- URL: `http://localhost:8000/api/admin/appearance/themes/{code}/sections`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/bagisto/apis/bagisto-admin-api/docs/appearance/themes/:code/sections/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates a section against the theme and channel the request is scoped to. It is created switched off with a pending status draft, exactly as the appearance editor does, so an empty section is never put in front of shoppers before it is built.

## Path parameters

- `code` string, required

## Query parameters

- `channel` integer

## Request body

- object
  - `name` string, required
  - `type` 'image_carousel' | 'product_carousel' | 'category_carousel' | 'footer_links' | 'static_content' | 'services_content', required

## Response `201`

Section created.

## Other responses

- `400`: Invalid input
- `422`: Invalid type, or the channel already has a footer links section.

## Changes

- **2026-09-09** `2e6fdf8f57c9`: 1 breaking
  - removed the media type `text/html` for the response with the status `201`
- **2026-08-26** `a34d6835b19b`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/bagisto/apis/bagisto-admin-api/changes/appearance/themes/:code/sections/post.md)

---

[API](https://skmtc.dev/bagisto/apis/bagisto-admin-api.md) - [All operations](https://skmtc.dev/bagisto/apis/bagisto-admin-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bagisto/apis/bagisto-admin-api/revisions/3198f11be70f?raw)
