---
title: "Export Leads"
method: POST
path: "/api/v1/leads/export"
tags: ["leads", "leads"]
---

# Export Leads

`POST /api/v1/leads/export`

## Request

- Base URL: `https://app.goodleads.club` (the document declares no server; this is the origin it was published from)
- URL: `https://app.goodleads.club/api/v1/leads/export`
- Auth: API key in header `X-API-Key`

Export selected leads as CSV or JSON, uploaded to S3 (or local tmp/ in dev).

Accepts the admin key OR the read-only key — an export is the same
full-fidelity read the read-only key already has, materialized as a file.
Outward dispatch (`to_email`) stays admin-only.

Returns a presigned URL valid for 72 hours. Optionally emails the link
via SES if to_email is provided (admin key required).

Provide entity_ids for specific leads, or set include_all_matching=True
(optionally with state + filters) to export all matching leads. Omitting
state exports the matching cohort across every live state, same as an
"All States" Browse.

## Request body

- ExportRequest
  - `state` string, nullable
  - `entity_ids` string[], nullable
  - `include_all_matching` boolean
  - `filters` object[]
  - `format` 'csv' | 'json' | 'xlsx'
  - `to_email` string, nullable
  - `include_non_operating` boolean
  - `include_existing` boolean
  - `include_registrations` boolean
  - `audience` 'customer' | 'design_partner' | 'data_partner'
  - `licensed_to` string, nullable
  - `cohort_note` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/goodleads/apis/formation-gtm-api.md) · [All operations](https://skmtc.dev/goodleads/apis/formation-gtm-api/llms.txt) · [OpenAPI document](https://skmtc.dev/goodleads/apis/formation-gtm-api/revisions/2068d13a82cf?raw)
