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

# Listar contactos

> Recorre los contactos de tu cuenta con paginación por cursor.

Lista los contactos en orden de creación descendente.

## Endpoint

```text theme={null}
GET /contacts
```

## Parámetros de consulta

| Parámetro    | Tipo      | Default | Descripción                                                                      |
| ------------ | --------- | ------- | -------------------------------------------------------------------------------- |
| `limit`      | `integer` | `20`    | Resultados por página. La API acepta de `1` a `100`.                             |
| `startAfter` | `integer` | —       | Cursor `nextCursor` recibido en la página anterior.                              |
| `status`     | `string`  | —       | Filtra por el valor exacto del campo `status`, si está configurado en tu cuenta. |

## Ejemplo de solicitud

```bash theme={null}
curl "https://api.insuranceboosters.com/api/v1/contacts?limit=20" \
  -H "x-ib-api-key: TU_API_KEY"
```

## Respuesta exitosa (`200`)

```json theme={null}
{
  "success": true,
  "data": [
    {
      "id": "<contact-id>",
      "firstName": "María",
      "lastName1": "García",
      "email": "maria.garcia@example.com",
      "phoneNumbers": ["+525500000000"],
      "createdAt": 1720000000000,
      "updatedAt": 1720000000000
    }
  ],
  "hasMore": true,
  "nextCursor": 1720000000000,
  "total": 45
}
```

Si `hasMore` es `true`, envía `nextCursor` como `startAfter`:

```text theme={null}
GET /contacts?limit=20&startAfter=1720000000000
```

Conserva el mismo `limit` y filtro `status` durante todo el recorrido.

## Errores frecuentes

| HTTP  | Qué significa                        | Qué hacer                                 |
| ----- | ------------------------------------ | ----------------------------------------- |
| `401` | API key inválida o faltante.         | Verifica `x-ib-api-key`.                  |
| `500` | No fue posible listar los contactos. | Reintenta; si continúa, contacta soporte. |


## OpenAPI

````yaml openapi/contactos-v1.yaml GET /contacts
openapi: 3.1.0
info:
  title: Insurance Boosters API — Contactos
  version: 1.0.0
  description: >-
    API pública para consultar el esquema y crear, listar, buscar, actualizar o
    eliminar contactos.
  license:
    name: Propietaria
    url: https://insuranceboosters.com
servers:
  - url: https://api.insuranceboosters.com/api/v1
    description: Producción
security:
  - IbApiKey: []
tags:
  - name: Contactos
    description: Administración de contactos.
paths:
  /contacts:
    get:
      tags:
        - Contactos
      summary: Listar contactos
      operationId: listContacts
      parameters:
        - name: limit
          in: query
          description: Número de contactos por página.
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
        - name: startAfter
          in: query
          description: Cursor `nextCursor` de la página anterior.
          schema:
            type: integer
        - name: status
          in: query
          description: Valor exacto del campo `status`, si está configurado.
          schema:
            type: string
      responses:
        '200':
          description: Página de contactos.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListContactsResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    ListContactsResponse:
      type: object
      required:
        - success
        - data
        - hasMore
        - nextCursor
        - total
      properties:
        success:
          type: boolean
          const: true
        data:
          type: array
          items:
            $ref: '#/components/schemas/Contact'
        hasMore:
          type: boolean
        nextCursor:
          oneOf:
            - type: integer
            - type: 'null'
        total:
          type: integer
          minimum: 0
    Contact:
      allOf:
        - $ref: '#/components/schemas/ContactInput'
        - type: object
          required:
            - id
            - createdAt
            - updatedAt
          properties:
            id:
              type: string
              description: ID del contacto.
            createdAt:
              type: integer
              description: Fecha de creación en milisegundos Unix.
            updatedAt:
              type: integer
              description: Fecha de última actualización en milisegundos Unix.
    Error:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
    ContactInput:
      type: object
      description: Campos editables configurados para tu cuenta.
      additionalProperties: true
      properties:
        firstName:
          type: string
          minLength: 1
          maxLength: 100
          description: Nombre.
        lastName1:
          type: string
          minLength: 1
          maxLength: 100
          description: Primer apellido.
        lastName2:
          type: string
          maxLength: 100
          description: Segundo apellido.
        email:
          type: string
          format: email
          description: Correo electrónico.
        phoneNumbers:
          type: array
          description: Teléfonos del contacto.
          items:
            type: string
  responses:
    Unauthorized:
      description: API key inválida o faltante.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalError:
      description: Error inesperado.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    IbApiKey:
      type: apiKey
      in: header
      name: x-ib-api-key

````