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

# Update Folder

> Rename and/or move a folder. Include the parent field to move the folder (set parent_folder_id to move under another folder, or leave it unset to move to the root).



## OpenAPI

````yaml /sections/api-reference/openapi-spec-v2.yaml put /v2/folders/{id}
openapi: 3.1.0
info:
  title: Serval Public API
  description: Serval Public API
  contact:
    name: Serval
    url: https://serval.com
    email: support@serval.com
  license:
    name: Serval License
    url: https://serval.com/license
  version: 2.0.0
servers:
  - url: https://public.api.serval.com
security:
  - BearerAuth: []
tags:
  - name: Access Policy API
  - name: Access Policy Approval Procedure API
  - name: Access Profile API
  - name: Access Relationship API
  - name: Access Request API
  - name: Agent Session API
  - name: App Instance API
  - name: App Resource API
  - name: App Resource Role API
  - name: Approval Delegation API
  - name: Approval Request API
  - name: Audit Log API
  - name: Change Blackout API
  - name: Change Model API
  - name: Custom Field API
  - name: Custom Service API
  - name: Entity API
  - name: Entity Field Mapping API
  - name: Entity Ingestion Config API
  - name: Entity Type API
  - name: Folder API
  - name: Group API
  - name: Guidance API
  - name: Help Agent API
  - name: Journey API
  - name: Knowledge API
  - name: Knowledge Base API
  - name: Report API
  - name: SLA API
  - name: Schedule API
  - name: Tag API
  - name: Team API
  - name: Team User API
  - name: Ticket API
  - name: Topic API
  - name: User API
  - name: User Relationship API
  - name: Workflow API
  - name: Workflow Approval Procedure API
  - name: Workflow Run API
paths:
  /v2/folders/{id}:
    put:
      tags:
        - Folder API
      summary: Update Folder
      description: >-
        Rename and/or move a folder. Include the parent field to move the folder
        (set parent_folder_id to move under another folder, or leave it unset to
        move to the root).
      operationId: svrelay.publicv2.PublicAPIServiceV2.UpdateFolder
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            title: id
            description: The ID of the folder. The owning team is resolved from the folder.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  title: name
                  description: New name. Omit to leave the name unchanged.
                  nullable: true
                parent:
                  $ref: '#/components/schemas/svflow.publicapi.ParentFolderIdUpdate'
                  title: parent
                  description: >-
                    New parent. Omit to leave the folder where it is; include it
                    to move the
                     folder (set parent_folder_id to move under that folder, or leave it unset
                     to move the folder to the root).
              title: UpdateFolderRequest
              additionalProperties: false
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/svflow.publicapi.UpdateFolderResponse'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/connect.error'
      security:
        - BearerAuth: []
components:
  schemas:
    svflow.publicapi.ParentFolderIdUpdate:
      type: object
      properties:
        parentFolderId:
          type: string
          title: parent_folder_id
          description: The destination parent folder. Unset moves the folder to the root.
          nullable: true
          x-stainless-terraform-configurability: optional
      title: ParentFolderIdUpdate
      additionalProperties: false
      description: >-
        A presence-tracked parent-folder update. The message wrapper lets the
        JSON
         surface distinguish "omitted" (leave the folder where it is) from a move:
         send the wrapper with parent_folder_id set to move the folder under that
         parent, or with parent_folder_id unset to move it to the root.
    svflow.publicapi.UpdateFolderResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/svflow.pubapimodels.Folder'
          title: data
          description: The updated folder.
          x-stainless-terraform-configurability: optional
      title: UpdateFolderResponse
      additionalProperties: false
    connect.error:
      type: object
      properties:
        code:
          type: string
          examples:
            - not_found
          enum:
            - canceled
            - unknown
            - invalid_argument
            - deadline_exceeded
            - not_found
            - already_exists
            - permission_denied
            - resource_exhausted
            - failed_precondition
            - aborted
            - out_of_range
            - unimplemented
            - internal
            - unavailable
            - data_loss
            - unauthenticated
          description: >-
            The status code, which should be an enum value of
            [google.rpc.Code][google.rpc.Code].
          x-stainless-terraform-configurability: optional
        message:
          type: string
          description: >-
            A developer-facing error message, which should be in English. Any
            user-facing error message should be localized and sent in the
            [google.rpc.Status.details][google.rpc.Status.details] field, or
            localized by the client.
          x-stainless-terraform-configurability: optional
        detail:
          $ref: '#/components/schemas/google.protobuf.Any'
          x-stainless-terraform-configurability: optional
      title: Connect Error
      additionalProperties: true
      description: >-
        Error type returned by Connect:
        https://connectrpc.com/docs/go/errors/#http-representation
    svflow.pubapimodels.Folder:
      type: object
      properties:
        id:
          type: string
          title: id
          description: The ID of the folder.
          readOnly: true
          x-stainless-terraform-configurability: computed
        teamId:
          type: string
          title: team_id
          description: The ID of the team that the folder belongs to.
          x-stainless-terraform-configurability: optional
        name:
          type: string
          title: name
          description: The name of the folder.
          x-stainless-terraform-configurability: optional
        itemType:
          $ref: '#/components/schemas/svflow.pubapimodels.FolderItemType'
          title: item_type
          description: The non-folder item type this folder can contain.
          x-stainless-terraform-configurability: optional
        parentFolderId:
          type: string
          title: parent_folder_id
          description: >-
            The ID of the parent folder. Unset when the folder is at the root of
            the
             team's folder tree.
          nullable: true
          x-stainless-terraform-configurability: optional
      title: Folder
      additionalProperties: false
      description: A folder organizing a specific type of item within a team.
    google.protobuf.Any:
      type: object
      properties:
        type:
          type: string
          x-stainless-terraform-configurability: optional
        value:
          type: string
          format: binary
          x-stainless-terraform-configurability: optional
        debug:
          type: object
          additionalProperties: true
          x-stainless-terraform-configurability: optional
      additionalProperties: true
      description: >-
        Contains an arbitrary serialized message along with a @type that
        describes the type of the serialized message.
    svflow.pubapimodels.FolderItemType:
      type: string
      title: FolderItemType
      enum:
        - FOLDER_ITEM_TYPE_UNSPECIFIED
        - FOLDER_ITEM_TYPE_FOLDER
        - FOLDER_ITEM_TYPE_WORKFLOW
        - FOLDER_ITEM_TYPE_GUIDANCE
      description: Types of items that can appear in folder contents.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````