---
title: "Submit a background export of several companies"
method: POST
path: "/api/v1/exports"
tags: ["Export"]
---

# Submit a background export of several companies

`POST /api/v1/exports`

## Request

- Base URL: `https://api.hub-equity.com`
- URL: `https://api.hub-equity.com/api/v1/exports`
- Auth: HTTP bearer

Builds ONE zip archive holding one XLSX workbook per company (the same workbook `GET /entities/{id}/export` streams) plus a README naming any company that could not be exported. Up to 100 companies per job, 3 jobs in progress and 20 archives or 2 GB held per workspace (409 `EXPORT_QUOTA` beyond). The archive lands in the workspace's deliverables zone and expires after 7 days. Requires the `export.bulk` scope, which the Team and Enterprise plans open (401 anonymous, 403 `SCOPE_MISSING` on any other plan). Poll `GET /exports/{id}` until `status` is `ready`, then call `GET /exports/{id}/download`: it redirects (307) to a signed URL valid 10 minutes. API clients must follow the redirect.

## Request body

- CreateExportRequest
  - `entity_ids` string[], required: Companies to export, 1 to 100: UUIDs, tickers or `TICKER.MIC` (as `GET /entities/{id}`). Duplicates are dropped.
  - `years` integer: Fiscal years per company, 99 for every year we hold.
  - `category` string: One of all, balance_sheet, cash_flow, income_statement, ratio.
  - `xbrl` 'none' | 'core' | 'calculation' | 'full': XBRL linkbase sheets to embed in each workbook, as `GET /entities/{id}/export`.

## Response `202`

Job accepted; `data.status` is `pending`

- ApiResponseExportJobResponse
  - `success` boolean, required
  - `data` ExportJobResponse: A background export as the API serves it. Only what the row carries.
    - `id` string, required
    - `status` 'pending' | 'running' | 'ready' | 'failed', required
    - `filename` string, required
    - `description` string, nullable
    - `size_bytes` integer
    - `error` string, nullable: Why the job failed, when it did
    - `created_at` string, nullable
    - `expires_at` string, nullable: The archive is deleted after this instant (7 days)
    - `download_url` string, nullable: Set once status is `ready`: redirects to a signed URL valid 10 minutes
  - `error` ApiError: API error details.
    - `code` string, required
    - `message` string, required
    - `details` object, nullable
  - `meta` ApiMeta: API response metadata. Pagination fields (``page`` / ``per_page`` / ``total``) are populated on collection endpoints only. They are omitted from the payload on single-resource endpoints.
    - `timestamp` string, date-time
    - `request_id` string, nullable
    - `page` integer, nullable
    - `per_page` integer, nullable
    - `total` integer, nullable
  - `links` ApiLinks: HATEOAS-style pagination cursors. Host-relative path + query links for a collection page. Present on collection endpoints, ``null`` fields where a page doesn't exist (``next`` on the last page, ``prev`` on the first). The whole ``links`` object is omitted from single-resource responses (see ``ApiResponse`` serializer).
    - `self` string, nullable
    - `first` string, nullable
    - `prev` string, nullable
    - `next` string, nullable
    - `last` string, nullable

## Other responses

- `403`: The workspace's plan does not include background exports
- `404`: A company is unknown (or not visible to this workspace)
- `409`: Ambiguous ticker, or the workspace already has 3 jobs in progress
- `422`: Validation Error
- `503`: The export zone cannot be written; try again later

---

[API](https://skmtc.dev/hub-equity/apis/hub-equity-api.md) · [All operations](https://skmtc.dev/hub-equity/apis/hub-equity-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hub-equity/apis/hub-equity-api/revisions/e8eeda5dc13e?raw)
