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

# List Contacts

> Returns all contacts in the company, ordered with the most recently created first. Results are paginated using a cursor: pass the `next_cursor` returned by a previous response as the `cursor` query parameter to fetch the next page. When `next_cursor` is `null`, there are no more results.



## OpenAPI

````yaml GET /contacts
openapi: 3.0.1
info:
  title: Alpharun API
  description: Alpharun REST API reference
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.alpharun.com/api/v1
security:
  - bearerAuth: []
paths:
  /contacts:
    get:
      description: >-
        Returns all contacts in the company, ordered with the most recently
        created first. Results are paginated using a cursor: pass the
        `next_cursor` returned by a previous response as the `cursor` query
        parameter to fetch the next page. When `next_cursor` is `null`, there
        are no more results.
      parameters:
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 20
            minimum: 1
            maximum: 100
          description: >-
            Maximum number of contacts to return in a single response. Defaults
            to `20`. Must be between `1` and `100`; values outside this range
            return a 400.
        - name: cursor
          in: query
          required: false
          schema:
            type: string
            nullable: true
          description: >-
            Pagination cursor returned as `next_cursor` in a previous response.
            Omit on the first request.
      responses:
        '200':
          description: List of contacts in the company
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      contacts:
                        type: array
                        items:
                          $ref: '#/components/schemas/ContactResponse'
                  next_cursor:
                    type: string
                    nullable: true
                    description: >-
                      Cursor to pass as the `cursor` query parameter to fetch
                      the next page. `null` when there are no more results.
              example:
                data:
                  contacts:
                    - id: contact123
                      first_name: John
                      last_name: Doe
                      email: john.doe@example.com
                      phone_number: '+1234567890'
                      ext_id: ext_contact_789
                      custom_fields:
                        - key: preferred_contact_method
                          display_name: Preferred Contact Method
                          type: text
                          value: email
                next_cursor: null
        '400':
          description: Invalid `limit` (must be between 1 and 100) or invalid `cursor`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    ContactResponse:
      type: object
      properties:
        id:
          type: string
          description: ID of the contact
        email:
          type: string
          format: email
          description: Email address of the contact
        phone_number:
          type: string
          description: Phone number of the contact
        ext_id:
          type: string
          description: Ext id of the contact
        first_name:
          type: string
          description: First name of the contact
        last_name:
          type: string
          description: Last name of the contact
        custom_fields:
          type: array
          description: Custom fields of the contact
          items:
            type: object
            properties:
              key:
                type: string
                description: Machine-readable key of the custom field
              value:
                oneOf:
                  - type: string
                  - type: number
                  - type: boolean
                description: Value of the custom field
              type:
                type: string
                description: Type of the custom field
              display_name:
                type: string
                description: Display name of the custom field
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````