# Exports

> CSV exports made in the background

Source: https://rcms-tickets-test.web.app/docs/reference/exports

Every operation below is also in [the OpenAPI document](https://rcms-tickets-test.web.app/v1/openapi.yaml). One that names an MCP tool can be called through [the MCP server](https://rcms-tickets-test.web.app/docs/mcp.md); one that names none cannot.

## List exports

`GET /v1/exports`

Operation id `listExports`. MCP tool `list_exports`. SDK `tickets.exports.list`.

CSV exports made so far, newest first, each with what it was asked for and a fresh download link while ready.

**Who may call it.** Any one of: An API key with scope `full`. Any other scope answers `insufficient_scope`; A signed-in dashboard member whose role has `exports.personal` (owner, admin).

| Parameter | In | Type | Description |
| --- | --- | --- | --- |
| `limit` | query | integer | How many to return, 1 to 100 (default 20). |
| `starting_after` | query | string | An id from the page before: the page after it. |
| `ending_before` | query | string | An id from the page after: the page before it. A list read from the database offers it as the list comes and filtered by event alone, in the default order, and answers parameter_invalid to any other… |
| `kind` | query | "attendees" \| "orders" \| "payments" \| "contacts" \| "settlement" |  |
| `event` | query | string | An id starting with evt_. |
| `created_gte` | query | string (date-time) | Only those created at or after this instant. |
| `created_lt` | query | string (date-time) | Only those created before this instant. |

**Answers 200.** A page of exports, each with what it was asked for (ready ones with a fresh link).

**Fields**

| Field | Type | Description |
| --- | --- | --- |
| `object` * | "list" |  |
| `data` * | array of Export | This page, newest first. |
| `has_more` * | boolean | True when there is another page: pass the last id of `data` as starting_after, or the last id of `unreadable` when `data` is empty. |
| `url` * | "/v1/exports" | The path this list came from (/v1/exports). |
| `unreadable` | array of object | Rows of this page the service could not read, in place of showing them: they exist and are kept, so a page without them is not the whole list. Absent when there are none. A page names at most 25; past that it stops and… |

\* required

## Make a CSV export

`POST /v1/exports`

Operation id `createExport`. MCP tool `create_export`. SDK `tickets.exports.create`.

Starts a CSV export in the background (attendees, orders, payments, contacts or settlement). It answers 202 with an export you poll at `GET /v1/exports/{id}` until `status` is `ready`. `from` and `to` narrow it on a date that depends on the kind: when the order was made (orders), when the money moved (payments, settlement), when the ticket was issued (attendees), when the person said yes (contacts). Personal data, so it needs `exports.personal`.

**Who may call it.** Any one of: An API key with scope `full`. Any other scope answers `insufficient_scope`; A signed-in dashboard member whose role has `exports.personal` (owner, admin).

**Request body** (`CreateExportInput`)

| Field | Type | Description |
| --- | --- | --- |
| `kind` * | "attendees" \| "orders" \| "payments" \| "contacts" \| "settlement" | attendees; orders; payments (gross, fees, tax, refunds, code, source: for the accountant); contacts (opted-in only, with consent evidence); settlement (the settlement statement of one event or one series: money by order… |
| `event` | string | An id starting with evt_. |
| `series` | string | settlement only: every event with this series tag. |
| `from` | string (date-time) | Inclusive. On: orders, when made; payments and settlement, when money moved; attendees, when issued; contacts, when they said yes. |
| `to` | string (date-time) | Not included. The same date as `from`. |
| `channel` | "email" \| "sms" | contacts: one channel. |

\* required

```json
{
  "kind": "contacts",
  "channel": "sms",
  "event": "evt_yrd2027"
}
```

**Answers 202.** Being made.

**Fields** (`Export`)

| Field | Type | Description |
| --- | --- | --- |
| `object` * | "export" |  |
| `id` * | string | An id starting with exp_. |
| `mode` * | Mode | test or live, decided by the key (rt_test_… or rt_live_…). Test and live data never mix. |
| `kind` * | "attendees" \| "orders" \| "payments" \| "contacts" \| "settlement" |  |
| `event` * | string \| null | The event asked for (null: all). |
| `series` | string \| null | settlement: the series asked for (absent or null otherwise). |
| `from` * | string \| null | An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC. |
| `to` * | string \| null | An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC. |
| `channel` * | "email" \| "sms" \| null | contacts: the channel asked for. |
| `status` * | "pending" \| "ready" \| "failed" |  |
| `failure` | string \| null | failed, when the service could say why. |
| `row_count` * | integer \| null |  |
| `left_out_no_words` | integer | contacts: people left out because they said yes on an event with no consent words (`consent_texts`) for this channel, so nothing they agreed to is on record. Absent on other kinds. |
| `url` * | string \| null | When ready: a CSV link that works for 15 minutes (retrieve again for a fresh one). |
| `url_expires_at` * | string \| null | An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC. |
| `created_by` * | Actor | Who made a change. |
| `created_at` * | string (date-time) | An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC. |

\* required

## Retrieve an export (and a fresh link)

`GET /v1/exports/{id}`

Operation id `getExport`. MCP tool `get_export`. SDK `tickets.exports.retrieve`.

One export with its status. Once `ready` it carries a fresh download link, so a link never has to be kept.

**Who may call it.** Any one of: An API key with scope `full`. Any other scope answers `insufficient_scope`; A signed-in dashboard member whose role has `exports.personal` (owner, admin).

| Parameter | In | Type | Description |
| --- | --- | --- | --- |
| `id` * | path | string | An id starting with exp_. |

**Answers 200.** The export.

**Fields** (`Export`)

| Field | Type | Description |
| --- | --- | --- |
| `object` * | "export" |  |
| `id` * | string | An id starting with exp_. |
| `mode` * | Mode | test or live, decided by the key (rt_test_… or rt_live_…). Test and live data never mix. |
| `kind` * | "attendees" \| "orders" \| "payments" \| "contacts" \| "settlement" |  |
| `event` * | string \| null | The event asked for (null: all). |
| `series` | string \| null | settlement: the series asked for (absent or null otherwise). |
| `from` * | string \| null | An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC. |
| `to` * | string \| null | An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC. |
| `channel` * | "email" \| "sms" \| null | contacts: the channel asked for. |
| `status` * | "pending" \| "ready" \| "failed" |  |
| `failure` | string \| null | failed, when the service could say why. |
| `row_count` * | integer \| null |  |
| `left_out_no_words` | integer | contacts: people left out because they said yes on an event with no consent words (`consent_texts`) for this channel, so nothing they agreed to is on record. Absent on other kinds. |
| `url` * | string \| null | When ready: a CSV link that works for 15 minutes (retrieve again for a fresh one). |
| `url_expires_at` * | string \| null | An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC. |
| `created_by` * | Actor | Who made a change. |
| `created_at` * | string (date-time) | An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC. |

\* required
