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

# Patch a folder

> Updates a folder belonging to the specified matter.



## OpenAPI

````yaml /openapi.json patch /matters/{matterId}/documents/folders/{folderId}
openapi: 3.0.1
info:
  title: API
  version: '1.0'
servers:
  - url: https://api.smokeball.com
  - url: https://api.smokeball.com.au
  - url: https://api.smokeball.co.uk
  - url: https://stagingapi.smokeball.com
  - url: https://stagingapi.smokeball.com.au
  - url: https://stagingapi.smokeball.co.uk
security:
  - api-key: []
    token: []
paths:
  /matters/{matterId}/documents/folders/{folderId}:
    patch:
      tags:
        - Folders
      summary: Patch a folder
      description: Updates a folder belonging to the specified matter.
      operationId: PatchFolder
      parameters:
        - name: matterId
          in: path
          required: true
          schema:
            type: string
        - name: folderId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/FolderDto'
          application/json:
            schema:
              $ref: '#/components/schemas/FolderDto'
          application/*+json:
            schema:
              $ref: '#/components/schemas/FolderDto'
      responses:
        '202':
          description: >-
            When request is accepted. Returns a hypermedia 'Link' object of the
            folder to be updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Link'
        '400':
          description: >-
            When folder name is not provided or folder does not belong to the
            specified matter.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '404':
          description: When folder with the specified id does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
components:
  schemas:
    FolderDto:
      required:
        - name
      type: object
      properties:
        name:
          maxLength: 256
          minLength: 1
          type: string
          description: Name of the folder
          example: Property Documents
        parentFolderId:
          type: string
          description: Unique identifier of the parent folder
          nullable: true
          example: b471682e-fa17-4e46-b7fe-9b2b8fdcb3c2
        userId:
          type: string
          description: >-
            Unique identifier of the user modifying the folder. If null it will
            fallback to the authenticated user
          nullable: true
          example: 750eb5c5-ac0b-7d11-4997-e0ce9d8896c8
      additionalProperties: false
    Link:
      type: object
      properties:
        id:
          type: string
          nullable: true
        href:
          type: string
          nullable: true
        relation:
          type: string
          nullable: true
        method:
          type: string
          default: GET
          nullable: true
      additionalProperties: false
    ProblemDetails:
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
      additionalProperties: {}
  securitySchemes:
    api-key:
      type: apiKey
      name: x-api-key
      in: header
    token:
      type: apiKey
      name: Authorization
      in: header
      x-amazon-apigateway-authtype: cognito_user_pools

````