---
title: "Create export"
method: POST
path: "/v1/exports"
tags: ["Exports"]
---

# Create export

`POST /v1/exports`

Prepare an export of a given type for download. You can check the export readiness status using the GET endpoint. Once the export is ready, download the export using the download endpoint.

## Request body

- CreateExport
  - `name` 'aged_balances' | 'outstanding_invoices' | 'all_subscriptions' | 'revenue_per_product' | 'revenue_per_line_item_name' | 'revenue_per_country' | 'revenue_per_plan' | 'all_customers' | 'detailed_revenue' | 'line_by_line_revenue' | 'draft_invoices' | 'open_invoices' | 'live_subscriptions' | 'renewals' | 'credit_balances', required — Export name. - `aged_balances`: List of balances at 30, 60, and 90+ days for all customers. - `all_customers`: List of all customers. - `outstanding_invoices`: List of all outstanding invoices. - `all_subscriptions`: List of all active, pending or cancelled subscriptions. - `revenue_per_product`: Revenue per product month over month. - `detailed_revenue`: Booked revenue (outstanding and paid) split per customer and product, month over month. - `revenue_per_line_item_name`: Revenue per invoice line item month over month, grouped by name given on invoice or subscription. - `revenue_per_country`: Revenue, tax and invoice number per country. - `revenue_per_plan`: Revenue per plan month over month. - `line_by_line_revenue`: All invoice line items in chronological order, with product and customer information. - `draft_invoices`: Export all draft invoices, with customer and product information. - `open_invoices`: Export all open invoices, with customer and product information. - `live_subscriptions`: List of all active subscriptions line by line. - `credit_balances`: Monthly credit balance roll-forward per customer and credit type (opening, top-ups, consumption, expiry, closing).
  - `file_type` 'csv' | 'xlsx' | 'json', required — Export file type. - `csv`: The export will be generated in CSV format. - `xlsx`: The export will be generated in XLSX format. - `json`: The export will be generated in JSON format.

## Response `201`

- Export
  - `name` 'aged_balances' | 'outstanding_invoices' | 'all_subscriptions' | 'revenue_per_product' | 'revenue_per_line_item_name' | 'revenue_per_country' | 'revenue_per_plan' | 'all_customers' | 'detailed_revenue' | 'line_by_line_revenue' | 'draft_invoices' | 'open_invoices' | 'live_subscriptions' | 'renewals' | 'credit_balances', required — Export name. - `aged_balances`: List of balances at 30, 60, and 90+ days for all customers. - `all_customers`: List of all customers. - `outstanding_invoices`: List of all outstanding invoices. - `all_subscriptions`: List of all active, pending or cancelled subscriptions. - `revenue_per_product`: Revenue per product month over month. - `detailed_revenue`: Booked revenue (outstanding and paid) split per customer and product, month over month. - `revenue_per_line_item_name`: Revenue per invoice line item month over month, grouped by name given on invoice or subscription. - `revenue_per_country`: Revenue, tax and invoice number per country. - `revenue_per_plan`: Revenue per plan month over month. - `line_by_line_revenue`: All invoice line items in chronological order, with product and customer information. - `draft_invoices`: Export all draft invoices, with customer and product information. - `open_invoices`: Export all open invoices, with customer and product information. - `live_subscriptions`: List of all active subscriptions line by line. - `credit_balances`: Monthly credit balance roll-forward per customer and credit type (opening, top-ups, consumption, expiry, closing).
  - `file_type` 'csv' | 'xlsx' | 'json', required — Export file type. - `csv`: The export will be generated in CSV format. - `xlsx`: The export will be generated in XLSX format. - `json`: The export will be generated in JSON format.
  - `id` string, required — Export ID.
  - `status` 'pending' | 'processing' | 'done' | 'error', required — Export status. - `pending`: The export is pending and has not started processing yet. - `processing`: The export is currently being generated. - `done`: The export has been successfully generated. - `errored`: An error occurred during the export generation.
  - `created_at` string, date, nullable, required — Export creation date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
  - `updated_at` string, date, nullable, required — Export last edition date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.

---

[API](https://skmtc.dev/hyperline/apis/hyperline-api.md) · [All operations](https://skmtc.dev/hyperline/apis/hyperline-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/hyperline/hyperline-api/revisions/19fa5f22e39b/schema)
