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

# Listar cuentas

> Returns accounts for the authenticated organization, newest first. Cursor-paginated.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/accounts
openapi: 3.1.0
info:
  title: Caudal Public API
  version: 1.0.0
  description: >-
    REST API for HORECA distributors to integrate their ERP with Caudal.
    Authenticate with an API key issued from the Caudal dashboard
    (WorkOS-backed). Pass it as 'Authorization: Bearer <key>'. Base URL:
    https://api.caudalflow.com
servers:
  - url: https://api.caudalflow.com
security:
  - bearerAuth: []
tags:
  - name: Pedidos
    description: Leer y crear pedidos.
  - name: Cuentas
    description: Leer y crear las cuentas de los clientes.
  - name: Productos
    description: Leer el catálogo.
paths:
  /v1/accounts:
    get:
      tags:
        - Cuentas
      summary: Listar cuentas
      description: >-
        Returns accounts for the authenticated organization, newest first.
        Cursor-paginated.
      parameters:
        - $ref: '#/components/parameters/Limit'
        - $ref: '#/components/parameters/Cursor'
      responses:
        '200':
          description: One page of results.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Account'
                  meta:
                    $ref: '#/components/schemas/PageMeta'
        '400':
          $ref: '#/components/responses/Error'
          description: The request is malformed (code invalid_request).
        '401':
          $ref: '#/components/responses/Error'
          description: The API key is missing, invalid or not linked to an organization.
        '403':
          $ref: '#/components/responses/Error'
          description: The API key lacks the scope this route requires.
        '429':
          $ref: '#/components/responses/Error'
          description: >-
            The organization exceeded its rate limit. Retry after the delay in
            Retry-After.
      security:
        - bearerAuth:
            - accounts:read
components:
  parameters:
    Limit:
      name: limit
      in: query
      required: false
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 25
    Cursor:
      name: cursor
      in: query
      required: false
      schema:
        type: string
      description: Opaque cursor from a previous response's meta.next_cursor.
  schemas:
    Account:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        address:
          anyOf:
            - type: string
            - type: 'null'
        is_active:
          type: boolean
        last_order_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
        channels:
          type: array
          items:
            $ref: '#/components/schemas/ContactChannel'
      required:
        - id
        - name
        - address
        - is_active
        - last_order_at
        - created_at
        - channels
    PageMeta:
      type: object
      properties:
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
        has_more:
          type: boolean
      required:
        - next_cursor
        - has_more
    ContactChannel:
      type: object
      properties:
        type:
          type: string
          enum:
            - phone
            - email
        value:
          type: string
        is_primary:
          type: boolean
        capabilities:
          type: array
          items:
            type: string
            enum:
              - voice
              - whatsapp
              - email
      required:
        - type
        - value
        - is_primary
        - capabilities
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - missing_api_key
                - invalid_api_key
                - insufficient_scope
                - rate_limited
                - not_found
                - invalid_request
                - idempotency_key_conflict
                - internal_error
                - erased_customer
                - order_items_unresolved
            message:
              type: string
          required:
            - code
            - message
      required:
        - error
  responses:
    Error:
      description: Error response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key issued from the Caudal dashboard. Scopes are enforced per route:
        orders:read, orders:write, accounts:read, accounts:write, products:read.

````