/developers
Developer docsAtom Files ↗
← API referenceFiles & delivery · API access unavailable
API REFERENCE / FILE DELIVERY

GET /v1/files/{file_id}/content

This is the streaming API: read only the bytes needed for playback, preview, seek, or resume. Pin version_id so the content cannot change halfway through a stream. A normal request streams a full version; Range requests a slice. The API may use a Mac, peer, or permitted cloud copy internally, but this endpoint does not guarantee a direct P2P route.

Request fields

LocationFieldTypeRequiredDescription
HeaderAuthorizationstringYesCredential scoped to the authorized resource.
Pathfile_idstringYesStable Atom file ID.
Queryversion_idstringRecommendedPin bytes to one immutable version.
HeaderRangestring (byte range)NoByte range for preview, seek, or resume.
HeaderIf-Rangestring (version tag)NoOnly resume when the version still matches.

Request example

Example request
GET /v1/files/file_789/content?version_id=ver_012
Authorization: Bearer <scoped token>
Range: bytes=0-65535

HTTP status codes

StatusMeaning
200 OKFull file body when no byte range is requested.
206 Partial ContentSuccess response shown below.
400 Bad RequestInvalid version or request syntax.
401 UnauthorizedMissing, expired, or invalid credential.
403 ForbiddenCredential is valid but lacks the required scope or role.
404 Not FoundFile or pinned version does not exist or is not visible.
416 Range Not SatisfiableRequested bytes fall outside this version.
429 Too Many RequestsRate limit reached; honor Retry-After when provided.
503 Service UnavailableService temporarily unavailable; retry safely.

Response fields

FieldTypeExample
bodybinary streamFile bytes

Response example

Example response
206 Partial Content
Accept-Ranges: bytes
Content-Range: bytes 0-65535/4194304
Content-Type: application/pdf
ETag: "ver_012"

<binary bytes>

How it works

Seek and resumeUse Range and a version-pinned ETag; If-Range can prevent combining bytes from different versions.
AvailabilityIf the source is offline and no authorized copy exists, return an explicit unavailable result rather than inventing a cloud fallback.
TransportExpose delivery route and metered bytes in diagnostics or usage records, not provider credentials or device addresses.

HTTP 206, 416, range validation, cache policy, and media-player behavior require contract and integration tests before release. A separate stream-session endpoint is unnecessary unless native or P2P transport negotiation proves it useful.