apyhub
Back
▣ FILE CONVERSION · FILE MANIPULATION

Generate Archives API

Hosted on ApyHub

What it does

ZIP Archive Builder packages uploaded files or remote file URLs into a ZIP and gives you either a direct download or a signed link.

Send one or more binary files to /file/download or /file/link, and send one or more remote URLs to /url/download or /url/link. Each request accepts an optional output query value to name the archive; if you omit it, the default is output.zip. The download endpoints stream the ZIP as binary data, while the link endpoints return a JSON object with a data field containing a signed URI.

Use ZIP Archive Builder when you need to bundle user uploads into a single attachment, collect assets from different storage locations, or generate an archive for later retrieval without streaming it back immediately. It fits file bundling workflows where you want a predictable archive name and a simple response shape.

The service keeps the contract narrow: file-based requests take files, URL-based requests take urls, and the outputs are either a binary ZIP or a link to the generated file.

▣ ENDPOINT 01 / 04
POST
Create ZIP from uploaded files and stream download
https://api.eu.apyhub.com/apyhub/create-zip/file/download

QUICKSTART

GUIDE

Quickstart

Create a ZIP archive from one or more files and download it as a binary response.

curl -X POST "https://api.eu.apyhub.com/apyhub/create-zip/file/download?output=output.zip" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "files": [
      "/path/to/file1.txt",
      "/path/to/file2.png"
    ]
  }'

What you'll get back

Returns a binary file (string with format: binary) containing the ZIP archive.

TRY ITLIVE · 150 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.
body*
files*
One or more files to include in the archive.

About this endpoint

What it does

Creates a ZIP archive from the uploaded files and streams the resulting download back to the caller.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoName of the generated ZIP file. Default: output.zip.

Request Body

ParameterTypeMandatoryDescription
filesBinary ArrayYesOne or more files to include in the archive.

Response

Returns a binary file download containing the generated ZIP archive.

ParameterTypeMandatoryDescription
dataBinaryYesThe ZIP file content returned as a binary response.

Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.

▣ ENDPOINT 02 / 04
POST
Create ZIP from uploaded files and return signed link
https://api.eu.apyhub.com/apyhub/create-zip/file/link

QUICKSTART

GUIDE

Quickstart

Create a ZIP from one or more file links, and optionally name the output file with a query parameter.

curl -X POST "https://api.eu.apyhub.com/apyhub/create-zip/file/link?output=output.zip" \
  -H "apy-token: $APY_TOKEN" \
  -F "files=@/path/to/file1.txt" \
  -F "files=@/path/to/file2.png"

What you'll get back

Returns a JSON object with a data string field containing a URI to the generated ZIP file.

{
  "data": "https://storage.example.com/zip/output.zip?sig=abc"
}
TRY ITLIVE · 150 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.
body*
files*

About this endpoint

What it does

Creates a ZIP archive from the uploaded files and returns a signed link to the generated ZIP file.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoName of the ZIP file to generate. Default: output.zip.

Request Body

ParameterTypeMandatoryDescription
filesBinary ArrayYesOne or more uploaded files to include in the ZIP archive. Each item is a binary file.

Response

Returns a JSON object with a data string field containing a signed URI for the generated ZIP file.

ParameterTypeMandatoryDescription
dataStringYesSigned URI pointing to the created ZIP file.

Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.

▣ ENDPOINT 03 / 04
POST
Create ZIP from remote file URLs and stream download
https://api.eu.apyhub.com/apyhub/create-zip/url/download

QUICKSTART

GUIDE

Quickstart

Download files from the URLs you provide and return them as a ZIP archive.

curl -X POST "https://api.eu.apyhub.com/apyhub/create-zip/url/download?output=output.zip" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "urls": [
      "https://assets.apyhub.com/samples/sample.pdf",
      "https://assets.apyhub.com/samples/sample.png"
    ]
  }'

What you'll get back

Returns a binary file response (string with format: binary), not a JSON object.

(binary ZIP file)
TRY ITLIVE · 150 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
urls*

About this endpoint

What it does

Creates a ZIP archive from one or more remote file URLs and streams the archive back in the response.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoName of the generated ZIP file. Default: output.zip.

Request Body

ParameterTypeMandatoryDescription
urlsString ArrayYesOne or more remote file URLs to include in the ZIP. Each item must be a URI. Minimum items: 1.

Response

Returns a binary response stream containing the generated ZIP archive. The output schema is a string with binary format, so the response is the file content itself rather than a JSON object.

▣ ENDPOINT 04 / 04
POST
Create ZIP from remote file URLs and return signed link
https://api.eu.apyhub.com/apyhub/create-zip/url/link

QUICKSTART

GUIDE

Quickstart

Create a ZIP from a list of file URLs by sending the URLs in a JSON body.

curl -X POST "https://api.eu.apyhub.com/apyhub/create-zip/url/link" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"urls":["https://assets.apyhub.com/samples/sample.pdf","https://assets.apyhub.com/samples/sample.png"]}'

What you'll get back

Returns a JSON object with a data string field containing the URL of the generated ZIP file.

{
  "data": "https://storage.example.com/zip/output.zip?sig=abc"
}
TRY ITLIVE · 150 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
urls*

About this endpoint

What it does

Creates a ZIP archive from one or more remote file URLs and returns a signed URL where the generated ZIP can be downloaded.

Request Body

ParameterTypeMandatoryDescription
urlsString ArrayYesOne or more remote file URLs to include in the ZIP. Must be valid URIs. Minimum 1 item.

Response

Returns a JSON object with a data string field containing the signed URL of the created ZIP file.

ParameterTypeMandatoryDescription
dataStringYesSigned URL for downloading the generated ZIP archive. This is a URI.
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.