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

# List all connections

> Returns a list of all connections for the authenticated application



## OpenAPI

````yaml /api-reference/openapi.json get /connections
openapi: 3.0.0
info:
  title: QuBe Sync API
  description: Integrate with QuickBooks Desktop or QuickBooks Enterprise in a few steps.
  version: 1.0.0
  contact:
    email: support@qubesync.com
servers:
  - url: https://qubesync.com/api/v1
    description: v1 API
  - url: https://dev.qubesync.com/api/v1
    description: Local development server
security: []
tags:
  - name: Connections
    description: Endpoints for managing QuickBooks connections
  - name: Queued Requests
    description: Endpoints for managing queued API requests
  - name: Pre-built Queries
    description: >-
      Endpoints for executing pre-built queries against QuickBooks data. These
      endpoints simplify common data retrieval operations by providing a
      higher-level interface than the raw queued requests API. Each query is
      executed asynchronously and returns a queued request ID that can be used
      to check the status and retrieve results.
paths:
  /connections:
    get:
      tags:
        - Connections
      summary: List all connections
      description: Returns a list of all connections for the authenticated application
      responses:
        '200':
          description: A list of connections
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectionsList'
        '401':
          $ref: '#/components/responses/Unauthorized'
      security:
        - apiKey: []
components:
  schemas:
    ConnectionsList:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Connection'
    Connection:
      type: object
      properties:
        id:
          type: string
          format: uuid
          example: 123e4567-e89b-12d3-a456-426614174000
          description: Unique identifier for the connection
        last_connected_at:
          type: string
          format: date-time
          example: '2023-01-01T12:00:00Z'
          description: Timestamp of when the connection was last used
          nullable: true
        name:
          type: string
          example: My Customer Inc.
          description: Name of the connection
        app_id:
          type: string
          format: uuid
          example: 550e8400-e29b-41d4-a716-446655440000
          description: ID of the app this connection belongs to
        company_file:
          type: string
          example: My Company File.QBW
          description: Name of the QuickBooks company file
          nullable: true
        username:
          type: string
          example: 550e8400-e29b-41d4-a716-446655440001
          description: Automatically generated username for the connection
        qbxml_version:
          type: string
          example: '14.0'
          description: >-
            The latest QBXML version supported by the connected QuickBooks
            instance
          nullable: true
        quickbooks_product_name:
          type: string
          example: QuickBooks Pro 2021
          description: The product name of the connected QuickBooks instance
          nullable: true
        type:
          type: string
          example: standard
          description: Type of connection. Either 'standard' or 'realtime'.
        redirect_url:
          $ref: '#/components/schemas/connection_redirect_url'
        links:
          type: object
          properties:
            self:
              type: string
              format: uri
              example: /api/v1/connections/123e4567-e89b-12d3-a456-426614174000
            ui:
              type: string
              format: uri
              example: /app/connections/123e4567-e89b-12d3-a456-426614174000
            onboarding:
              type: string
              format: uri
              example: >-
                https://qubesync.com/onboarding/123e4567-e89b-12d3-a456-426614174000
      required:
        - id
        - app_id
        - username
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: invalid_request
            message:
              type: string
              example: The request was invalid
            details:
              type: object
              description: Additional error details
    connection_redirect_url:
      type: string
      format: uri
      description: >-
        The URL to redirect the user to after they complete (or cancel) the
        QuickBooks setup process. This URL should be able to handle the query
        parameters:
         * `?state=connected` if they completed the process,
         * `?state=cancelled` if they cancelled it or
         * `?state=expired` if they visit the onboarding link after it has expired
      example: https://myapp.com/quickbooks-setup-callback
  responses:
    Unauthorized:
      description: Authentication required or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: unauthorized
              message: Authentication required
  securitySchemes:
    apiKey:
      type: http
      scheme: basic
      description: Use your app's API_KEY as the username, and leave the password blank

````