Skip to content

Download objects as a ZIP archive

POST
/orgs/{orgId}/buckets/{bucketId}/objects/archive
curl --request POST \
--url https://example.com/api/v1/orgs/example/buckets/example/objects/archive \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "keys": [ "example" ] }'

Streams a ZIP archive of the requested object keys and folder prefixes (keys ending in /). Accepts JSON { "keys": [...] } or application/x-www-form-urlencoded with a JSON-encoded keys field. Limited to 10,000 expanded files and 3.94 GiB total (non-ZIP64). Requires read capability on the bucket.

orgId
required
string

Organization ID.

bucketId
required
string

Bucket ID.

object
keys
required

Up to 100 object keys or folder prefixes (ending in /) to include in the archive.

Array<string>
<= 100 items

Example generated

{
"keys": [
"example"
]
}

A zip archive of the requested objects and folders

Media typeapplication/zip
string format: binary

Invalid body or unsafe object key.

Media typeapplication/json

Error returned when request input fails schema validation or violates a domain rule.

object
code
required
string
Allowed values: BAD_REQUEST
data
object
issues
required

Field-level validation failures, present when schema validation fails.

Array<object>
object
message
required
string
path
required

Dot-separated field path.

string
message
required

Human-readable error explanation.

string

Example

{
"code": "BAD_REQUEST"
}

Authentication required or credentials invalid.

Media typeapplication/json

Standard REST error envelope.

object
code
required

Machine-readable error code.

string
data

Optional structured error details.

message
required

Human-readable error explanation.

string

Example generated

{
"code": "example",
"data": "example",
"message": "example"
}

Insufficient permissions or bucket key cannot read objects.

Media typeapplication/json

Standard REST error envelope.

object
code
required

Machine-readable error code.

string
data

Optional structured error details.

message
required

Human-readable error explanation.

string

Example generated

{
"code": "example",
"data": "example",
"message": "example"
}

Bucket or one of the requested objects was not found.

Media typeapplication/json

Standard REST error envelope.

object
code
required

Machine-readable error code.

string
data

Optional structured error details.

message
required

Human-readable error explanation.

string

Example generated

{
"code": "example",
"data": "example",
"message": "example"
}

Selection exceeds 10,000 files or 3.94 GiB.

Media typeapplication/json

Standard REST error envelope.

object
code
required

Machine-readable error code.

string
data

Optional structured error details.

message
required

Human-readable error explanation.

string

Example generated

{
"code": "example",
"data": "example",
"message": "example"
}

Unexpected server error. Quote data.requestId when you report it.

Media typeapplication/json

Error returned when Sendcrate or one of its providers fails (5xx).

object
code
required
string
Allowed values: INTERNAL_SERVER_ERROR PROVIDER_FAILED
data
object
debug

Error chain with stack traces. Present only when the server runs in development mode.

Array
requestId

Request reference to quote when you report the error.

string
message
required

Human-readable error explanation.

string

Example

{
"code": "INTERNAL_SERVER_ERROR"
}