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

# Create a distribution invitation

> Mints an invitation from the calling publisher account to a distributor firm. The response carries the one-time token and the public landing link. Root and admin roles only. Refused when the firm already holds an outstanding invitation or a distribution from this publisher.



## OpenAPI

````yaml /api-reference/endpoint/distribution/openapi.json post /accounts/distribution-invite
openapi: 3.1.0
info:
  title: quiva.ai Distribution API
  description: >-
    API for distributing products from a publisher account to distributor
    accounts: invitations, the distribution register, product definitions,
    messages between the two sides and config id reservations.
  version: 1.0.0
  contact:
    name: quiva.ai Support
    url: https://app.quiva.ai
servers:
  - url: https://api.quiva.ai
    description: Production API server
security:
  - bearerAuth: []
  - apiKeyAuth: []
tags:
  - name: Distribution Invitations
    description: >-
      Mint, deliver, preview and redeem invitations that connect a distributor
      to a publisher
  - name: Distribution Register
    description: The register of distributions between a publisher and its distributors
  - name: Distributor Setup
    description: Distributor features, space template and space bindings
  - name: Distribution Products
    description: Product definitions and the products a distributor may work under
  - name: Distribution Messages
    description: Messages sent between the two sides of a distribution
  - name: Config Reservations
    description: Reservations of record config ids
paths:
  /accounts/distribution-invite:
    post:
      tags:
        - Distribution Invitations
      summary: Create a distribution invitation
      description: >-
        Mints an invitation from the calling publisher account to a distributor
        firm. The response carries the one-time token and the public landing
        link. Root and admin roles only. Refused when the firm already holds an
        outstanding invitation or a distribution from this publisher.
      operationId: createDistributionInvite
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateDistributionInviteRequest'
      responses:
        '200':
          description: Invitation created
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    $ref: '#/components/schemas/CreateDistributionInviteResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    CreateDistributionInviteRequest:
      type: object
      properties:
        products:
          type: array
          items:
            $ref: '#/components/schemas/InviteProduct'
        distribution_id:
          type: string
          description: Generated when absent
        scope:
          type: array
          items:
            type: string
        expiry_days:
          type: integer
          description: Default 14, maximum 90
        space_id:
          type: string
          description: Space where the distributor firm and its distributions are filed
        brokerage_name:
          type: string
          description: Name of the distributor firm
        abn:
          type: string
        afsl_number:
          type: string
        primary_contact_name:
          type: string
        primary_contact_email:
          type: string
          format: email
        primary_contact_phone:
          type: string
        address:
          type: string
        distribution_agreement_ref:
          type: string
        activity_signal_enabled:
          type: boolean
        status_map:
          type: object
          additionalProperties:
            type: string
        publisher_gateway_id:
          type: string
        ingress_path_format:
          type: string
        bind_path_format:
          type: string
        request_path_format:
          type: string
        return_path:
          type: string
      required:
        - products
        - brokerage_name
        - space_id
    CreateDistributionInviteResponse:
      type: object
      properties:
        invite_id:
          type: string
        token:
          type: string
          description: Bearer credential, shown once
        invite_url:
          type: string
          description: Public landing page
        expires_at:
          type: integer
          description: Unix seconds
        distribution_id:
          type: string
        products:
          type: array
          items:
            $ref: '#/components/schemas/InviteProduct'
        brokerage_name:
          type: string
        steps:
          type: array
          items:
            $ref: '#/components/schemas/ProvisioningStep'
        outstanding:
          type: array
          items:
            type: string
    Error:
      type: object
      properties:
        error:
          type: string
    InviteProduct:
      type: object
      properties:
        product_id:
          type: string
        version:
          type: string
          description: Empty tracks the latest version
        product_name:
          type: string
        type:
          type: string
        commission_cap:
          type: number
          description: Per-product cap, a percentage
        clear_commission_cap:
          type: boolean
      required:
        - product_id
    ProvisioningStep:
      type: object
      properties:
        name:
          type: string
        done:
          type: boolean
        detail:
          type: string
      required:
        - name
        - done
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````

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