---
title: "Export a form's submissions as CSV"
method: GET
path: "/api/v1/sites/{slug}/form-submissions/export.csv"
tags: ["Forms"]
---

# Export a form's submissions as CSV

`GET /api/v1/sites/{slug}/form-submissions/export.csv`

## Request

- Base URL: `https://api.dotsy.ai`
- URL: `https://api.dotsy.ai/api/v1/sites/{slug}/form-submissions/export.csv`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Returns the submissions of one form as a CSV file (`text/csv`), one row per submission. The columns are `id`, `formId`, `pagePath`, `replyTo` and `createdAt` (Unix ms), then one column per field name the form has collected, in alphabetical order. Cells are quoted as RFC 4180 describes and rows end with CRLF.

An export holds at most 2,000 submissions. When it hits that limit the response carries `x-form-export-truncated: true`; narrow it with `fromMs`, `toMs`, and `q` and export again. `form` is required. Optional `q` uses the same search contract as the list endpoint. Submissions hold visitors' personal data, so this needs at least the `editor` role on the site. A `viewer` gets `403` `forbidden_role`.

## Path parameters

- `slug` string, required

## Query parameters

- `form` string, required
- `fromMs` integer
- `toMs` integer
- `q` string

## Response `200`

The CSV file.

## Other responses

- `400`: `form` is missing (`missing_form`).
- `401`: Missing or invalid credentials.
- `403`: The caller's role can't read submissions (`forbidden_role`), or the site's storage can't hold them (`backend_required`, which has `code` and `message` instead of `error`).
- `404`: No such site, or it is not visible to this account.

---

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