# Export connection attempts as CSV

> Export connection attempts as CSV: CustomDomain™ API reference in the analytics group. Covers request parameters, the request body, responses and error codes.

Source: https://docs.customdomain.ai/docs/api-reference/analytics/exportAttempts

## `GET https://api.customdomain.ai/v1/attempts:export`

The rows `GET /attempts` would list for the same filters, newest first, as one CSV file. The range is at most 31 days (default: the last 31 days). A workspace may export six times an hour. A range with more than 100,000 rows, or a file over 20 MB, answers 413: narrow the range. A cell that starts with `=`, `+`, `-`, `@`, a tab or a carriage return is written with a leading apostrophe. API key; any member role.

### Authentication

`apiKey`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `from` | query | string | no | Only attempts at or after this time (RFC 3339). Defaults to 31 days before `to`. |
| `to` | query | string | no | Only attempts before this time (RFC 3339). Defaults to now. |
| `outcome` | query | `connected`, `needs_attention`, `failed` | no | Keep only this result. `result` is the same filter. |
| `format` | query | `csv` | no |  |
| `app_id` | query | string | no |  |
| `provider` | query | string | no | Keep only attempts on this provider. |
| `end_user_ref` | query | string | no | Keep only attempts by this end user id. |
| `q` | query | string | no | Keep only domains that start with this text. |
| `sandbox` | query | boolean | no | Read Sandbox attempts (`true`) or live ones (`false`). |

### Responses

| Status | Description |
| --- | --- |
| `200` | The CSV file |
| `400` | Error envelope: {code, title, details, request_id}. |
| `401` | Error envelope: {code, title, details, request_id}. |
| `403` | Error envelope: {code, title, details, request_id}. |
| `404` | Error envelope: {code, title, details, request_id}. |
| `413` | Error envelope: {code, title, details, request_id}. |
| `429` | Error envelope: {code, title, details, request_id}. |

The full specification is served at `GET https://api.customdomain.ai/v1/openapi.json`.
