---
title: "Create a shelf"
method: POST
path: "/repos/{repo_id}/shelves"
tags: ["Repository Shelves Manipulation"]
---

# Create a shelf

`POST /repos/{repo_id}/shelves`

## Request body

- CreateShelf
  - `name` string, required — Display name of the shelf
  - `workspace_id` string, required — Workspace ID from which to shelve changes
  - `reset_workspace` boolean — Should reset workspace changes after creating the shelf

## Response `201`

Shelf details returned

- Shelf
  - `id` string, required — Shelf identifier in Diversion
  - `name` string, required — Display name of the shelf
  - `created_timestamp` integer, required — Seconds since epoch UTC
  - `branch_id` string — Optional branch ID from which the changes were shelved

## Other responses

- `409` — An error occurred
- `default` — An error occurred

---

[API](https://skmtc.net/diversion/apis/diversion-core-api.md) · [All operations](https://skmtc.net/diversion/apis/diversion-core-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/diversion/diversion-core-api/revisions/38a18aba804b/schema)
