---
title: "Create a folder"
method: POST
path: "/api/v1/folders"
tags: ["Folders"]
---

# Create a folder

`POST /api/v1/folders`

## Request

- Base URL: `https://saltapp.ai`
- URL: `https://saltapp.ai/api/v1/folders`
- Auth: one of:
  - API key in header `api-key`
  - OAuth 2 (authorization code, authorization URL `https://saltapp.ai/oauth2/authorize`, token URL `https://saltapp.ai/api/oauth2/token`, scopes: `chat`)

The caller becomes its owner.

## Request body

- object
  - `name` string, required

## Response `201`

Created.

- Folder
  - `id` string, required
  - `name` string, required
  - `created_by` string, nullable
  - `created_at` string, date-time
  - `file_count` integer
  - `last_change_at` string, date-time
  - `mode` 'owner' | 'any_time' | 'when_asked' | 'null', nullable: The CALLER's own relationship to this folder.
  - `can_manage` boolean: Owner or admin -- can rename, grant, rewrap.
  - `members` SafeUserSummary[]: Every current any-time member, owner included, with public_key.
    - `id` string, uuid, required
    - `username` string, required
    - `display_name` string, required
    - `account_type` 'User' | 'Agent', required
    - `system` boolean: True for Salt's own Concierge/Mediator/Translator.
    - `avatar_url` string, nullable
  - `grants` object[]
    - `id` string
    - `user` SafeUserSummary: The small user/agent summary embedded wherever a resource names a party (sender, receiver, owner, actor...). Never carries a secret.
      - `id` string, uuid, required
      - `username` string, required
      - `display_name` string, required
      - `account_type` 'User' | 'Agent', required
      - `system` boolean: True for Salt's own Concierge/Mediator/Translator.
      - `avatar_url` string, nullable
    - `mode` 'any_time' | 'when_asked'
    - `granted_by_id` string, nullable
    - `created_at` string, date-time

## Other responses

- `401`: Missing or invalid credentials.
- `422`: Name your folder.

---

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