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

# List contacts

> Returns the contacts in one customer list, newest first, one page at a time.

Each contact has the fields described in [Contact fields](https://docs.olimi.ai/api-reference/endpoint/contacts/contacts.md#contact-fields).

Use `meta.totalPages` to know when you've fetched every page. A customer list ID that doesn't exist, or isn't yours, returns an empty list rather than an error.

## How search works

`search` is split into words. A contact matches if **any** word matches:

* **Name:** the word appears in the first or last name, or is spelled similarly. Not case-sensitive.
* **Phone number:** a word made only of digits, optionally starting with `+`, also matches phone numbers that contain it. Numbers are stored in E.164 form (`+201001234567`), so search with digits as they appear there: no spaces, dashes, brackets or leading `0`.

When you filter by `phoneNumber`, send the number in E.164 form with no spaces, and encode the `+` as `%2B` in the URL.


## OpenAPI

````yaml get /api/v2/contacts/{customerListId}
openapi: 3.0.1
info:
  title: Customer Management API
  description: API for managing customer lists and customers within those lists
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api-eg.olimi.ai
security:
  - bearerAuth: []
paths:
  /api/v2/contacts/{customerListId}:
    get:
      tags:
        - Contacts
      summary: List contacts
      description: >-
        Returns the contacts in one customer list, newest first, one page at a
        time.
      parameters:
        - name: customerListId
          in: path
          required: true
          description: The customer list's `id`.
          schema:
            type: string
            format: uuid
          example: 9c4e1b7a-2d5f-4a83-b6e0-3f7d9a1c5e24
        - name: page
          in: query
          required: false
          description: Page number, starting at `1`.
          schema:
            type: integer
            minimum: 1
            default: 1
        - name: limit
          in: query
          required: false
          description: Contacts per page.
          schema:
            type: integer
            minimum: 1
            default: 10
        - name: search
          in: query
          required: false
          description: >-
            Finds contacts by name or phone number. See [How search
            works](/api-reference/endpoint/contacts/list-contacts#how-search-works).
          schema:
            type: string
        - name: phoneNumber
          in: query
          required: false
          description: >-
            Only contacts whose number contains this one. Send it in E.164 form
            with no spaces, for example `+201001234567`, and encode `+` as
            `%2B`.
          schema:
            type: string
        - name: email
          in: query
          required: false
          description: >-
            Only contacts whose email contains this one. Must be a full email
            address.
          schema:
            type: string
            format: email
      responses:
        '200':
          description: A page of contacts.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContactListResponse'
        '400':
          description: '`customerListId` isn''t a valid UUID.'
        '401':
          description: The `X-API-KEY` header is missing or the key isn't valid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '422':
          description: '`phoneNumber` or `email` isn''t a full phone number or email address.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
      security:
        - apiKeyAuth: []
components:
  schemas:
    ContactListResponse:
      type: object
      properties:
        message:
          type: string
          example: Contacts fetched successfully
        meta:
          $ref: '#/components/schemas/PaginationMeta'
        data:
          type: array
          items:
            $ref: '#/components/schemas/Contact'
    ApiError:
      type: object
      properties:
        statusCode:
          type: integer
          example: 404
        errorCode:
          type: string
          description: Machine-readable error code.
          example: agent_not_found
        message:
          type: string
          description: Human-readable text. May change; don't match on it.
          example: Agent not found
    ValidationError:
      type: object
      properties:
        statusCode:
          type: integer
          example: 422
        message:
          type: array
          items:
            type: string
          description: What went wrong. Human-readable.
          example:
            - name must be shorter than or equal to 100 characters
        error:
          type: string
          example: Unprocessable Entity
    PaginationMeta:
      type: object
      properties:
        totalItems:
          type: integer
          description: Total items across all pages.
          example: 12
        itemCount:
          type: integer
          description: Items on this page.
          example: 10
        itemsPerPage:
          type: integer
          description: The `limit` used.
          example: 10
        totalPages:
          type: integer
          description: Number of pages.
          example: 2
        currentPage:
          type: integer
          description: The `page` returned.
          example: 1
    Contact:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: The contact's ID. Use it to edit or delete the contact.
          example: b2f7c4e1-8a3d-4c59-9e06-1d5a7f3b8c42
        customerId:
          type: string
          format: uuid
          description: The ID of the customer list the contact is in.
          example: 9c4e1b7a-2d5f-4a83-b6e0-3f7d9a1c5e24
        firstName:
          type: string
          nullable: true
          description: First name.
          example: Ahmed
        lastName:
          type: string
          nullable: true
          description: Last name.
          example: Hassan
        phoneNumber:
          type: string
          description: Phone number in E.164 format.
          example: '+201001234567'
        email:
          type: string
          nullable: true
          description: Email address.
          example: ahmed.hassan@example.com
        gender:
          type: string
          nullable: true
          description: Free text, as you sent it.
          example: male
        retries:
          type: integer
          description: How many times a campaign has scheduled a retry for this contact.
          example: 0
        lastCallStatus:
          type: string
          enum:
            - not_called
            - pending
            - in_progress
            - answered
            - not_answered
            - failed
          description: >-
            Outcome of the latest call. See [Call status
            values](/api-reference/endpoint/contacts/contacts#call-status-values).
          example: not_called
        callbackScheduled:
          type: boolean
          description: Whether the contact asked to be called back.
          example: false
        callbackAt:
          type: string
          format: date-time
          nullable: true
          description: When the callback is due (UTC).
          example: null
        variantValues:
          type: array
          description: The contact's custom field values.
          items:
            $ref: '#/components/schemas/ContactVariantValue'
        createdAt:
          type: string
          format: date-time
          description: When the contact was added (UTC).
          example: '2026-09-20T08:14:22.531Z'
        updatedAt:
          type: string
          format: date-time
          description: When the contact was last changed (UTC).
          example: '2026-09-27T11:40:09.118Z'
    ContactVariantValue:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: The value's own ID.
          example: 4d8e2a6f-1c7b-4e93-a5d0-8f2b6c1e9a37
        variantId:
          type: string
          format: uuid
          description: >-
            The variant (column) it belongs to. Only in List contacts; Add and
            Edit return `variant.id` instead.
          example: 7e3c9b15-6a2d-4f8e-b1c4-5d9a3e7f2b60
        value:
          type: string
          description: The contact's value for that column.
          example: ORD-10492
        variant:
          $ref: '#/components/schemas/ContactVariant'
    ContactVariant:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: The variant's ID.
          example: 7e3c9b15-6a2d-4f8e-b1c4-5d9a3e7f2b60
        name:
          type: string
          description: The column's display name.
          example: Order number
        slug:
          type: string
          description: The name used in the agent's script.
          example: order_number
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.