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

# Remove

> Remove a file or folder.

Remove a file or folder. Removed paths are unrecoverable — preview first with
[Preview](/api-reference/preview/preview) if you want to dry-run the request.

### Body parameters

<ParamField body="path" type="string | string[]" required>
  Source location path.

  A valid file or folder path begins with the location, followed by a path
  relative to the root directory. To remove multiple files, submit a string
  array. Regex supported.

  **Examples**

  * `"Production Bucket/archives/2026-04-21"`
  * `"Dropbox/*"`
</ParamField>

### Example

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.byteport.com/remove \
    -H "Authorization: Bearer bp_xxxxxxxxx" \
    -H "User-Agent: my-app/1.0" \
    -H "Content-Type: application/json" \
    -d '{
      "path": "Dropbox/tmp/*"
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "id": "trf_01HZ...",
    "status": "queued"
  }
  ```
</ResponseExample>


## OpenAPI

````yaml POST /remove
openapi: 3.1.0
info:
  title: Byteport API
  description: >-
    The Byteport API lets you move, share, and manage files across every storage
    location connected to your workspace through a single HTTP interface.
  version: 1.0.0
servers:
  - url: https://api.byteport.com
security:
  - bearerAuth: []
paths:
  /remove:
    post:
      summary: Remove
      description: Remove one or more files or folders.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - path
              properties:
                path:
                  description: Source location path. Regex supported.
                  oneOf:
                    - type: string
                    - type: array
                      items:
                        type: string
      responses:
        '200':
          description: Remove accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransferResponse'
        '400':
          $ref: '#/components/responses/Error'
components:
  schemas:
    TransferResponse:
      type: object
      properties:
        id:
          type: string
          description: Identifier for the transfer.
        status:
          type: string
          enum:
            - queued
            - running
            - complete
    Error:
      type: object
      required:
        - error
        - message
      properties:
        error:
          type: integer
        message:
          type: string
  responses:
    Error:
      description: Unexpected error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````