Skip to main content
POST
Compose multiple files into a single file using zero-copy concatenation. Source files are deleted after successful composition.

Authorizations

X-Access-Token
string
header
required

Sandbox access token (envdAccessToken) for authenticating requests to a running sandbox. Returned by: POST /sandboxes (on create), POST /sandboxes/{sandboxID}/connect (on connect), POST /sandboxes/{sandboxID}/resume (on resume), and GET /sandboxes/{sandboxID} (for running or paused sandboxes).

Headers

E2b-Sandbox-Id
string
required

Identifier of the target sandbox. Routes the request to that sandbox's envd over the shared sandbox host.

E2b-Sandbox-Port
integer
default:49983
required

Port envd listens on inside the sandbox (default 49983).

Body

application/json
source_paths
string[]
required

Ordered list of source file paths to concatenate

destination
string
required

Destination file path for the composed file

username
string

User for setting ownership and resolving relative paths

Response

Files composed successfully

path
string
required

Path to the file

name
string
required

Name of the file

type
enum<string>
required

Type of the file

Available options:
file,
directory
metadata
object

User-defined metadata stored as extended attributes on the file.