> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anycrm.anyreach.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Export Contacts as CSV

> Stream contacts as a CSV download. Same filters as the list endpoint.

Streams the same filtered set as [List contacts](/api-reference/contacts/list-contacts) (minus `account_id`, and at most 500 rows — see the caveat below) as `text/csv`. The column set is fixed — it does **not** track the raw table 1:1. In particular, several export columns are computed by flattening `capture_payload.enrichment` rather than being raw columns:

| CSV column       | Source                                                                                                                                 |
| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| `company_domain` | `contacts.company_domain`, else `capture_payload.company_domain`, else `capture_payload.enrichment.apollo_organization.primary_domain` |
| `linkedin`       | `contacts.linkedin_url`, else `capture_payload.linkedin`                                                                               |
| `enriched_at`    | `contacts.enriched_at`, else `capture_payload.enriched_at`                                                                             |
| `industry`       | `capture_payload.enrichment.apollo_organization.industry`                                                                              |
| `employees`      | `capture_payload.enrichment.apollo_organization.estimated_num_employees`                                                               |
| `email_verified` | `capture_payload.enrichment.hunter_email.status`                                                                                       |

All other columns are raw contact fields: `id, first_name, last_name, title, company, email, phone, stage, source, tags, notes, owner_id, created_at, updated_at, target_at, lead_at, contact_at, disqualified_at, captured_by_card_id, agent_demo_id, agent_demo_url, agent_demo_phone, converted_to_account_id, converted_to_deal_id, converted_at`. Array/object cells are flattened (`tags` joined with `; `, any nested object JSON-encoded); empty cells are the empty string, not `null`.

Accepts the same filters as [List contacts](/api-reference/contacts/list-contacts), except there's no `account_id` filter here. Free-text `q` matches the same fields (first/last name, email, `title`, `company`, `company_domain`).

<Warning>**This endpoint currently returns at most 500 rows.** The route accepts `limit` up to `10000`, but the underlying query builder re-clamps to `500`, so anything above that has no effect — and the default `limit=5000` is already silently truncated. The CSV carries no truncation indicator: you get a well-formed 500-row file with no way to tell rows were dropped. If your org has more than 500 matching contacts, page through [`GET /contacts`](/api-reference/contacts/list-contacts) with `limit`/`offset` and use the `X-Total-Count` header to know when you've read them all, rather than treating this endpoint's output as a full extract.</Warning>

### Auth

Requires a CRM read [scope](/authentication#scopes) and an active organization on the token. Any of `contacts:read`, `deals:read`, `companies:read`, or `activities:read` qualifies, as does any `*:manage` scope — manage implies read.

### Response

`200` — `text/csv` body with a `Content-Disposition: attachment; filename="contacts-<timestamp>.csv"` header. No JSON envelope.


## OpenAPI

````yaml GET /contacts/export
openapi: 3.1.0
info:
  title: anycrm-api
  version: 0.0.1
servers: []
security: []
tags:
  - name: Customer Intelligence
    description: >-
      Company research and ICP-fit scoring — create a research run, track its
      progress, and read back scored companies as leads.
  - name: Outreach
    description: >-
      The cold-email management console — domains, mailboxes, and campaigns — as
      a thin control plane over the SalesForge stack.
  - name: AnyCard
    description: >-
      Authenticated CRUD for AnyCard, the org's digital business-card /
      lead-capture product.
  - name: AnyCard Events
    description: >-
      Event-attribution analytics for AnyCard — which captured leads converted,
      broken down by source, owner, and deal.
  - name: AnyCard Share Links
    description: >-
      Unauthenticated endpoints reached by anyone who scans a QR code or opens a
      shared AnyCard link.
  - name: AI
    description: >-
      A streaming (SSE) AI chat endpoint with account-commit actions it can take
      on the caller's behalf.
  - name: Analytics Assistant
    description: >-
      The natural-language analytics assistant — a guarded text-to-SQL loop
      (SSE) that answers ad-hoc questions over the org's CRM data as a
      least-privilege, read-only database role.
  - name: Account Readiness
    description: >-
      Account Readiness Profiles — AI-scored signals on whether an account is
      ready for outreach or expansion, computed via a Temporal workflow.
  - name: Integrations
    description: >-
      Pipedream Connect — issuing connect tokens and managing the org's
      connected third-party accounts.
  - name: Feedback
    description: >-
      User-submitted platform feedback (bug reports, feature requests) — global,
      not scoped to one organization.
  - name: Public Media
    description: >-
      Unauthenticated image reads for publicly-embeddable assets (card photos,
      inline email images) — allowlisted by key shape; everything else in the
      storage bucket stays private.
  - name: Service Health
    description: Service liveness.
paths:
  /contacts/export:
    get:
      tags:
        - Contacts
      summary: Export Contacts
      description: Stream contacts as a CSV download. Same filters as the list endpoint.
      operationId: export_contacts_route_contacts_export_get
      parameters:
        - name: stage
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Funnel stage filter: a single value ('contact') or a comma list
              ('target,lead').
            title: Stage
          description: >-
            Funnel stage filter: a single value ('contact') or a comma list
            ('target,lead').
        - name: owner_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter to contacts owned by this Logto user id.
            title: Owner Id
          description: Filter to contacts owned by this Logto user id.
        - name: source
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Filter by origin tag; exact match. Values written by the backend:
              'manual', 'import' (CSV import), 'customer_intel', 'scan_badge',
              'scan_card', 'share_back'.
            title: Source
          description: >-
            Filter by origin tag; exact match. Values written by the backend:
            'manual', 'import' (CSV import), 'customer_intel', 'scan_badge',
            'scan_card', 'share_back'.
        - name: disqualified
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            description: >-
              Filter by disqualification: true for disqualified only, false for
              active only.
            title: Disqualified
          description: >-
            Filter by disqualification: true for disqualified only, false for
            active only.
        - name: q
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Free-text search across first/last name, email, title, company,
              and company domain.
            title: Q
          description: >-
            Free-text search across first/last name, email, title, company, and
            company domain.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            description: >-
              Requested row count. Accepted up to 10000, but the export
              currently returns at most 500 rows — larger values (including the
              5000 default) have no effect and the CSV is truncated with no
              indicator. Page GET /contacts with limit/offset and X-Total-Count
              for a full extract.
            default: 5000
            title: Limit
          description: >-
            Requested row count. Accepted up to 10000, but the export currently
            returns at most 500 rows — larger values (including the 5000
            default) have no effect and the CSV is truncated with no indicator.
            Page GET /contacts with limit/offset and X-Total-Count for a full
            extract.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````