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

# Rename a folder

> Renames a folder. List folders (`contactList`/`companyList`) resolve by id alone; pass `?type=campaign` or `?type=agent` to rename a campaign or agent folder, which live in their own services. The new name must be unused among folders of the same kind (409 FOLDER_NAME_TAKEN). The response is the rename echo — the folder's id and its new name.

Errors:
- `404` `FOLDER_NOT_FOUND` — No folder with that id (of the routed kind) belongs to the token owner.
- `409` `FOLDER_NAME_TAKEN` — Another folder of the same kind already has that name.
- `400` `INVALID_REQUEST` — campaign/agent kinds only: the owning service rejected the request.
- `422` `VALIDATION_FAILED` — folderId not a 24-hex id, name missing/blank/over 120 characters, or type outside the enum.
- `429` `RATE_LIMITED` — The lists rate bucket (120 requests/minute, 10,000/day per token owner) is exhausted, or the owning service (campaign/agent folders) refused the call.

Requires one of the following token scopes: lists.



## OpenAPI

````yaml /openapi.json patch /business/folders/{folderId}
openapi: 3.1.0
info:
  title: Fuse Business API
  version: 1.0.0
  description: >-
    External API for lists, campaigns, prospect search and contacts.
    Authenticate with your API token as HTTP Basic. All paths are under /api/v1.
servers:
  - url: https://api.tryfuse.ai/api/v1
    description: Production
security:
  - basicAuth: []
tags:
  - name: Lists
  - name: Custom columns
  - name: Smart columns
  - name: Exports
  - name: Campaigns
  - name: Knowledge hubs
  - name: Analytics
  - name: Website intent
  - name: Account
  - name: Prospect search
  - name: Campaign steps
  - name: Scheduled sends
  - name: Campaign templates
  - name: Agents
  - name: Research
  - name: Company search
  - name: Saved searches
  - name: Folders
  - name: Contacts
paths:
  /business/folders/{folderId}:
    patch:
      tags:
        - Folders
      summary: Rename a folder
      description: >-
        Renames a folder. List folders (`contactList`/`companyList`) resolve by
        id alone; pass `?type=campaign` or `?type=agent` to rename a campaign or
        agent folder, which live in their own services. The new name must be
        unused among folders of the same kind (409 FOLDER_NAME_TAKEN). The
        response is the rename echo — the folder's id and its new name.


        Errors:

        - `404` `FOLDER_NOT_FOUND` — No folder with that id (of the routed kind)
        belongs to the token owner.

        - `409` `FOLDER_NAME_TAKEN` — Another folder of the same kind already
        has that name.

        - `400` `INVALID_REQUEST` — campaign/agent kinds only: the owning
        service rejected the request.

        - `422` `VALIDATION_FAILED` — folderId not a 24-hex id, name
        missing/blank/over 120 characters, or type outside the enum.

        - `429` `RATE_LIMITED` — The lists rate bucket (120 requests/minute,
        10,000/day per token owner) is exhausted, or the owning service
        (campaign/agent folders) refused the call.


        Requires one of the following token scopes: lists.
      operationId: renameFolder
      parameters:
        - name: folderId
          in: path
          required: true
          description: 24-character hex id of the folder (from GET /business/folders).
          schema:
            type: string
            description: 24-character hex id of the folder (from GET /business/folders).
        - name: type
          in: query
          required: false
          description: >-
            Kind of the folder being changed: required as campaign or agent for
            those folder kinds; omit (or pass contactList/companyList) for a
            list folder, which resolves by id alone.
          schema:
            type: string
            enum:
              - contactList
              - companyList
              - campaign
              - agent
            description: >-
              Kind of the folder being changed: required as campaign or agent
              for those folder kinds; omit (or pass contactList/companyList) for
              a list folder, which resolves by id alone.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 120
                  description: >-
                    New folder name (1-120 characters); a name already used by
                    another folder of the same kind answers 409
                    FOLDER_NAME_TAKEN.
              required:
                - name
      responses:
        '200':
          description: Success
          headers:
            RateLimit-Limit:
              schema:
                type: integer
              description: Requests permitted in the current window.
            RateLimit-Remaining:
              schema:
                type: integer
              description: Requests remaining in the current window.
            RateLimit-Reset:
              schema:
                type: integer
              description: Seconds until the current window resets.
          content:
            application/json:
              schema:
                type: object
                required:
                  - folder
                properties:
                  folder:
                    type: object
                    required:
                      - id
                      - name
                    properties:
                      id:
                        type: string
                      name:
                        type: string
              example:
                folder:
                  id: 68a1f9aa9c41d20014b3f101
                  name: Q4 pipeline
        '400':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - basicAuth: []
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            param:
              type:
                - string
                - 'null'
            doc_url:
              type:
                - string
                - 'null'
            request_id:
              type:
                - string
                - 'null'
          required:
            - code
            - message
      required:
        - error
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: >-
        Your API token (`af_…`) as the Basic-auth username, with an empty
        password.

````