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

# List contacts with filtering and pagination

> Retrieves a paginated list of contacts with optional filtering. All contact fields are always returned.

**Filtering**: Use filters to search for contacts. Text filters (email, external_id, first_name, last_name, full_name, phone, country, language) use case-insensitive partial matching (ILIKE).

**List filtering**: Use `list_id` and/or `contact_list_status` to filter contacts by list membership.

**Segment filtering**: Use `segments[]` to filter contacts that belong to specific segments.

**Contact lists**: By default, `contact_lists` is not included in the response. Set `with_contact_lists=true` to include the contact's list subscriptions.

**Pagination**: Uses cursor-based pagination. Use the `next_cursor` from the response to fetch the next page.




## OpenAPI

````yaml /openapi.json get /api/contacts.list
openapi: 3.0.3
info:
  title: Notifuse API
  description: API for Notifuse - a transactional email and newsletter management platform
  version: 1.0.0
  contact:
    name: Notifuse Support
    url: https://www.notifuse.com/support
    email: hello@notifuse.com
servers:
  - url: https://{notifuseDomain}
    description: Customer-specific Notifuse API server
    variables:
      notifuseDomain:
        description: Your unique Notifuse domain
        default: demo.notifuse.com
security: []
paths:
  /api/contacts.list:
    get:
      summary: List contacts with filtering and pagination
      description: >
        Retrieves a paginated list of contacts with optional filtering. All
        contact fields are always returned.


        **Filtering**: Use filters to search for contacts. Text filters (email,
        external_id, first_name, last_name, full_name, phone, country, language)
        use case-insensitive partial matching (ILIKE).


        **List filtering**: Use `list_id` and/or `contact_list_status` to filter
        contacts by list membership.


        **Segment filtering**: Use `segments[]` to filter contacts that belong
        to specific segments.


        **Contact lists**: By default, `contact_lists` is not included in the
        response. Set `with_contact_lists=true` to include the contact's list
        subscriptions.


        **Pagination**: Uses cursor-based pagination. Use the `next_cursor` from
        the response to fetch the next page.
      operationId: listContacts
      parameters:
        - name: workspace_id
          in: query
          required: true
          schema:
            type: string
          description: The ID of the workspace
          example: ws_1234567890
        - name: email
          in: query
          required: false
          schema:
            type: string
          description: Filter by email (case-insensitive partial match)
          example: user@example
        - name: external_id
          in: query
          required: false
          schema:
            type: string
          description: Filter by external ID (case-insensitive partial match)
          example: user_123
        - name: first_name
          in: query
          required: false
          schema:
            type: string
          description: Filter by first name (case-insensitive partial match)
          example: John
        - name: last_name
          in: query
          required: false
          schema:
            type: string
          description: Filter by last name (case-insensitive partial match)
          example: Doe
        - name: full_name
          in: query
          required: false
          schema:
            type: string
          description: Filter by full name (case-insensitive partial match)
          example: John Doe
        - name: phone
          in: query
          required: false
          schema:
            type: string
          description: Filter by phone number (case-insensitive partial match)
          example: '+1555'
        - name: country
          in: query
          required: false
          schema:
            type: string
          description: Filter by country (case-insensitive partial match)
          example: US
        - name: language
          in: query
          required: false
          schema:
            type: string
          description: Filter by language (case-insensitive partial match)
          example: en
        - name: list_id
          in: query
          required: false
          schema:
            type: string
          description: Filter by list membership (contacts subscribed to this list)
          example: newsletter
        - name: contact_list_status
          in: query
          required: false
          schema:
            type: string
            enum:
              - active
              - pending
              - unsubscribed
              - bounced
              - complained
          description: Filter by subscription status within the list
          example: active
        - name: segments[]
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
          description: Filter by segment membership (contacts in any of these segments)
          example:
            - premium_users
            - active_buyers
        - name: with_contact_lists
          in: query
          required: false
          schema:
            type: boolean
            default: false
          description: Include contact list subscriptions in the response
          example: true
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
          description: Maximum number of contacts to return (1-100)
          example: 50
        - name: cursor
          in: query
          required: false
          schema:
            type: string
          description: Pagination cursor from previous response
          example: MjAyMy0wMS0xNVQxMDozMDowMFp+dXNlckBleGFtcGxlLmNvbQ==
      responses:
        '200':
          description: Contacts retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListContactsResponse'
        '400':
          description: Bad request - invalid parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                missingWorkspaceId:
                  value:
                    error: workspace_id is required
                invalidLimit:
                  value:
                    error: limit must be between 1 and 100
                invalidCursor:
                  value:
                    error: invalid cursor encoding
        '401':
          description: Unauthorized - invalid or missing authentication token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    ListContactsResponse:
      type: object
      properties:
        contacts:
          type: array
          description: Array of contacts matching the query
          items:
            $ref: '#/components/schemas/Contact'
        next_cursor:
          type: string
          nullable: true
          description: >-
            Cursor for fetching the next page of results. Null if no more
            results.
          example: MjAyMy0wMS0xNVQxMDozMDowMFp+dXNlckBleGFtcGxlLmNvbQ==
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Error message
      required:
        - error
    Contact:
      type: object
      required:
        - email
      properties:
        email:
          type: string
          format: email
          description: Email address of the contact
          example: user@example.com
        external_id:
          type: string
          nullable: true
          description: External identifier for the contact
          example: user_12345
        timezone:
          type: string
          nullable: true
          description: Timezone of the contact
          example: America/New_York
        language:
          type: string
          nullable: true
          description: Preferred language of the contact
          example: en-US
        first_name:
          type: string
          nullable: true
          description: First name of the contact
          example: John
        last_name:
          type: string
          nullable: true
          description: Last name of the contact
          example: Doe
        full_name:
          type: string
          nullable: true
          description: >-
            Full name of the contact (for systems that don't have separate
            first/last names)
          example: John Doe
        phone:
          type: string
          nullable: true
          description: Phone number of the contact
          example: '+15551234567'
        address_line_1:
          type: string
          nullable: true
          description: First line of address
          example: 123 Main St
        address_line_2:
          type: string
          nullable: true
          description: Second line of address
          example: Apt 4B
        country:
          type: string
          nullable: true
          description: Country of the contact
          example: US
        postcode:
          type: string
          nullable: true
          description: Postal code
          example: '10001'
        state:
          type: string
          nullable: true
          description: State or province
          example: NY
        job_title:
          type: string
          nullable: true
          description: Job title of the contact
          example: Software Engineer
        custom_string_1:
          type: string
          nullable: true
          description: Custom string field 1
          example: Premium tier
        custom_string_2:
          type: string
          nullable: true
          description: Custom string field 2
        custom_string_3:
          type: string
          nullable: true
          description: Custom string field 3
        custom_string_4:
          type: string
          nullable: true
          description: Custom string field 4
        custom_string_5:
          type: string
          nullable: true
          description: Custom string field 5
        custom_number_1:
          type: number
          format: float
          nullable: true
          description: Custom number field 1
          example: 42
        custom_number_2:
          type: number
          format: float
          nullable: true
          description: Custom number field 2
        custom_number_3:
          type: number
          format: float
          nullable: true
          description: Custom number field 3
        custom_number_4:
          type: number
          format: float
          nullable: true
          description: Custom number field 4
        custom_number_5:
          type: number
          format: float
          nullable: true
          description: Custom number field 5
        custom_datetime_1:
          type: string
          format: date-time
          nullable: true
          description: Custom datetime field 1
          example: '2023-06-01T09:00:00Z'
        custom_datetime_2:
          type: string
          format: date-time
          nullable: true
          description: Custom datetime field 2
        custom_datetime_3:
          type: string
          format: date-time
          nullable: true
          description: Custom datetime field 3
        custom_datetime_4:
          type: string
          format: date-time
          nullable: true
          description: Custom datetime field 4
        custom_datetime_5:
          type: string
          format: date-time
          nullable: true
          description: Custom datetime field 5
        custom_json_1:
          type: object
          nullable: true
          description: Custom JSON field 1
          example:
            preferences:
              theme: dark
              notifications: true
        custom_json_2:
          type: object
          nullable: true
          description: Custom JSON field 2
        custom_json_3:
          type: object
          nullable: true
          description: Custom JSON field 3
        custom_json_4:
          type: object
          nullable: true
          description: Custom JSON field 4
        custom_json_5:
          type: object
          nullable: true
          description: Custom JSON field 5
        created_at:
          type: string
          format: date-time
          readOnly: true
          description: When the contact was created (read-only, set by server)
          example: '2023-01-15T10:30:00Z'
        updated_at:
          type: string
          format: date-time
          readOnly: true
          description: When the contact was last updated (read-only, set by server)
          example: '2023-04-22T15:45:00Z'
        contact_lists:
          type: array
          readOnly: true
          description: >-
            Lists the contact is subscribed to (read-only, included in GET
            responses only)
          items:
            $ref: '#/components/schemas/ContactList'
          example:
            - email: user@example.com
              list_id: newsletter
              list_name: Newsletter
              status: active
              created_at: '2023-01-15T10:30:00Z'
              updated_at: '2023-01-15T10:30:00Z'
              deleted_at: null
        contact_segments:
          type: array
          readOnly: true
          description: >-
            Segments the contact belongs to (read-only, included in GET
            responses only)
          items:
            $ref: '#/components/schemas/ContactSegment'
    ContactList:
      type: object
      properties:
        email:
          type: string
          format: email
          description: Email address of the contact
          example: user@example.com
        list_id:
          type: string
          description: ID of the list
          example: newsletter
        list_name:
          type: string
          description: Name of the list
          example: Newsletter
        status:
          type: string
          enum:
            - active
            - pending
            - unsubscribed
            - bounced
            - complained
          description: Subscription status
          example: active
        created_at:
          type: string
          format: date-time
          description: When the contact was subscribed to this list
          example: '2023-01-15T10:30:00Z'
        updated_at:
          type: string
          format: date-time
          description: When the subscription was last updated
          example: '2023-01-15T10:30:00Z'
        deleted_at:
          type: string
          format: date-time
          nullable: true
          description: When the subscription was deleted (null if active)
          example: null
    ContactSegment:
      type: object
      properties:
        email:
          type: string
          format: email
          description: Email address of the contact
          example: user@example.com
        segment_id:
          type: string
          description: ID of the segment
          example: premium_users
        version:
          type: integer
          format: int64
          description: Version of the segment computation
          example: 1
        matched_at:
          type: string
          format: date-time
          description: When the contact was matched to this segment
          example: '2023-01-15T10:30:00Z'
        computed_at:
          type: string
          format: date-time
          description: When the segment was last computed
          example: '2023-01-15T10:30:00Z'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: API token for authentication

````