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

# Regenerate the onboarding URL

> Invalidates the previous onboarding link and returns the connection with a fresh `links.onboarding`. Onboarding links expire after 48 hours (see the Onboarding guide). It takes no body.



## OpenAPI

````yaml /api-reference/v2/openapi.json post /connections/{connection_id}/onboarding-url
openapi: 3.1.0
info:
  contact:
    email: support@qubesync.com
  description: >
    A single generic operation surface for every curated qbXML request QuBe Sync
    supports, driven directly off the qbXML schema -- see the [MCP
    server](/mcp-server) to explore available operations interactively.


    **Every endpoint queues a request and returns it immediately (`201`, a
    `QueuedRequest`).** QuickBooks Desktop is reached through the customer's Web
    Connector, which polls QuBe Sync, so the answer arrives seconds to minutes
    later. **Pass a `webhook_url` with every request**: when QuickBooks has
    answered, QuBe Sync POSTs the same document to it -- `state` set,
    `response_json` filled in -- signed with `X-QUBE-Signature` (see the
    Webhooks guide). `response_json` is the `{status, data}` envelope documented
    on each operation: `status: "success"` with `data` derived from the qbXML
    `*Ret` (and `warning`, QuickBooks' code and message, when it carried the
    request out but warned about it), or `status: "error"` with QuickBooks' own
    status code and message -- a QuickBooks business error is a *successful*
    HTTP round trip. `links.self` returns the request on demand (for a
    dashboard, a retry, a script); it is not the integration path. Send an
    `Idempotency-Key` header with each request so a call whose answer you never
    got can be sent again without queueing it twice.


    Authentication is HTTP Basic with your app's API key as the username and a
    blank password. Connections themselves (creating one, onboarding, its QWC
    file and password) are the `/connections` endpoints; every QuickBooks
    operation is scoped to one of them.
  title: QuBe Sync API (v2)
  version: 2.0.0
servers:
  - description: v2 API
    url: https://qubesync.com/api/v2
  - description: Local development server
    url: https://dev.qubesync.com/api/v2
security:
  - apiKey: []
tags:
  - description: >-
      Creating and managing the connection (a customer's QuickBooks company
      file) that every request below is queued against. See the Onboarding
      guide.
    name: Connections
  - description: >-
      Queueing qbXML you wrote yourself, listing the requests queued on a
      connection, and discarding one the app no longer wants. A `webhook_url` on
      each request is the integration path (see the Webhooks guide): the listing
      is for a dashboard, a script, or catching up after downtime.
    name: Queued Requests
  - description: >-
      Finding the record in a customer's company file that a name means, even
      written differently: ranked matches from QuBe Sync's index of the file's
      names, on realtime and simulated connections. See the Matching guide.
    name: Matching
  - description: >-
      Endpoints for publishing workflow definitions, starting runs, and
      answering a run that is waiting on a decision from your app. A workflow is
      one JSON statechart document; see the schema at
      /api/v2/workflows/schema.json.
    name: Workflows
  - name: Account Tax Line Infos
  - name: Accounts
  - name: Aging Reports
  - name: Alerts
  - name: Ar Refund Credit Cards
  - name: Bar Codes
  - name: Bill Payment Checks
  - name: Bill Payment Credit Cards
  - name: Bill To Pays
  - name: Billing Rates
  - name: Bills
  - name: Budget Summary Reports
  - name: Build Assemblies
  - name: Charges
  - name: Checks
  - name: Classes
  - name: Cleared Statuses
  - name: Companies
  - name: Company Activities
  - name: Credit Card Charges
  - name: Credit Card Credits
  - name: Credit Memos
  - name: Currencies
  - name: Custom Detail Reports
  - name: Custom Summary Reports
  - name: Customer Msgs
  - name: Customer Types
  - name: Customers
  - name: Data Event Recovery Infos
  - name: Data Ext Defs
  - name: Data Exts
  - name: Date Driven Terms
  - name: Deposits
  - name: Employee Defaults
  - name: Employees
  - name: Entities
  - name: Estimates
  - name: Form1099 Category Account Mappings
  - name: General Detail Reports
  - name: General Summary Reports
  - name: Hosts
  - name: Inventory Adjustments
  - name: Inventory Sites
  - name: Invoices
  - name: Item Assemblies Can Builds
  - name: Item Discounts
  - name: Item Fixed Assets
  - name: Item Groups
  - name: Item Inventories
  - name: Item Inventory Assemblies
  - name: Item Non Inventories
  - name: Item Other Charges
  - name: Item Payments
  - name: Item Receipts
  - name: Item Sales Tax Groups
  - name: Item Sales Taxes
  - name: Item Services
  - name: Item Sites
  - name: Item Subtotals
  - name: Items
  - name: Job Reports
  - name: Job Types
  - name: Journal Entries
  - name: Leads
  - name: List Deleteds
  - name: List Displays
  - name: List Merge
  - name: Lists
  - name: Other Names
  - name: Paychecks
  - name: Payment Methods
  - name: Payments
  - name: Payroll Detail Reports
  - name: Payroll Item Additions
  - name: Payroll Item Company Contributions
  - name: Payroll Item Deductions
  - name: Payroll Item Direct Deposits
  - name: Payroll Item Non Wages
  - name: Payroll Item Taxes
  - name: Payroll Item Wages
  - name: Payroll Item Workers Compensations
  - name: Payroll Items
  - name: Payroll Last Periods
  - name: Payroll Liability Adjustments
  - name: Payroll Liability Checks
  - name: Payroll Prior Payments
  - name: Payroll Summary Reports
  - name: Payroll Year To Date Adjustments
  - name: Preferences
  - name: Price Levels
  - name: Purchase Orders
  - name: Qb Command Exec
  - name: Receive Payment To Deposits
  - name: Receive Payments
  - name: Sales Orders
  - name: Sales Receipts
  - name: Sales Reps
  - name: Sales Tax Codes
  - name: Sales Tax Payables
  - name: Sales Tax Payment Checks
  - name: Sales Tax Return Lines
  - name: Sales Tax Returns
  - name: Ship Methods
  - name: Special Accounts
  - name: Special Items
  - name: Standard Terms
  - name: Templates
  - name: Terms
  - name: Time Reports
  - name: Time Trackings
  - name: To Dos
  - name: Transactions
  - name: Transfer Inventories
  - name: Transfers
  - name: Txn Deleteds
  - name: Txn Displays
  - name: Txn Void
  - name: Txns
  - name: Unit Of Measure Sets
  - name: Vehicle Mileages
  - name: Vehicles
  - name: Vendor Credits
  - name: Vendor Types
  - name: Vendors
  - name: Workers Comp Codes
