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

# Invite Accounts

> Operator bulk invitation by account. Without `accounts` it walks the
person accounts 100 per call (`cursor: next_cursor` until `has_more`
is false). Each account whose onboarding is pending (customer-
onboarding D-40) gets its open onboarding — one is opened for the
business unit of its Maihue subscription when none exists — and that
onboarding's invitation; `force_resend` resends. Prefer
`POST /maihue/onboarding/invite`. Requires
`customer-onboarding:invite`.




## OpenAPI

````yaml POST /portal/customer/onboarding/invitation
openapi: 3.0.1
info:
  title: Portal Customer Onboarding API
  description: |
    The customer portal wizard over the session's open Maihue onboardings
    (maihue/onboarding D-01, D-04). The session must belong to the primary
    user of a person account or the legal representative of a company, of a
    `CHL_RUT` account, with at least one open onboarding that was invited.

    - Shared steps (consent and password per user, identity per account)
      complete in **every** open onboarding at once.
    - The payment step belongs to one onboarding: `payment/confirm` names it
      and stores the confirmed method on it.
    - The gate (`required`) is enforced only with the `maihue-onboarding`
      flag on; with it off the steps still work and nobody is redirected.
  version: '2026-10-21'
servers:
  - description: Production
    url: https://api.bbrands.io/api/v3
  - description: Certification
    url: https://certification.api.bbrands.io/api/v3
  - description: Development
    url: https://development.api.bbrands.io/api/v3
security:
  - bearerAuth: []
tags:
  - name: Portal Customer Onboarding
    description: Wizard state and steps of the session.
  - name: Onboarding Invitations (operator)
    description: Account-based invitation routes kept for Horizon Enterprise.
paths:
  /portal/customer/onboarding/invitation:
    post:
      tags:
        - Onboarding Invitations (operator)
      summary: Invite accounts
      description: |
        Operator bulk invitation by account. Without `accounts` it walks the
        person accounts 100 per call (`cursor: next_cursor` until `has_more`
        is false). Each account whose onboarding is pending (customer-
        onboarding D-40) gets its open onboarding — one is opened for the
        business unit of its Maihue subscription when none exists — and that
        onboarding's invitation; `force_resend` resends. Prefer
        `POST /maihue/onboarding/invite`. Requires
        `customer-onboarding:invite`.
      operationId: customerOnboardingInvitation
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - dry_run
              additionalProperties: false
              properties:
                accounts:
                  type: array
                  maxItems: 500
                  items:
                    type: string
                    format: uuid
                cursor:
                  type: string
                  format: uuid
                dry_run:
                  type: boolean
                force_resend:
                  type: boolean
      responses:
        '200':
          description: Tally
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      total:
                        type: integer
                      enqueued:
                        type: integer
                      already_sent:
                        type: integer
                      skipped:
                        type: integer
                      failed:
                        type: integer
                      has_more:
                        type: boolean
                      next_cursor:
                        type: string
                        format: uuid
                        nullable: true
                  message:
                    type: string
                  meta:
                    $ref: '#/components/schemas/Meta'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  schemas:
    Meta:
      type: object
      properties:
        correlation:
          type: string
        status:
          type: integer
        timestamp:
          type: string
          format: date-time
        version:
          type: string
          nullable: true
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            errors:
              type: array
              items: {}
            message:
              type: string
        meta:
          $ref: '#/components/schemas/Meta'
  responses:
    BadRequest:
      description: Validation error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Missing or invalid session
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Forbidden:
      description: >-
        `onboarding-not-invited`, `type-dni-not-supported`, not the recipient
        role, or `portal-customer-onboarding` off
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

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