Skip to main content
GET
Get one file

Authorizations

Authorization
string
header
required

A Recursion API key, created in the console under API keys.

Headers

x-tenant-id
string

Optional tenant consistency check. When present, it must name the tenant bound to the API key, including when x-organization-id is default.

Minimum string length: 1
x-organization-id
string

Organization in which to act. Required for a tenant-scoped API key. Optional for an organization-scoped key, where it must name that same organization. The value may be an organization id or default.

Minimum string length: 1

Path Parameters

fileId
string<uuid>
required

File id (UUID) as returned by managedAgentsUploadFile or managedAgentsListFiles.

Response

A file object: bytes uploaded once and attachable to any number of sessions as a resource, or bytes a session produced. Attaching a file mounts it read-only into the session's sandbox at a path the session is told about.

A file object: bytes uploaded once and attachable to any number of sessions as a resource, or bytes a session produced. Attaching a file mounts it read-only into the session's sandbox at a path the session is told about.

byte_size
integer<int64>
required

Size of the file in bytes.

Required range: -9007199254740991 <= x <= 9007199254740991
created_at
string<date-time>
required

Server-assigned RFC 3339 timestamp of the upload.

downloadable
boolean
required

Whether GET /managed-agents/v1/files/{fileId}/content serves the bytes. True for every live file, upload or session output; expiry, not source, is what closes the content route.

file_id
string
required

Server-assigned id, used to attach the file to a session as a resource.

filename
string
required

The name the file was uploaded under, without any directory. This is the name it is mounted under in a sandbox unless a resource says otherwise.

media_type
string
required

The upload's declared Content-Type. When the part declared none, or declared application/octet-stream, the type is detected from the filename's extension, through a fixed table rather than the host's, and then from the bytes, falling back to application/octet-stream when neither says anything. Informational: the platform does not transcode or validate against it.

organization_id
string
required

Organization that owns the file. Server-assigned from the caller's credentials.

sha256
string
required

SHA-256 of the file's contents, for checking a download.

source
enum<string>
required

How the file came to exist: upload for a file you uploaded, session_output for a deliverable a session saved.

Available options:
upload,
session_output
type
enum<string>
required

Always file.

Available options:
file
expires_at
string<date-time>

When the file stops being attachable and its content stops being served. Its metadata stays readable and listed, with this in the past, for a grace before the file is reclaimed. Absent means it does not expire.

metadata
object

Caller-owned key/value data stored with the file and returned unchanged.

ownerAgentId
string

For a session output, the agent whose file history holds it: the agent the root session ran, including outputs its subagents and teammates saved. Absent on uploads and on outputs of sessions not started from an agent.

producerAgentVersionId
string

For a session output, the agent version the writing session ran. Absent for outputs saved before it was recorded.

producerSessionId
string

For a session output, the session in the tree that wrote it, which is a subagent or teammate when not the root.

scope_session_id
string

For a session output, the session that produced it. Absent on an upload, which belongs to the organization rather than to any one session.