Skip to main content
GET
Read an application file
string
required
The API key for your account. You can find this in your account settings.
Requires an API key with the files:read scope. Read File returns a single file inside a running application as JSON. Send ?encoding=base64 to get the file as a base64 string. It is meant for inspecting or downloading individual files (configs, logs, small assets) of up to 10 MB through the API, not for bulk transfers: use Create Snapshot to pull a full copy of the application instead.
Without encoding, the response is the legacy { type: "Buffer", data: number[] } object. This format is deprecated since September 27, 2026 and will be removed on March 27, 2027, when base64 becomes the default. Until then, legacy responses carry the Deprecation and Sunset headers. Send ?encoding=base64 in every request.
To see what is available before reading, call List Files first. To write a file back, use Create/Modify File, which takes the same base64 content with encoding: "base64". On workspace-shared applications the caller needs the maintain or admin role, and members without the restricted-files permission cannot read .env or .env.production, the request is rejected with PERMISSION_DENIED before the file is touched.

Parameters

string
required
The ID of the application. You can find this in the URL of your application’s dashboard.
string
required
The path to the file you want to read, relative to the root of your application. Up to 256 characters.
string
Send base64 to receive the file as a base64 string. Any other value answers INVALID_ENCODING. Without it, the response uses the deprecated Buffer format.

Response

string
Indicates whether the call was successful: success if it was, error if not.
object
The contents of the file.
Decode data to get the file’s bytes:

Common errors