---
title: "Start an export"
method: POST
path: "/exports"
tags: ["Exports"]
---

# Start an export

`POST /exports`

## Request

- Base URL: `https://api.absentify.com/api/v1`
- URL: `https://api.absentify.com/api/v1/exports`
- Auth: one of:
  - API key in header `X-API-KEY`
  - HTTP bearer

Starts the same export as a custom date range in Settings > Export and answers `202 Accepted`. A period without absences still produces a file. Request the URL in the `Location` header until it stops answering `202`; it then returns the file. Send the key as `X-API-KEY` or as `Authorization: Bearer <key>`. In a Power Automate HTTP action set Authentication to Raw with `Bearer <key>`, because it applies to the polling requests too. A key in the query string is not part of the `Location` URL. Requires an admin and an eligible plan. At most 5 API exports can run per workspace; more answer 429.

## Request body

- object
  - `format` 'EXCEL' | 'PAYROLL_EXCEL' | 'PAYROLL_CSV' | 'LEAVE_BALANCE_EXCEL', required: `EXCEL` is the absence workbook. `PAYROLL_EXCEL` and `PAYROLL_CSV` are the payroll files. `LEAVE_BALANCE_EXCEL` is the leave balances workbook.
  - `start` string, required: Date/time in ISO 8601 format, e.g. `2026-06-01` (interpreted as UTC midnight) or `2026-06-01T09:00:00Z`. Always include a time zone designator (`Z` for UTC) when sending a time of day. Localized formats such as `01.06.2026` or `06/01/2026` are misinterpreted and must not be used. First day of the export. Only the UTC date is used. The range may span at most 1826 days (5 years).
  - `end` string, required: Date/time in ISO 8601 format, e.g. `2026-06-01` (interpreted as UTC midnight) or `2026-06-01T09:00:00Z`. Always include a time zone designator (`Z` for UTC) when sending a time of day. Localized formats such as `01.06.2026` or `06/01/2026` are misinterpreted and must not be used. Last day of the export, inclusive. Only the UTC date is used.
  - `department_id` string: Limit the export to one department. Omit for all departments.
  - `csv_separator` 'comma' | 'semicolon': Only used by `PAYROLL_CSV`.

## Response `202`

Export started. Poll the `Location` URL for the file.

- object
  - `id` string, required
  - `status` 'processing', required

## Other responses

- `400`: Invalid input data
- `401`: Authorization not provided
- `403`: Insufficient access
- `429`: Too many requests, or 5 API exports of the workspace are already running.
- `500`: Internal server error

## Changes

- **2026-10-14** `5563b395f9f8`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/absentify/apis/absentify-crud-api/changes/exports/post.md)

---

[API](https://skmtc.dev/absentify/apis/absentify-crud-api.md) - [All operations](https://skmtc.dev/absentify/apis/absentify-crud-api/llms.txt) - [OpenAPI document](https://skmtc.dev/absentify/apis/absentify-crud-api/revisions/f617e161c057?raw)
