> ## 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.

# Update a folder

> Rename one of your sidebar folders, change its icon color, move it in your folder list, or add, reorder, or remove its sessions. Use updatePin to move a pinned folder among your pins.



## OpenAPI

````yaml https://api.tembo.io/public-api/openapi/public patch /v1/folders/{folderId}
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/{folderId}:
    patch:
      tags:
        - Folders
      summary: Update a folder
      description: >-
        Rename one of your sidebar folders, change its icon color, move it in
        your folder list, or add, reorder, or remove its sessions. Use updatePin
        to move a pinned folder among your pins.
      operationId: updateFolder
      parameters:
        - in: path
          name: folderId
          schema:
            type: string
            format: uuid
          required: true
      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, from the same palette as project icons.
                placement:
                  type: object
                  properties:
                    target:
                      type: string
                      format: uuid
                      description: Another of your folders to place this folder next to.
                    position:
                      type: string
                      enum:
                        - before
                        - after
                      description: Whether to place this folder before or after the target.
                  required:
                    - target
                    - position
                  additionalProperties: false
                  description: >-
                    Where to put this folder in your sidebar folder list. Pinned
                    folders are ordered with updatePin instead.
                addSession:
                  type: object
                  properties:
                    id:
                      type: string
                      format: uuid
                    placement:
                      type: object
                      properties:
                        target:
                          type: string
                          format: uuid
                          description: >-
                            Session in this folder to place the added session
                            next to.
                        position:
                          type: string
                          enum:
                            - before
                            - after
                          description: >-
                            Whether to place the session before or after the
                            target.
                      required:
                        - target
                        - position
                      additionalProperties: false
                      description: >-
                        Where to put the session in the folder. Omit to put a
                        newly added session first and leave one already here
                        where it is.
                  required:
                    - id
                  additionalProperties: false
                  description: >-
                    Session to put in this folder, taking it out of any other
                    folder of yours, or to reorder within it.
                removeSession:
                  type: object
                  properties:
                    id:
                      type: string
                      format: uuid
                  required:
                    - id
                  additionalProperties: false
                  description: Session to take out of this folder.
              additionalProperties: false
      responses:
        '200':
          description: Update 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.update('7c9e6679-7425-40de-944b-e07fc1f90ae7', {});
        - lang: rust
          label: Rust SDK
          source: |
            use tembo_rs::*;

            let client = Tembo::from_env()?;

            let response = client
                .folders()
                .update("7c9e6679-7425-40de-944b-e07fc1f90ae7", FoldersUpdateBody::new())
                .send()
                .await?;
components:
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer

````

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