---
title: "Add a layer to the plan"
method: POST
path: "/v1/layers"
tags: ["layers"]
---

# Add a layer to the plan

`POST /v1/layers`

Add a layer to the plan's configuration.

## Request body

- object
  - `action` 'add' — The action to perform.
  - `combine` boolean — Whether to combine the layer with existing layers (if true) or append it (if false).
  - `inner` boolean — Whether to add the layer as an inner layer.
  - `label` string — The label for the layer.
  - `format` 'yaml' — The format of the layer.
  - `layer` string — The layer data in YAML format.

## Response `200`

Layer added successfully.

- PostLayersResponse
  - `type` string — Response type, "sync".
  - `status-code` integer — HTTP response status code.
  - `status` string — The description of the HTTP status code. See the [IANA list](https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml).
  - `result` true

## Changes

> 12 revisions in range; 1 could not be searched.

- **2025-01-13** `20135041d803` — 2 info
  - api tag `layers` added
  - api tag `plan` removed
- **2025-01-02** `1cb37312be6c` — 1 info
  - endpoint added
- **2024-12-22** `b3903318c3bd` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/canonical/apis/pebble-api/changes/v1/layers/post.md)

---

[API](https://skmtc.dev/canonical/apis/pebble-api.md) · [All operations](https://skmtc.dev/canonical/apis/pebble-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/canonical/pebble-api/revisions/a94f353eccac/schema)
