apyhub
FILE MANIPULATION · FILE SECURITY

Generate Secure Archives API

Hosted on ApyHub

What it does

Password Protected ZIP lets you bundle files into an encrypted ZIP archive from either uploaded files or remote URLs. Send one or more files or urls plus a password, and get back either a binary ZIP download or a signed data link to the finished archive.

Use the /file/download and /url/download endpoints when you want the archive streamed directly to the client. Use /file/link or /url/link when your workflow prefers a signed download URL instead of a binary response. The URL-based endpoints accept an array of remote file URLs and a password; the file-based endpoints accept an array of binary file uploads and a password.

This is useful when you need to package invoices, reports, exports, or attachments with access control before sharing them with customers or internal teams. You can generate the archive on demand without storing a plain, unprotected ZIP in your own application.

Password Protected ZIP keeps the response simple: either a streamed ZIP file or a single download URL. That makes it easy to drop into file delivery flows, admin tools, or automated export jobs.

▣ ENDPOINT 01 / 04
POST
Create password-protected ZIP from remote URLs and stream download
http://localhost:8080/apyhub/create-password-protected-zip/url/download
QUICKSTARTGUIDE

Quickstart

Create a password-protected ZIP from a list of file URLs.

curl -X POST "http://localhost:8080/apyhub/create-password-protected-zip/url/download" \
  -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"
    ],
    "password": "secret123"
  }'

What you'll get back

Returns a binary file containing the generated ZIP archive.

TRY ITLIVE · 200 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 password-protected ZIP archive from one or more remote file URLs and streams the archive back in the response. The request body supplies the source URLs and the ZIP password.

Request Body

ParameterTypeMandatoryDescription
urlsString ArrayYesOne or more remote file URLs to include in the ZIP. Each item must be a URI.
passwordStringYesPassword to apply to the generated ZIP archive.

Response

Returns a binary response body containing the generated ZIP file.

Body

Name
Type
Description
bodyREQUIRED
any
▣ ENDPOINT 02 / 04
POST
Create password-protected ZIP from remote URLs and return signed link
http://localhost:8080/apyhub/create-password-protected-zip/url/link
QUICKSTARTGUIDE

Quickstart

Create a password-protected ZIP from the URLs you send in the request body.

curl -X POST "http://localhost:8080/apyhub/create-password-protected-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"
    ],
    "password": "secret123"
  }'

What you'll get back

Returns a JSON object with a data string containing the download URL for the generated ZIP archive.

{
  "data": "https://storage.example.com/zip/output.zip?sig=abc"
}
TRY ITLIVE · 200 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 password-protected ZIP archive from one or more remote file URLs and returns a signed link to the generated ZIP.

Request Body

ParameterTypeMandatoryDescription
urlsString ArrayYesRemote file URLs to include in the ZIP. Must contain at least 1 item; each item must be a valid URI.
passwordStringYesPassword used to protect the generated ZIP archive.

Response

Returns a JSON object with a data string field containing a URI to the generated ZIP file. This is the signed download link for the output archive.

ParameterTypeMandatoryDescription
dataStringYesSigned URI for the generated ZIP file.

Body

Name
Type
Description
bodyREQUIRED
any
▣ ENDPOINT 03 / 04
POST
Create password-protected ZIP from uploaded files and stream download
http://localhost:8080/apyhub/create-password-protected-zip/file/download
QUICKSTARTGUIDE

Quickstart

Upload one or more files and set a password to generate a password-protected ZIP archive.

curl -X POST "http://localhost:8080/apyhub/create-password-protected-zip/file/download" \
  -H "apy-token: $APY_TOKEN" \
  -F "files=@/path/to/file1.txt" \
  -F "files=@/path/to/file2.pdf" \
  -F "password=secret123"

What you'll get back

Returns a binary file which is the generated ZIP archive.

TRY ITLIVE · 200 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 password-protected ZIP archive from the uploaded files and streams the resulting ZIP file back in the response.

Query Parameter(s)

AttributeTypeMandatoryDescription
outputStringNoOutput filename for the generated ZIP file. Default: output.zip.

Request Body

ParameterTypeMandatoryDescription
filesString ArrayYesOne or more files to include in the archive. Each item is a binary file upload.
passwordStringYesPassword to apply to the ZIP archive. Format: password.

Response

Returns a binary file stream containing the generated ZIP archive.

Query parameters

Name
Type
Description
outputOPTIONAL
string
DEFAULT output.zip

Body

Name
Type
Description
bodyREQUIRED
object

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

▣ ENDPOINT 04 / 04
POST
Create password-protected ZIP from uploaded files and return signed link
http://localhost:8080/apyhub/create-password-protected-zip/file/link
QUICKSTARTGUIDE

Quickstart

Upload one or more files and a password to generate a password-protected ZIP from file links.

curl -X POST "http://localhost:8080/apyhub/create-password-protected-zip/file/link" \
  -H "apy-token: $APY_TOKEN" \
  -F "files=@/path/to/file1.pdf" \
  -F "password=secret123"

What you'll get back

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

{
  "data": "https://storage.example.com/zip/output.zip?sig=abc"
}
TRY ITLIVE · 200 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 password-protected ZIP archive from uploaded files and returns a signed URI to the generated ZIP file.

Request Body

ParameterTypeMandatoryDescription
filesString ArrayYesUploaded files to include in the ZIP archive. Each item is a binary file.
passwordStringYesPassword to apply to the ZIP archive. Format: password.

Response

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

ParameterTypeMandatoryDescription
dataStringYesSigned URI of the generated ZIP file. Format: URI.

Body

Name
Type
Description
bodyREQUIRED
object

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

▣ 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.