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

# Rename Folder

> Rename a folder (name only).

parent_id cannot be changed via PATCH — use POST /{id}/move instead.
Returns 404 if the folder is not found or belongs to a different team.



## OpenAPI

````yaml /openapi/mio-openapi.json patch /api/v1/teams/{team_id}/folders/{id}
openapi: 3.1.0
info:
  description: >-
    Production API reference for Membership.io. Use the authored guides for
    workflows and the generated endpoint pages for exact parameters and schemas.
  title: Membership.io API
  version: 0.1.0
servers:
  - description: Production
    url: https://api.member.dev
security:
  - bearerAuth: []
paths:
  /api/v1/teams/{team_id}/folders/{id}:
    patch:
      tags:
        - media-admin-folders
      summary: Rename Folder
      description: |-
        Rename a folder (name only).

        parent_id cannot be changed via PATCH — use POST /{id}/move instead.
        Returns 404 if the folder is not found or belongs to a different team.
      operationId: >-
        media_admin_folders.patch_media_admin_folders_patch_teams_by_team_id_folders_by_id
      parameters:
        - in: path
          name: team_id
          required: true
          schema:
            title: Team Id
            type: string
        - in: path
          name: id
          required: true
          schema:
            title: Id
            type: string
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/FolderUpdateRequest'
        required: true
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/FolderResponse'
          description: Successful Response
        '422':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - HTTPBearer: []
components:
  schemas:
    FolderUpdateRequest:
      description: Request body for PATCH /api/teams/{team_id}/folders/{id}.
      properties:
        data:
          $ref: '#/components/schemas/FolderUpdateData'
      required:
        - data
      title: FolderUpdateRequest
      type: object
    FolderResponse:
      description: Single-resource JSON:API response wrapping a FolderResource.
      properties:
        data:
          $ref: '#/components/schemas/JsonApiResource_FolderAttributes_'
        included:
          anyOf:
            - items: {}
              type: array
            - type: 'null'
          title: Included
        links:
          anyOf:
            - $ref: '#/components/schemas/JsonApiLinks'
            - type: 'null'
        meta:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Meta
      required:
        - data
      title: FolderResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    FolderUpdateData:
      properties:
        attributes:
          $ref: '#/components/schemas/FolderUpdateAttributes'
        id:
          title: Id
          type: string
        type:
          const: folders
          default: folders
          title: Type
          type: string
      required:
        - id
        - attributes
      title: FolderUpdateData
      type: object
    JsonApiResource_FolderAttributes_:
      properties:
        attributes:
          $ref: '#/components/schemas/FolderAttributes'
        id:
          title: Id
          type: string
        links:
          anyOf:
            - $ref: '#/components/schemas/JsonApiLinks'
            - type: 'null'
        meta:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Meta
        relationships:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Relationships
        type:
          title: Type
          type: string
      required:
        - id
        - type
        - attributes
      title: JsonApiResource[FolderAttributes]
      type: object
    JsonApiLinks:
      properties:
        self:
          anyOf:
            - type: string
            - type: 'null'
          title: Self
      title: JsonApiLinks
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
    FolderUpdateAttributes:
      description: Rename only — parent_id cannot be changed via PATCH (use /move instead).
      properties:
        name:
          anyOf:
            - maxLength: 255
              minLength: 1
              type: string
            - type: 'null'
          description: New folder name.
          title: Name
      title: FolderUpdateAttributes
      type: object
    FolderAttributes:
      description: >-
        Serialisable attributes of a Folder resource (no id/type inside
        attributes).


        read-shape (P2 retro #1): enumerate all response fields explicitly.
      properties:
        created_at:
          format: date-time
          title: Created At
          type: string
        name:
          title: Name
          type: string
        parent_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Parent Id
        path_array:
          items:
            type: string
          title: Path Array
          type: array
        updated_at:
          format: date-time
          title: Updated At
          type: string
      required:
        - name
        - path_array
        - created_at
        - updated_at
      title: FolderAttributes
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT or mio_sk API key
      description: >-
        Send platform JWTs, contact JWTs, or team API keys as `Authorization:
        Bearer <token>`.
      scheme: bearer
      type: http
    HTTPBearer:
      scheme: bearer
      type: http

````