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

# List Contacts

> List contacts, newest conversation first by default, with the total count of matches alongside the page. Page through results with `pagination_key`; `skip` is available for offset-style paging but is slower on large contact sets and can repeat or miss rows as contacts are updated.



## OpenAPI

````yaml openapi-final post /list-contacts
openapi: 3.0.3
info:
  title: Retell SDK
  version: 3.0.0
  x-retell-spec-revision: 2026-08-22-7679759
  contact:
    name: Retell Support
    url: https://www.retellai.com/
    email: support@retellai.com
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://api.retellai.com
    description: The production server.
security:
  - api_key: []
paths:
  /list-contacts:
    post:
      description: >-
        List contacts, newest conversation first by default, with the total
        count of matches alongside the page. Page through results with
        `pagination_key`; `skip` is available for offset-style paging but is
        slower on large contact sets and can repeat or miss rows as contacts are
        updated.
      operationId: listContacts
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListContactsRequest'
      responses:
        '200':
          description: Paginated list of contacts.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContactListResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Retell from 'retell-sdk';

            const client = new Retell({
              apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted
            });

            const contacts = await client.contact.list();

            console.log(contacts.has_more);
        - lang: Python
          source: |-
            import os
            from retell import Retell

            client = Retell(
                api_key=os.environ.get("RETELL_API_KEY"),  # This is the default and can be omitted
            )
            contacts = client.contact.list()
            print(contacts.has_more)
