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

# Listar cuentas

> Lista las cuentas de Instagram disponibles para una credencial.

Este endpoint devuelve las cuentas de Instagram disponibles para tu
credencial. Usa el `id` de una cuenta como `account_id` cuando llames a un
endpoint que opere sobre una cuenta.

La operación no exige ningún permiso adicional. Aun así, requiere una
credencial aceptada y solo devuelve las cuentas a las que puede acceder esa
credencial.

Consulta [Paginación](/es/guides/pagination) para conocer `cursor`, `limit` y
`next_cursor`.


## OpenAPI

````yaml openapi/v1.json GET /api/v1/accounts
openapi: 3.1.0
info:
  title: levios public API
  version: '1'
servers:
  - url: https://levios.app
security:
  - bearerAuth: []
paths:
  /api/v1/accounts:
    get:
      tags:
        - account
      summary: List Instagram accounts
      description: Returns the Instagram accounts this API key can access.
      operationId: accounts.list
      parameters:
        - name: cursor
          in: query
          required: false
          schema:
            type: string
            minLength: 1
            maxLength: 1024
        - name: limit
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Successful response.
          headers:
            X-Correlation-ID:
              description: Correlation identifier for this request.
              schema:
                type: string
                pattern: ^[0-9A-HJKMNP-TV-Z]{26}$
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                        ig_username:
                          type: string
                          pattern: ^[A-Za-z0-9._]+$
                          minLength: 1
                          maxLength: 30
                        public_id:
                          type: string
                          pattern: ^[A-Za-z0-9]+$
                          minLength: 12
                          maxLength: 16
                        status:
                          description: >-
                            Values: `active`: the Instagram access token is
                            ready to use; `token_expired`: the Instagram access
                            token must be renewed.
                          type: string
                          enum:
                            - active
                            - token_expired
                      required:
                        - id
                        - ig_username
                        - public_id
                        - status
                      additionalProperties: false
                    maxItems: 50
                  next_cursor:
                    anyOf:
                      - type: string
                        maxLength: 1024
                      - type: 'null'
                required:
                  - items
                  - next_cursor
                additionalProperties: false
        '400':
          description: Error response.
          headers:
            X-Correlation-ID:
              description: Correlation identifier for this request.
              schema:
                type: string
                pattern: ^[0-9A-HJKMNP-TV-Z]{26}$
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            enum:
                              - api_invalid_content_length
                          correlation_id:
                            type: string
                          message:
                            type: string
                            enum:
                              - Invalid Content-Length.
                        required:
                          - code
                          - message
                        additionalProperties: false
                    required:
                      - error
                    additionalProperties: false
                  - type: object
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            enum:
                              - api_invalid_json
                          correlation_id:
                            type: string
                          message:
                            type: string
                            enum:
                              - The request body is not valid JSON.
                        required:
                          - code
                          - message
                        additionalProperties: false
                    required:
                      - error
                    additionalProperties: false
                  - type: object
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            enum:
                              - api_invalid_request_url
                          correlation_id:
                            type: string
                          message:
                            type: string
                            enum:
                              - The request URL is invalid.
                        required:
                          - code
                          - message
                        additionalProperties: false
                    required:
                      - error
                    additionalProperties: false
                  - type: object
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            enum:
                              - api_invalid_utf8
                          correlation_id:
                            type: string
                          message:
                            type: string
                            enum:
                              - The request body is not valid UTF-8.
                        required:
                          - code
                          - message
                        additionalProperties: false
                    required:
                      - error
                    additionalProperties: false
        '401':
          description: Error response.
          headers:
            X-Correlation-ID:
              description: Correlation identifier for this request.
              schema:
                type: string
                pattern: ^[0-9A-HJKMNP-TV-Z]{26}$
            WWW-Authenticate:
              description: API key Bearer challenge.
              schema:
                type: string
                enum:
                  - Bearer
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - api_unauthorized
                      correlation_id:
                        type: string
                      message:
                        type: string
                        enum:
                          - Authentication required.
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '403':
          description: Error response.
          headers:
            X-Correlation-ID:
              description: Correlation identifier for this request.
              schema:
                type: string
                pattern: ^[0-9A-HJKMNP-TV-Z]{26}$
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            enum:
                              - api_account_not_granted
                          correlation_id:
                            type: string
                          message:
                            type: string
                            enum:
                              - >-
                                This credential is not authorized for the
                                request.
                        required:
                          - code
                          - message
                        additionalProperties: false
                    required:
                      - error
                    additionalProperties: false
                  - type: object
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            enum:
                              - api_forbidden
                          correlation_id:
                            type: string
                          message:
                            type: string
                            enum:
                              - >-
                                This credential is not authorized for the
                                request.
                        required:
                          - code
                          - message
                        additionalProperties: false
                    required:
                      - error
                    additionalProperties: false
                  - type: object
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            enum:
                              - api_scope_denied
                          correlation_id:
                            type: string
                          message:
                            type: string
                            enum:
                              - >-
                                This credential is not authorized for the
                                request.
                        required:
                          - code
                          - message
                        additionalProperties: false
                    required:
                      - error
                    additionalProperties: false
        '413':
          description: Error response.
          headers:
            X-Correlation-ID:
              description: Correlation identifier for this request.
              schema:
                type: string
                pattern: ^[0-9A-HJKMNP-TV-Z]{26}$
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            enum:
                              - api_body_too_large
                          correlation_id:
                            type: string
                          message:
                            type: string
                            enum:
                              - The JSON request body exceeds 1 MiB.
                        required:
                          - code
                          - message
                        additionalProperties: false
                    required:
                      - error
                    additionalProperties: false
                  - type: object
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            enum:
                              - api_json_too_deep
                          correlation_id:
                            type: string
                          message:
                            type: string
                            enum:
                              - The JSON request body exceeds maximum depth.
                        required:
                          - code
                          - message
                        additionalProperties: false
                    required:
                      - error
                    additionalProperties: false
        '415':
          description: Error response.
          headers:
            X-Correlation-ID:
              description: Correlation identifier for this request.
              schema:
                type: string
                pattern: ^[0-9A-HJKMNP-TV-Z]{26}$
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - api_unsupported_media_type
                      correlation_id:
                        type: string
                      message:
                        type: string
                        enum:
                          - Content-Type must be application/json.
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '422':
          description: Error response.
          headers:
            X-Correlation-ID:
              description: Correlation identifier for this request.
              schema:
                type: string
                pattern: ^[0-9A-HJKMNP-TV-Z]{26}$
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            enum:
                              - api_invalid_cursor
                          correlation_id:
                            type: string
                          message:
                            type: string
                            enum:
                              - >-
                                The projection cursor is invalid for this
                                resource.
                        required:
                          - code
                          - message
                        additionalProperties: false
                    required:
                      - error
                    additionalProperties: false
                  - type: object
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            enum:
                              - api_invalid_limit
                          correlation_id:
                            type: string
                          message:
                            type: string
                            enum:
                              - >-
                                The page limit must be an integer between 1 and
                                50.
                        required:
                          - code
                          - message
                        additionalProperties: false
                    required:
                      - error
                    additionalProperties: false
                  - type: object
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            enum:
                              - api_validation_error
                          correlation_id:
                            type: string
                          details:
                            type: object
                            properties:
                              issues:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    code:
                                      type: string
                                      minLength: 1
                                      maxLength: 64
                                    path:
                                      type: array
                                      items:
                                        type: integer
                                        minimum: 0
                                      maxItems: 16
                                  required:
                                    - code
                                    - path
                                  additionalProperties: false
                                maxItems: 32
                            required:
                              - issues
                            additionalProperties: false
                          message:
                            type: string
                            enum:
                              - The request does not match the declared schema.
                        required:
                          - code
                          - message
                        additionalProperties: false
                    required:
                      - error
                    additionalProperties: false
        '429':
          description: Error response.
          headers:
            X-Correlation-ID:
              description: Correlation identifier for this request.
              schema:
                type: string
                pattern: ^[0-9A-HJKMNP-TV-Z]{26}$
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
                minimum: 1
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - rate_limited
                      correlation_id:
                        type: string
                      message:
                        type: string
                        enum:
                          - Rate limit exceeded.
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '500':
          description: Error response.
          headers:
            X-Correlation-ID:
              description: Correlation identifier for this request.
              schema:
                type: string
                pattern: ^[0-9A-HJKMNP-TV-Z]{26}$
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            enum:
                              - api_internal_error
                          correlation_id:
                            type: string
                          message:
                            type: string
                            enum:
                              - The request could not be completed.
                        required:
                          - code
                          - message
                        additionalProperties: false
                    required:
                      - error
                    additionalProperties: false
                  - type: object
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            enum:
                              - api_invalid_projection
                          correlation_id:
                            type: string
                          message:
                            type: string
                            enum:
                              - The projected list contains an invalid item key.
                        required:
                          - code
                          - message
                        additionalProperties: false
                    required:
                      - error
                    additionalProperties: false
                  - type: object
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            enum:
                              - api_projection_too_large
                          correlation_id:
                            type: string
                          message:
                            type: string
                            enum:
                              - >-
                                The first projected item exceeds the result byte
                                limit.
                        required:
                          - code
                          - message
                        additionalProperties: false
                    required:
                      - error
                    additionalProperties: false
        '503':
          description: Error response.
          headers:
            X-Correlation-ID:
              description: Correlation identifier for this request.
              schema:
                type: string
                pattern: ^[0-9A-HJKMNP-TV-Z]{26}$
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            enum:
                              - api_account_resolution_unavailable
                          correlation_id:
                            type: string
                          message:
                            type: string
                            enum:
                              - The reachable account set could not be read.
                        required:
                          - code
                          - message
                        additionalProperties: false
                    required:
                      - error
                    additionalProperties: false
                  - type: object
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            enum:
                              - rate_limiter_unavailable
                          correlation_id:
                            type: string
                          message:
                            type: string
                            enum:
                              - Rate limiter unavailable.
                        required:
                          - code
                          - message
                        additionalProperties: false
                    required:
                      - error
                    additionalProperties: false
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Levios API key sent as a Bearer token.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.