> ## Documentation Index
> Fetch the complete documentation index at: https://api-tools.memories.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Folder

> Create a new folder to organize videos in your Private Video Library.

<Info>
  **Product**: Visual Search
  **Use case**: Organize your indexed videos into folders and scope uploads/searches to a folder
  **Host**: `https://api.memories.ai/serve/api/v1`
  **Auth**: `Authorization: sk-mavi-...` (no `Bearer` prefix)
</Info>

Create a new folder in your account. The returned `folder_id` can then be passed to [Upload Video](/visual-search/upload-video-from-file) (`folder_id`), [Move Videos](/visual-search/move-videos-to-folder), or the list/search endpoints to scope them to this folder.

## Prerequisites

* You have [created a memories.ai API key](/visual-search/create-your-key).

## Request Example

<Note>Uses `application/x-www-form-urlencoded` — send `name` as a form field.</Note>

```python theme={null}
import requests

headers = {"Authorization": "sk-mavi-..."}
response = requests.post(
    "https://api.memories.ai/serve/api/v1/folders/create",
    headers=headers,
    data={"name": "my-project"},
)
print(response.json())
```

```bash cURL theme={null}
curl -X POST "https://api.memories.ai/serve/api/v1/folders/create" \
  -H "Authorization: sk-mavi-..." \
  -d "name=my-project"
```

## Parameters

<ParamField body="name" type="string" required>
  Folder name. Maximum **100 characters**. Must be unique within your account — creating a folder with an existing name is rejected.
</ParamField>

## Response Example

```json theme={null}
{
    "code": "0000",
    "msg": "success",
    "data": {
        "folder_id": 671631448308117504,
        "folder_name": "my-project"
    }
}
```

## Response Fields

<ResponseField name="code" type="string">Business status code. `0000` indicates success.</ResponseField>
<ResponseField name="msg" type="string">Human-readable status message.</ResponseField>
<ResponseField name="data.folder_id" type="integer">Identifier of the newly created folder.</ResponseField>
<ResponseField name="data.folder_name" type="string">Folder display name.</ResponseField>

## Notes & Limits

* Creating a folder with a name that already exists returns `Folder with this name already exists`.
* The built-in Default folder does not need to be created — omit `folder_id` on upload to use it.


## OpenAPI

````yaml POST /serve/api/v1/folders/create
openapi: 3.1.0
info:
  title: Memories Platform API (Docs Mapping)
  version: v1
  description: OpenAPI mapping used by Mintlify Try it for the platform docs.
servers:
  - url: https://api.memories.ai
security:
  - ApiKeyAuth: []
paths:
  /serve/api/v1/folders/create:
    post:
      summary: Create Folder
      operationId: create_folder
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - name
              properties:
                name:
                  type: string
                  maxLength: 100
                  example: my-project
                  description: Folder name. Max 100 chars, unique within your account.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FolderItemResponse'
components:
  schemas:
    FolderItemResponse:
      type: object
      properties:
        code:
          type: string
          example: '0000'
        msg:
          type: string
          example: success
        data:
          $ref: '#/components/schemas/FolderItem'
    FolderItem:
      type: object
      properties:
        folder_id:
          type: integer
          example: 671631448308117500
          description: >-
            Folder identifier. -1 = Default folder; -2 = legacy API folder
            (read-only).
        folder_name:
          type: string
          example: my-project
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization

````