components:
  schemas:
    ListContactsRequest:
      type: object
      properties:
        limit:
          type: number
          minimum: 1
          maximum: 1000
          default: 50
          description: Maximum number of contacts to return.
        skip:
          type: number
          minimum: 0
          default: 0
          description: Number of records to skip for offset-based pagination.
        sort_order:
          type: string
          enum:
            - asc
            - desc
          default: desc
          description: >
            Sort contacts by `last_conversation_timestamp` in ascending or
            descending order. Contacts that have never been contacted sort as if
            their timestamp were 0.
        pagination_key:
          type: string
          description: Base64url-encoded pagination key from a previous response.
        filter_criteria:
          $ref: '#/components/schemas/ContactFilter'
        search_query:
          type: string
          description: >
            Case-insensitive substring match against phone number, first name,
            last name, external ID, and custom field values. This is the only
            way to match on a contact's name.
    ContactListResponse:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/Contact'
        pagination_key:
          type: string
          description: Base64url-encoded pagination key for the next page.
        has_more:
          type: boolean
        total:
          type: number
          description: Total count of contacts matching the filter.
    ContactFilter:
      type: object
      description: >-
        Filter criteria for contacts. All conditions are implicitly connected
        with AND. first_name and last_name are not filterable here; use
        search_query to match on those.
      properties:
        contact_id:
          $ref: '#/components/schemas/StringFilter'
        phone_number:
          $ref: '#/components/schemas/StringFilter'
          description: >-
            Filter by phone number. Stored in E.164, so an `eq` filter needs the
            full number.
        external_id:
          oneOf:
            - $ref: '#/components/schemas/StringFilter'
            - $ref: '#/components/schemas/PresentFilter'
          description: >-
            Filter by the record id in the connected CRM. Use a `present` filter
            to separate synced from unsynced contacts.
        do_not_call:
          $ref: '#/components/schemas/BooleanFilter'
          description: Filter by whether the contact is marked do-not-call.
        last_conversation_timestamp:
          oneOf:
            - $ref: '#/components/schemas/NumberFilter'
            - $ref: '#/components/schemas/RangeFilter'
          description: >-
            Filter by when the contact was last spoken to, in epoch
            milliseconds.
        custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomFieldFilter'
          description: Filter by custom contact fields defined in CRM config.
    Contact:
      type: object
      properties:
        contact_id:
          type: string
          description: Unique identifier for the contact.
        org_id:
          type: string
          description: Organization this contact belongs to.
        phone_number:
          type: string
          description: Phone number of the contact.
        first_name:
          type: string
          description: First name of the contact.
        last_name:
          type: string
          description: Last name of the contact.
        do_not_call:
          type: boolean
          description: Whether this contact should not be called.
        external_id:
          type: string
          description: CRM record ID from the external provider.
        custom_fields:
          type: object
          description: Custom fields defined in CRM config.
        conversation_count:
          type: number
          description: >-
            Number of conversations (calls and chats) associated with this
            contact.
        last_conversation_timestamp:
          type: number
          description: >-
            Epoch milliseconds of the most recent conversation with this
            contact.
        created_timestamp:
          type: number
          description: Epoch milliseconds when the contact was created.
        user_modified_timestamp:
          type: number
          description: Epoch milliseconds when the contact was last modified.
      required:
        - contact_id
        - org_id
        - phone_number
        - created_timestamp
    StringFilter:
      type: object
      required:
        - type
        - op
        - value
      properties:
        type:
          type: string
          enum:
            - string
        op:
          type: string
          enum:
            - eq
            - ne
            - sw
            - ew
            - co
          description: >-
            eq: equal, ne: not equal, sw: starts with, ew: ends with, co:
            contains
        value:
          type: string
    PresentFilter:
      type: object
      required:
        - type
        - op
      properties:
        type:
          type: string
          enum:
            - present
        op:
          type: string
          enum:
            - pr
            - np
          description: 'pr: present (has value), np: not present'
    BooleanFilter:
      type: object
      required:
        - type
        - op
        - value
      properties:
        type:
          type: string
          enum:
            - boolean
        op:
          type: string
          enum:
            - eq
        value:
          type: boolean
    NumberFilter:
      type: object
      required:
        - type
        - op
        - value
      properties:
        type:
          type: string
          enum:
            - number
        op:
          type: string
          enum:
            - eq
            - ne
            - gt
            - ge
            - lt
            - le
          description: >-
            eq: equal, ne: not equal, gt: greater than, ge: greater than or
            equal, lt: less than, le: less than or equal
        value:
          type: number
    RangeFilter:
      type: object
      required:
        - type
        - op
        - value
      properties:
        type:
          type: string
          enum:
            - range
        op:
          type: string
          enum:
            - bt
          description: 'bt: between'
        value:
          type: array
          minItems: 2
          maxItems: 2
          items:
            type: number
          description: '[lower_bound, upper_bound]'
    CustomFieldFilter:
      description: A filter on a custom field, identified by key.
      allOf:
        - $ref: '#/components/schemas/ValueFilter'
        - type: object
          required:
            - key
          properties:
            key:
              type: string
              description: The field name to filter on.
    ValueFilter:
      oneOf:
        - $ref: '#/components/schemas/StringFilter'
        - $ref: '#/components/schemas/NumberFilter'
        - $ref: '#/components/schemas/BooleanFilter'
        - $ref: '#/components/schemas/RangeFilter'
        - $ref: '#/components/schemas/EnumFilter'
        - $ref: '#/components/schemas/PresentFilter'
    EnumFilter:
      type: object
      required:
        - type
        - op
        - value
      properties:
        type:
          type: string
          enum:
            - enum
        op:
          type: string
          enum:
            - in
          description: 'in: value is one of the listed values'
        value:
          type: array
          items:
            type: string
  responses:
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                enum:
                  - error
              message:
                type: string
                example: Invalid request format, please check API reference.
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                enum:
                  - error
              message:
                type: string
                example: API key is missing or invalid.
    TooManyRequests:
      description: Too Many Requests
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                enum:
                  - error
              message:
                type: string
                example: Account rate limited, please throttle your requests.
    InternalServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                enum:
                  - error
              message:
                type: string
                example: An unexpected server error occurred.
  securitySchemes:
    api_key:
      type: http
      scheme: bearer
      bearerFormat: string
      description: >-
        Authentication header containing API key (find it in dashboard). The
        format is "Bearer YOUR_API_KEY"

````