---
title: "Copies a file synchronously."
method: POST
path: "/v2/accounts/{accountId}/files/copy"
tags: ["File"]
---

# Copies a file synchronously.

`POST /v2/accounts/{accountId}/files/copy`

## Request

- Base URL: `https://api.bytescale.com`
- URL: `https://api.bytescale.com/v2/accounts/{accountId}/files/copy`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/bytescale/apis/bytescale-api/docs/v2/accounts/:accountId/files/copy/post.ts> (a function with typed inputs; its response is checked against the schema)

Copies a file synchronously.

## Path parameters

- `accountId` string, required: Your account ID. This is visible on the settings page: https://www.bytescale.com/dashboard/settings

## Request body

- CopyFileRequest: Request body for CopyFile.
  - `destination` string, required: Absolute path to a file. Begins with a `/`.
  - `metadata` CopyFileMetadata
    - `merge` boolean: If `true` then merges `value` with the original data, giving precedence to `value`. If `false` then uses `value` as-is, ignoring the original data. Default: false
    - `value` FileMetadata: The file metadata specified in the original upload request as a JSON object.
  - `source` string, required: Absolute path to a file. Begins with a `/`.
  - `tags` CopyFileTags
    - `merge` boolean: If `true` then merges `value` with the original data, giving precedence to `value`. If `false` then uses `value` as-is, ignoring the original data. Default: false
    - `value` FileTagName[]: The value to set into the field. Default: empty object / empty array

## Response `200`

Success.

- CopyFileResponse: Response body for CopyFile.
  - `status` 'Copied', required

## Other responses

- `401`: Unauthenticated.

## Changes

- **2026-09-01** `d63ecdd9ae9c`: 1 warning, 4 info
  - removed the request property `condition`
  - added the new optional request property `metadata`
  - added the new optional request property `tags`
  - removed the `FileNotFound` enum value from the `status` response property for the response status `200`
  - …1 more

[Operation history](https://skmtc.dev/bytescale/apis/bytescale-api/changes/v2/accounts/:accountId/files/copy/post.md)

---

[API](https://skmtc.dev/bytescale/apis/bytescale-api.md) - [All operations](https://skmtc.dev/bytescale/apis/bytescale-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bytescale/apis/bytescale-api/revisions/d63ecdd9ae9c?raw)
