---
title: "Request a CSV export, generated in the background. Also needs the dataset's read scope"
method: POST
path: "/api/v1/exports"
---

# Request a CSV export, generated in the background. Also needs the dataset's read scope

`POST /api/v1/exports`

## Request

- Base URL: `http://127.0.0.1:4310`
- URL: `http://127.0.0.1:4310/api/v1/exports`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `sfb_session`

## Request body

- object
  - `dataset` 'clients' | 'appointments' | 'payments' | 'services' | 'product_purchases' | 'audit', required
  - `from` string, date
  - `to` string, date
  - `location_id` string
  - `staff_id` string
  - `expires_hours` integer
  - `idempotency_key` string

## Response `201`

OK

- object

## Other responses

- `400`: Validation error
- `401`: Unauthenticated
- `403`: Forbidden
- `404`: Not found
- `409`: Conflict or invalid state

---

[API](https://skmtc.dev/scalingfirm/apis/tsf-booking-api.md) · [All operations](https://skmtc.dev/scalingfirm/apis/tsf-booking-api/llms.txt) · [OpenAPI document](https://skmtc.dev/scalingfirm/apis/tsf-booking-api/revisions/81704199cd37?raw)