paths:
  /connections/{connection_id}/onboarding-url:
    post:
      tags:
        - Connections
      summary: Regenerate the onboarding URL
      description: >-
        Invalidates the previous onboarding link and returns the connection with
        a fresh `links.onboarding`. Onboarding links expire after 48 hours (see
        the Onboarding guide). It takes no body.
      operationId: regenerateOnboardingUrl
      parameters:
        - description: The connection to act on.
          in: path
          name: connection_id
          required: true
          schema:
            format: uuid
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data:
                    $ref: '#/components/schemas/Connection'
                type: object
          description: Regenerated
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - apiKey: []
components:
  schemas:
    Connection:
      properties:
        app_id:
          format: uuid
          type: string
        backing_off:
          description: >-
            `true` while the Web Connector's last tries couldn't open QuickBooks
            (on that computer it's closed, or a dialog is open) and QuBe Sync is
            spacing its tries out, up to 30 minutes apart.
            `next_check_in_expected_at` is the next try. It ends at the first
            session that reaches QuickBooks, and clicking Update Selected in the
            Web Connector tries straight away.
          type: boolean
        company_file:
          nullable: true
          type: string
        created_at:
          description: >-
            When the connection was made. With `last_connected_at` still `null`,
            it has never connected.
          format: date-time
          type: string
        id:
          format: uuid
          type: string
        last_connected_at:
          format: date-time
          nullable: true
          type: string
        links:
          properties:
            onboarding:
              description: >-
                Send the user here to connect QuickBooks. `null` once used, or
                if never generated.
              format: uri
              nullable: true
              type: string
            self:
              format: uri
              type: string
            ui:
              description: This connection in the QuBe Sync dashboard.
              format: uri
              type: string
          required:
            - self
            - ui
          type: object
        name:
          nullable: true
          type: string
        name_index:
          $ref: '#/components/schemas/NameIndex'
        next_check_in_expected_at:
          description: >-
            When the Web Connector is next expected to check in and pick up
            queued requests, worked out from its last check-in, its schedule and
            any wait QuBe Sync gave it: every 10 seconds for `realtime`, every 5
            minutes for `standard`, up to 30 minutes apart while `backing_off`,
            and slower while a sandbox app's `realtime` connection has nothing
            to do (`next_check_in_reason`). A request queued now is picked up
            then. `null` before the first check-in, and for a `simulated`
            connection that isn't backing off, since it runs as soon as a
            request is queued. A time more than a minute past means the check-in
            is late: a long session is still running (one of your requests is
            `sent`), or the Web Connector isn't running on the QuickBooks
            computer.
          format: date-time
          nullable: true
          type: string
        next_check_in_reason:
          description: >-
            What set `next_check_in_expected_at`. `schedule`: the connection's
            own pace. `backing_off`: the Web Connector's last tries couldn't
            open QuickBooks, as `backing_off`. `sandbox_idle`: a `realtime`
            connection in a sandbox app slows down while it has nothing to do,
            to once a minute after 10 minutes without a request and every 5
            minutes after an hour; the request you queue is picked up at that
            next check-in, and from then it's back to every 10 seconds. Clicking
            Update Selected in the Web Connector runs it at once. `null` when
            `next_check_in_expected_at` is.
          enum:
            - schedule
            - backing_off
            - sandbox_idle
          nullable: true
          type: string
        onboarding_token_expires_at:
          format: date-time
          nullable: true
          type: string
        qbxml_version:
          nullable: true
          type: string
        quickbooks_product_name:
          nullable: true
          type: string
        type:
          description: >-
            How QuickBooks is reached: `standard` (Web Connector polls every 5
            minutes), `realtime` (every 10 seconds), or `simulated` (a fake
            QuickBooks answered by QuBe Sync itself -- connected immediately, no
            Web Connector -- see the CLI/Quickstart guides; in beta: it doesn't
            match real QuickBooks in every case yet). Workflows and name
            matching run on `realtime` and `simulated` connections, not on
            `standard` ones.
          enum:
            - standard
            - realtime
            - simulated
          type: string
        username:
          description: >-
            Generated automatically; this is what the Web Connector
            authenticates as.
          type: string
        webhook_url:
          description: >-
            Where QuBe Sync sends the connection's own events:
            `connection.connected`, `connection.setup_cancelled`,
            `connection.stalled` and `connection.resumed` (see the callback on
            Create a connection). `null` when none is set, and then nothing is
            sent.
          format: uri
          nullable: true
          type: string
      required:
        - id
        - app_id
        - username
        - type
        - links
      type: object
    NameIndex:
      description: >-
        QuBe Sync's index of the names in this connection's company file, for
        finding records by name (see Match a name): customers, vendors,
        employees and other names, items, accounts, classes, and the other lists
        a transaction names (terms, sales tax codes, payment and ship methods,
        price levels, customer, vendor and job types, sales reps and customer
        messages). Only `realtime` and `simulated` connections can have one, and
        it is built the first time something on the connection needs matching: a
        match, or opting in (`POST /connections/{connection_id}/name-index`).
        QuBe Sync then reads the lists from QuickBooks itself, a step at a time,
        and your requests always go first; those reads never appear among your
        requests and never send a webhook. An index unused for 30 days is
        deleted, and built again the next time it's needed.
      properties:
        as_of:
          description: >-
            When the index last caught up with QuickBooks: changes made in
            QuickBooks since then aren't in it yet. While it's used, it catches
            up after a Web Connector session that brought your requests, at most
            every 5 minutes. `null` unless `ready`.
          format: date-time
          nullable: true
          type: string
        records:
          description: >-
            How many records the index holds; while `building`, how many are in
            so far. `null` when `not_built` or `unavailable`.
          nullable: true
          type: integer
        state:
          description: >-
            `ready`: every list is in. `building`: QuBe Sync is reading the
            lists from QuickBooks, the first time, or again after the connection
            was pointed at another company file, went 90 days without your
            requests, or a build gave up. `not_built`: nothing on the connection
            has needed matching yet, or the index went unused for 30 days and
            was deleted. `unavailable`: the connection is `standard`, which
            can't have one.
          enum:
            - ready
            - building
            - not_built
            - unavailable
          type: string
      required:
        - state
        - as_of
        - records
      type: object
    Error:
      description: >-
        What a refused request answers with. The one key is errors, and its
        shape says what went wrong: a sentence when the endpoint explains the
        refusal in words (a parameter the operation does not take, a key already
        taken, a run that has already ended); an object with detail, and a code
        when there is one, when the request named nothing that exists or may not
        do what it asked (402, 403, 404, and a CLI session's 401), or an answer
        to a run's question was refused (the decisions endpoint's 400, 409 and
        422, which always carry a code to branch on); an object of fields, each
        a list of messages, when a record failed validation and nothing was
        saved; a list of {path, message} problems when a submitted document or
        input fails validation. A request without a usable API key gets a 401
        Basic challenge with the plain-text body Unauthorized, not JSON.
      properties:
        errors:
          oneOf:
            - example: 'unknown parameter: "emial"'
              title: A sentence
              type: string
            - properties:
                code:
                  example: read_only_session
                  type: string
                detail:
                  example: Not Found
                  type: string
              required:
                - detail
              title: Detail and code
              type: object
            - additionalProperties:
                items:
                  type: string
                type: array
              example:
                webhook_url:
                  - may not contain a username or password
              title: Field by field
              type: object
            - items:
                properties:
                  message:
                    example: is required
                    type: string
                  path:
                    example: input.customer
                    type: string
                required:
                  - path
                  - message
                type: object
              title: Located problems
              type: array
      required:
        - errors
      type: object
  responses:
    Unauthorized:
      content:
        text/plain:
          example: Unauthorized
          schema:
            type: string
      description: >-
        No usable API key. The key is Basic auth, so the answer is the
        challenge, with the plain-text body Unauthorized rather than JSON.
      headers:
        WWW-Authenticate:
          schema:
            example: Basic realm="Application"
            type: string
    NotFound:
      content:
        application/json:
          example:
            errors:
              detail: Not Found
          schema:
            $ref: '#/components/schemas/Error'
      description: Nothing by that id, or it belongs to another app.
  securitySchemes:
    apiKey:
      description: Use your app's API key as the username, and leave the password blank
      scheme: basic
      type: http

````

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