---
title: "Create directory"
method: POST
path: "/api/v1/create_directory"
---

# Create directory

`POST /api/v1/create_directory`

## Request

- Base URL: `https://offprint.io`
- URL: `https://offprint.io/api/v1/create_directory`
- Auth: HTTP bearer

Create a directory (and any missing parent directories) inside a project. Directories nest at most 5 levels deep; names are unique among siblings, case-insensitively.

## Request body

- object
  - `project` string, required: Project name (your own) or id (any you can write to).
  - `path` string, required: Directory path to create, e.g. 'research/notes'.

## Response `200`

Success.

- object
  - `directory_id` string, required
  - `path` string, required

## Other responses

- `400`: Invalid arguments.
- `401`: Missing, expired or revoked API key.
- `403`: The key's scope, restriction or role does not allow this.
- `404`: Not found, or outside the key's restriction.
- `409`: The document changed since expected_revision.
- `429`: A plan limit or daily quota was reached.

---

[API](https://skmtc.dev/offprint/apis/offprint-api.md) · [All operations](https://skmtc.dev/offprint/apis/offprint-api/llms.txt) · [OpenAPI document](https://skmtc.dev/offprint/apis/offprint-api/revisions/d50a825280d2?raw)
