Skip to content
Docs
GitHub

Copy a file

Preview

Manage execution sessions and rooms, and their files, tasks, storage, databases and managed sandboxes.

Public APIEverruns Cloud and self-hosted Platform

POST/v1/workspaces/{workspace_id}/fs/_/copy

See authentication for credentials and permissions.

workspace_id
required
string

Workspace ID (wsp_<32-hex>)

Media typeapplication/json

Request to copy a file

object
dst_path
required

Destination path (relative to the workspace filesystem root).

string

Example

docs/runbooks/refund-30-days.md
src_path
required

Source path (relative to the workspace filesystem root).

string

Example

templates/runbook.md

Responses

201Copied

Copied

Media typeapplication/json

Complete file with content

object
content

File content. Encoding is controlled by the encoding field: plain UTF-8 text for text, base64-encoded bytes for base64. None for directories and when this is a metadata-only listing.

string | null
created_at
required

Timestamp when this entry was created (RFC 3339).

string format: date-time
encoding

Content encoding for the content field: text (UTF-8) or base64 (binary).

string
id
required

Internal database UUID for this file entry.

string format: uuid
is_directory
required

true when this entry represents a directory; false for a regular file.

boolean
is_readonly
required

Whether the entry was marked read-only at creation. Read-only entries cannot be edited or deleted by the session.

boolean
name
required

File or directory name (the last segment of path).

string
path
required

Absolute path within the session workspace (e.g. /notes.md).

string
session_id
required

UUID of the owning session.

string format: uuid
size_bytes
required

File size in bytes. 0 for directories.

integer format: int64
updated_at
required

Timestamp when this entry was last updated (RFC 3339).

string format: date-time

Example generated

{
"content": "example",
"created_at": "2026-04-15T12:00:00Z",
"encoding": "example",
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"is_directory": true,
"is_readonly": true,
"name": "example",
"path": "example",
"session_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"size_bytes": 1,
"updated_at": "2026-04-15T12:00:00Z"
}
400Invalid request or cannot copy directories

Invalid request or cannot copy directories

404Source not found

Source not found

409Destination exists

Destination exists

500Internal server error

Internal server error