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

# List Contacts

> Returns contacts from the system that the user has access to



## OpenAPI

````yaml GET /contacts
openapi: 3.0.1
info:
  title: OpenAPI Letterby
  description: API for Letterby
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://letterby.com/api/v4
security:
  - apiKeyAuth: []
paths:
  /contacts:
    get:
      description: Returns contacts from the system that the user has access to
      parameters:
        - name: listId
          in: query
          description: Filter contacts by list ID
          required: true
          schema:
            type: string
        - name: limit
          in: query
          description: 'The maximum number of results to return (default and max: 20000)'
          schema:
            type: integer
            format: int32
        - name: page
          in: query
          description: Page number for pagination
          schema:
            type: integer
            format: int32
        - name: sort
          in: query
          description: Field to sort by (default sorts by points and createdAt)
          schema:
            type: string
            enum:
              - points
              - createdAt
              - email
              - firstName
              - lastName
              - position
        - name: order
          in: query
          description: 'Sort order (default: desc)'
          schema:
            type: string
            enum:
              - asc
              - desc
        - name: email
          in: query
          description: Filter contacts by email (partial match, case-insensitive)
          schema:
            type: string
        - name: firstName
          in: query
          description: Filter contacts by first name (partial match, case-insensitive)
          schema:
            type: string
        - name: lastName
          in: query
          description: Filter contacts by last name (partial match, case-insensitive)
          schema:
            type: string
        - name: phoneNumber
          in: query
          description: Filter contacts by phone number (partial match, case-insensitive)
          schema:
            type: string
        - name: name
          in: query
          description: Filter contacts by full name (partial match, case-insensitive)
          schema:
            type: string
        - name: company
          in: query
          description: Filter contacts by company (partial match, case-insensitive)
          schema:
            type: string
        - name: country
          in: query
          description: Filter contacts by country (partial match, case-insensitive)
          schema:
            type: string
        - name: city
          in: query
          description: Filter contacts by city (partial match, case-insensitive)
          schema:
            type: string
        - name: instagram
          in: query
          description: >-
            Filter contacts by Instagram handle (partial match,
            case-insensitive)
          schema:
            type: string
        - name: twitter
          in: query
          description: Filter contacts by Twitter handle (partial match, case-insensitive)
          schema:
            type: string
        - name: website
          in: query
          description: Filter contacts by website URL (partial match, case-insensitive)
          schema:
            type: string
        - name: isVerified
          in: query
          description: Filter contacts by verification status
          schema:
            type: boolean
        - name: unsubscribed
          in: query
          description: Filter contacts by subscription status
          schema:
            type: boolean
        - name: isGDPR
          in: query
          description: Filter contacts by GDPR consent status
          schema:
            type: boolean
      responses:
        '200':
          description: Contacts response
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      contacts:
                        type: array
                        items:
                          $ref: '#/components/schemas/Contact'
                      pagination:
                        type: object
                        properties:
                          total:
                            type: integer
                            description: Total number of contacts
                          pages:
                            type: integer
                            description: Total number of pages
                          currentPage:
                            type: integer
                            description: Current page number
                          perPage:
                            type: integer
                            description: Number of items per page
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized - Invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Contact:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the contact
        email:
          type: string
          description: Email address of the contact
        firstName:
          type: string
          description: First name of the contact
        lastName:
          type: string
          description: Last name of the contact
        phoneNumber:
          type: string
          description: Phone number of the contact
        createdAt:
          type: string
          format: date-time
          description: When the contact was created
        points:
          type: integer
          description: Points accumulated by the contact
        referrals:
          type: integer
          description: Number of referrals by the contact
        listId:
          type: string
          description: ID of the list this contact belongs to
        isVerified:
          type: boolean
          description: Whether the contact is verified
        unsubscribed:
          type: boolean
          description: Whether the contact has unsubscribed
        data:
          type: object
          description: Custom data associated with the contact
        address:
          type: string
          description: Contact's address
        isGDPR:
          type: boolean
          description: Whether the contact has GDPR consent
        name:
          type: string
          description: Full name of the contact
        instagram:
          type: string
          description: Instagram handle
        twitter:
          type: string
          description: Twitter handle
        website:
          type: string
          description: Personal website URL
        company:
          type: string
          description: Company name
        country:
          type: string
          description: Country of residence
        city:
          type: string
          description: City of residence
        list:
          type: object
          description: Associated list information
          properties:
            id:
              type: string
              description: List ID
            name:
              type: string
              description: List name
            url:
              type: string
              description: List URL identifier
            mode:
              type: string
              description: List mode
            referrals:
              type: boolean
              description: Whether referrals are enabled
            color:
              type: string
              description: List primary color
            title:
              type: string
              description: List title
            desc:
              type: string
              description: List description
        audiences:
          type: array
          description: Audiences this contact belongs to
        referralLink:
          type: string
          description: Contact's referral link
        privateLink:
          type: string
          description: Contact's private subscriber page URL
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: apiKey
      description: API key to authorize requests

````