v3

latestOpenAPI 3.0.32026-07-21354289.5 KB
File

createZipJob

Create a background job to ZIP multiple files and send a download link via email.

For bulk downloads of more than 50 files, use this async endpoint instead of client-side zipping. The job will:

  1. Download all requested files from S3
  2. Create a ZIP archive
  3. Upload the ZIP to temporary storage
  4. Send an email notification with the download link

The ZIP file will be available for 7 days.

post/v1/files:zipJob

Request body

OR

Example request

{
  "file_entity_ids": [
    "ef7d985c-2385-44f4-9c71-ae06a52264f8",
    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  ],
  "entity_query": {
    "q": "_schema:file AND _tags:invoice",
    "sort": "_created_at:desc"
  },
  "zip_filename": "Documents.zip",
  "notify_email": "user@example.com"
}

Response

Job created, processing in background

job_idstring uuid

Unique identifier for the ZIP job

status'queued' | 'downloading' | 'zipping' | 'uploading' | 'sending_notification' | 'completed' | 'failed'

Current status of the ZIP job

errorstring

Error message if job failed

created_atstring date-time

When the job was created

created_bystring

User ID who created the job

org_idstring

Organization ID

updated_atstring date-time

When the job was last updated

Example response

{
  "job_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "status": "completed",
  "progress": {
    "total_files": 100,
    "downloaded_files": 75,
    "failed_files": 2
  },
  "result": {
    "file_entity_id": "ef7d985c-2385-44f4-9c71-ae06a52264f8",
    "download_url": "https://epilot-prod-user-content.s3.eu-central-1.amazonaws.com/123/files.zip?X-Amz-...",
    "expires_at": "2024-01-02T12:00:00Z",
    "zip_size_bytes": 104857600
  },
  "error": "Failed to download file: access denied",
  "created_at": "2024-01-01T12:00:00Z",
  "created_by": "10234",
  "org_id": "123",
  "updated_at": "2024-01-01T12:05:00Z"
}