> ## 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.

# Obtener cuenta

> Devuelve una cuenta por ID. Recomendado enviar `x-client-id`.



## OpenAPI

````yaml openapi/external-v1.yaml get /account/{accountId}
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:
  /account/{accountId}:
    get:
      tags:
        - Account
      summary: Obtener cuenta
      description: Devuelve una cuenta por ID. Recomendado enviar `x-client-id`.
      parameters:
        - $ref: '#/components/parameters/AccountIdPath'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      account:
                        $ref: '#/components/schemas/Account'
        '404':
          description: Account not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Invalid arguments
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  parameters:
    AccountIdPath:
      name: accountId
      in: path
      required: true
      schema:
        type: string
      description: ID de la cuenta (MongoDB ObjectId)
  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

````