> ## Documentation Index
> Fetch the complete documentation index at: https://api.lancepilot.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Export Contacts

> Download all contacts (optionally filtered by a contact group) as CSV or XLSX.



## OpenAPI

````yaml GET /workspaces/{workspace}/contacts/export
openapi: 3.1.0
info:
  title: Lancepilot API
  description: API for Lancepilot
  version: 1.0.0
  license:
    name: MIT
servers:
  - url: https://lancepilot.com/api/v3
security:
  - bearerAuth: []
paths:
  /workspaces/{workspace}/contacts/export:
    get:
      tags:
        - Contacts
      summary: Download contacts for a workspace
      description: >-
        Download all contacts (optionally filtered by a contact group) as CSV or
        XLSX.
      parameters:
        - name: workspace
          in: path
          description: ID of the workspace.
          required: true
          schema:
            type: string
            format: uuid
        - name: type
          in: query
          description: Export file format. Defaults to XLSX (matches backend).
          required: false
          schema:
            type: string
            enum:
              - xlsx
              - csv
            default: xlsx
          examples:
            xlsx:
              value: xlsx
            csv:
              value: csv
        - name: contact_group
          in: query
          description: Filter by contact group ID. If omitted, all contacts are exported.
          required: false
          schema:
            type: integer
            minimum: 1
          example: 2
      responses:
        '200':
          description: ''
          headers:
            Content-Disposition:
              description: ''
              schema:
                type: string
              examples:
                xlsx:
                  value: attachment; filename="contacts.xlsx"
                csv:
                  value: attachment; filename="contacts.csv"
          content:
            text/xlsx:
              schema:
                type: string
                format: binary
            text/csv:
              schema:
                type: string
                format: binary
        '401':
          $ref: '#/components/responses/401'
components:
  responses:
    '401':
      description: ''
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                example: Unauthenticated.
            required:
              - message
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````