> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tembo.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a folder

> Create a sidebar folder for organizing sessions. New folders go first in your folder list; use createPin to pin one.



## OpenAPI

````yaml https://api.tembo.io/public-api/openapi/public post /v1/folders
openapi: 3.1.0
info:
  title: Tembo Public API
  description: >-
    Manage agents, sessions, repositories, and organization resources with the
    Tembo API.
  version: 1.0.0
servers:
  - url: https://api.tembo.io
    description: Tembo API
  - url: https://{deployment-origin}/api/public-api
    description: Self-hosted Tembo
    variables:
      deployment-origin:
        default: tembo.example.com
        description: Hostname of your self-hosted Tembo deployment
security: []
paths:
  /v1/folders:
    post:
      tags:
        - Folders
      summary: Create a folder
      description: >-
        Create a sidebar folder for organizing sessions. New folders go first in
        your folder list; use createPin to pin one.
      operationId: createFolder
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 100
                  description: Folder name shown in the sidebar.
                color:
                  type: string
                  enum:
                    - neutral
                    - red
                    - orange
                    - yellow
                    - green
                    - teal
                    - blue
                    - purple
                    - pink
                  description: Folder icon color. Defaults to neutral.
              required:
                - name
              additionalProperties: false
      responses:
        '201':
          description: Create a folder
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                  name:
                    type: string
                  color:
                    type: string
                    enum:
                      - neutral
                      - red
                      - orange
                      - yellow
                      - green
                      - teal
                      - blue
                      - purple
                      - pink
                    description: Folder icon color, from the same palette as project icons.
                  createdAt:
                    type: string
                    format: date-time
                  updatedAt:
                    type: string
                    format: date-time
                required:
                  - id
                  - name
                  - color
                  - createdAt
                  - updatedAt
                additionalProperties: false
        '400':
          description: Validation error or missing caller scope
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '404':
          description: Folder or session not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '409':
          description: Folder limit reached
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
      security:
        - apiKey: []
      x-codeSamples:
        - lang: typescript
          label: TypeScript SDK
          source: |
            import Tembo from '@tembo-io/sdk';

            const client = new Tembo();

            const folder = await client.folders.create({
              name: 'x',
            });
        - lang: rust
          label: Rust SDK
          source: |
            use tembo_rs::*;

            let client = Tembo::from_env()?;

            let response = client
                .folders()
                .create(FoldersCreateBody::new("x".to_string()))
                .send()
                .await?;
components:
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.