botruntime
API ReferenceFiles API

Download Exact File Ref

Streams the raw bytes of the exact immutable file generation named by a complete FileRef. All query values must be URL-encoded. The server resolves the id only inside the authenticated bot scope and requires the current size, content type, filename, and checksum to match; it never returns a blob key or provider URL. Unknown or duplicate query parameters are rejected, and the complete query string is limited to 4 KiB.

GET
/v1/files/download-ref

Authorization

BearerAuth
AuthorizationBearer <token>

In: header

Query Parameters

id*string

Bot-scoped file key. Encode the complete value, including slashes, spaces, plus signs, and non-ASCII characters.

Length1 <= length <= 1024
size*integer

Exact generation size in bytes. Zero-byte files are supported.

Formatint64
Range0 <= value <= 1073741824
contentType?string

Exact generation MIME type. Omit only when the persisted FileRef omits it.

Lengthlength <= 255
filename?string

Exact generation filename. Omit only when the persisted FileRef omits it.

Lengthlength <= 1024
checksum*string

Exact generation checksum from the authoritative FileRef.

Length1 <= length <= 128

Response Body

application/octet-stream

curl -X GET "https://example.com/v1/files/download-ref?id=string&size=0&checksum=string"
Empty
Empty
Empty
Empty
Empty
Empty