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

# Rename a file or folder



## OpenAPI

````yaml /api-reference/openapi.json post /documents/rename
openapi: 3.0.3
info:
  title: FileFeed API
  version: '2026-05-25'
  description: >-
    Official FileFeed REST API for connections, pipelines, schemas, pipeline
    runs, webhooks, outbound uploads, documents, files, and notifications.
    Date-based API versioning is controlled by the `FileFeed-Version` request
    header (default `2024-09-01`; latest `2026-05-25`); this document describes
    the `2026-05-25` shape.
servers:
  - url: https://api.sftpsync.io
security:
  - ApiKeyAuth: []
tags:
  - name: Connections
  - name: Pipelines
  - name: Schemas
  - name: Pipeline Runs
  - name: Webhooks
  - name: Outbound Uploads
  - name: Documents
  - name: Files
  - name: Notifications
  - name: Clients (deprecated)
paths:
  /documents/rename:
    post:
      tags:
        - Documents
      summary: Rename a file or folder
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RenameParams'
      responses:
        '200':
          description: Renamed
          content:
            application/json:
              schema:
                type: object
                properties:
                  renamed:
                    type: boolean
                    enum:
                      - true
                  path:
                    type: string
                required:
                  - renamed
                  - path
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  schemas:
    RenameParams:
      type: object
      properties:
        connectionId:
          type: string
        path:
          type: string
        newName:
          type: string
          description: Single path segment (no slashes).
        force:
          type: boolean
      required:
        - connectionId
        - path
        - newName
    ErrorResponse:
      type: object
      properties:
        message:
          type: string
        statusCode:
          type: integer
        error:
          type: string
  responses:
    Forbidden:
      description: Forbidden — e.g. a protected pipeline folder without admin + force.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````