Skip to content

Stream files into one archive after checking each source against live Share grants. An unshared source matches a missing Item response (#435, DESIGN §26). Return a complete archive to app clients or one offset chunk to bounded agent adapters (#760).

POST
/api/v1/files/download/zip
curl --request POST \
--url https://example.com/api/v1/files/download/zip \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "chunk_size": 1, "offset": 1, "paths": [ "example" ], "revision": "example" }'

Route: /api/v1/files/download/zip. Inputs: . Do not automatically replay this operation after an uncertain result.

Media typeapplication/json

Fixed ZIP request fields; offset opts into bounded generated-tool chunks (#760).

object
chunk_size

Maximum chunk size, up to 720 KiB. The next call uses offset plus bytes returned.

integer | null format: int32
>= 1 <= 737280
offset

Byte offset from the start of the deterministic ZIP stream.

integer | null format: int64
paths
required

Home-relative item paths to include.

Array<string>
revision

Copy the first chunk’s ETag here on every continuation. Restart at zero after a 409.

string | null
<= 66 characters
Examplegenerated
{
"chunk_size": 1,
"offset": 1,
"paths": [
"example"
],
"revision": "example"
}
Media typeapplication/zip
ETag
string

Copy to revision on ZIP continuation requests

Media typeapplication/json

The standard API error response: { "error": { ... } }.

object
error
required

Error details.

object
code
required

Stable machine-readable code.

string
Allowed values: bad_request unauthorized forbidden not_found conflict name_conflict_case name_too_long push_endpoint_rejected too_many_requests internal service_unavailable
details
One of:

Optional field or operation details.

object
key
additional properties
string
message
required

Safe text for logs or a user-facing error message.

string
Example
{
"error": {
"code": "bad_request"
}
}
Media typeapplication/json

The standard API error response: { "error": { ... } }.

object
error
required

Error details.

object
code
required

Stable machine-readable code.

string
Allowed values: bad_request unauthorized forbidden not_found conflict name_conflict_case name_too_long push_endpoint_rejected too_many_requests internal service_unavailable
details
One of:

Optional field or operation details.

object
key
additional properties
string
message
required

Safe text for logs or a user-facing error message.

string
Example
{
"error": {
"code": "bad_request"
}
}
Media typeapplication/json

The standard API error response: { "error": { ... } }.

object
error
required

Error details.

object
code
required

Stable machine-readable code.

string
Allowed values: bad_request unauthorized forbidden not_found conflict name_conflict_case name_too_long push_endpoint_rejected too_many_requests internal service_unavailable
details
One of:

Optional field or operation details.

object
key
additional properties
string
message
required

Safe text for logs or a user-facing error message.

string
Example
{
"error": {
"code": "bad_request"
}
}
Media typeapplication/json

The standard API error response: { "error": { ... } }.

object
error
required

Error details.

object
code
required

Stable machine-readable code.

string
Allowed values: bad_request unauthorized forbidden not_found conflict name_conflict_case name_too_long push_endpoint_rejected too_many_requests internal service_unavailable
details
One of:

Optional field or operation details.

object
key
additional properties
string
message
required

Safe text for logs or a user-facing error message.

string
Example
{
"error": {
"code": "bad_request"
}
}
Media typeapplication/json

The standard API error response: { "error": { ... } }.

object
error
required

Error details.

object
code
required

Stable machine-readable code.

string
Allowed values: bad_request unauthorized forbidden not_found conflict name_conflict_case name_too_long push_endpoint_rejected too_many_requests internal service_unavailable
details
One of:

Optional field or operation details.

object
key
additional properties
string
message
required

Safe text for logs or a user-facing error message.

string
Example
{
"error": {
"code": "bad_request"
}
}