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

# Listar cuentas

> Lista cuentas por IDs. Query param `accountIds` (array). Requiere `x-client-id`.




## OpenAPI

````yaml openapi/external-v1.yaml get /accounts
openapi: 3.1.0
info:
  title: Goil Public API (External)
  description: >
    API pública para integraciones externas. Permite autenticación, gestión de
    cuentas

    y envío de notificaciones y alertas.


    **Autenticación**: La mayoría de endpoints requieren el header `x-client-id`
    (businessId).

    Tras llamar a `POST /authentication/login` obtendrás un `accessToken` para
    usar en

    endpoints que requieran Bearer token (p. ej. alertas).
  version: 1.0.0
  contact:
    name: Goil API Support
servers:
  - url: https://community.goil.app/api/v1/external
    description: Production
security: []
tags:
  - name: Authentication
    description: Login para integraciones externas
  - name: Account
    description: Crear, consultar, listar, actualizar y eliminar cuentas
  - name: Notification
    description: Envío de notificaciones push/SMS
  - name: Alert
    description: Creación y actualización de alertas geolocalizadas
paths:
  /accounts:
    get:
      tags:
        - Account
      summary: Listar cuentas
      description: >
        Lista cuentas por IDs. Query param `accountIds` (array). Requiere
        `x-client-id`.
      parameters:
        - name: accountIds
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
          style: form
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      accounts:
                        type: array
                        items:
                          $ref: '#/components/schemas/Account'
        '422':
          description: Invalid arguments
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    Account:
      type: object
      properties:
        id:
          type: string
        accountType:
          type: string
        username:
          type: string
        phone:
          type: string
        role:
          type: string
        creationDate:
          type: string
          format: date-time
        subscribed:
          type: boolean
        blocked:
          type: boolean
        blockedDate:
          type: string
        validated:
          type: boolean
        expirationDate:
          type: string
        attributesValue:
          type: array
          items:
            $ref: '#/components/schemas/AttributeValue'
        businessId:
          type: string
        fullname:
          type: string
        birthday:
          type: string
        metadata:
          type: object
    ErrorResponse:
      type: object
      properties:
        timestamp:
          type: integer
          format: int64
        error:
          type: string
        data:
          type: object
          nullable: true
    AttributeValue:
      type: object
      required:
        - attributeId
        - value
      properties:
        attributeId:
          type: string
        tag:
          type: string
        value:
          type: object
          properties:
            text:
              type: string
              default: ''
            number:
              type: number
              default: 0
            boolean:
              type: boolean
              default: false
            date:
              type: string
              format: date-time
            image:
              type: string
              nullable: true

````