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

# Get contacts

> This endpoint retrieves a list of **Contacts**. You can filter contacts by various criteria, such as tags, phone numbers, and more. Use the query parameters to narrow down your results.



## OpenAPI

````yaml get /contact
openapi: 3.0.0
info:
  title: Thoughtly API
  version: 1.0.0
  contact:
    name: Thoughtly Support
    email: support@thoughtly.com
    url: https://thoughtly.com
servers:
  - url: https://api.thoughtly.com
    description: Production server
security:
  - ApiKeyAuth: []
    TeamIdAuth: []
paths:
  /contact:
    get:
      tags:
        - contact
      summary: Get contacts
      description: >-
        This endpoint retrieves a list of **Contacts**. You can filter contacts
        by various criteria, such as tags, phone numbers, and more. Use the
        query parameters to narrow down your results.
      parameters:
        - name: search
          in: query
          schema:
            type: string
          description: >-
            Search term to filter contacts by name, phone number, or other
            attributes.
        - name: phone_numbers_only
          in: query
          schema:
            type: boolean
          description: Filter results to show only contacts with phone numbers.
        - name: tags
          in: query
          schema:
            type: array
            items:
              type: string
          style: form
          explode: true
          description: >-
            Filter results by tags associated with the contacts. You can specify
            multiple tags.
        - name: excluded_tags
          in: query
          schema:
            type: array
            items:
              type: string
          style: form
          explode: true
          description: Exclude contacts that have these tags.
        - name: sort
          in: query
          schema:
            type: string
          description: >-
            Sort the contacts based on a specific field, such as name or
            creation date.
        - name: sortDirection
          in: query
          schema:
            type: string
            enum:
              - asc
              - desc
          description: >-
            Specify the sort direction. Choose either ascending ('asc') or
            descending ('desc').
        - name: page
          in: query
          schema:
            type: integer
            minimum: 0
          description: Specify the page of results to retrieve (pagination).
        - name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 50
            default: 20
          description: >-
            Specify the maximum number of contacts to return per page
            (pagination). The default is 20.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericResponse'
components:
  schemas:
    GenericResponse:
      type: object
      properties:
        error:
          type: object
          nullable: true
          description: >-
            An object containing error details, if any. This field will be
            populated if the API request fails or encounters an error. If the
            request is successful, this field will be null or omitted.
        data:
          type: object
          additionalProperties: true
          description: >-
            Contains the response data for the successful request. This field
            will vary based on the specific API endpoint being called and
            contains the main data returned from the API. For example, it may
            include information about a created contact, agent, or webhook
            subscription.
      required:
        - data
      description: >-
        The generic response format for all API requests. This structure ensures
        consistency in how success and error information is returned to the
        caller.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-token
      description: >-
        API key for the user making the request. This can be found via the
        [Developer Settings](https://app.thoughtly.com/settings/developer) page
        in the dashboard.
    TeamIdAuth:
      type: apiKey
      in: header
      name: team_id
      description: >-
        Team identifier, used to scope requests to a specific team. This can be
        found via the [Developer
        Settings](https://app.thoughtly.com/settings/developer) page in the
        dashboard.

````