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

# Preview an invitation

> Public. Answers who invited the holder of a token and to what, before the recipient has an account. Writes nothing and withholds contact details. An invalid or expired token answers 200 with `redeemable: false` and a `reason`. The token may also be sent as a `token` query parameter.



## OpenAPI

````yaml /api-reference/endpoint/distribution/openapi.json post /accounts/preview-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/preview-distribution-invite:
    post:
      tags:
        - Distribution Invitations
      summary: Preview an invitation
      description: >-
        Public. Answers who invited the holder of a token and to what, before
        the recipient has an account. Writes nothing and withholds contact
        details. An invalid or expired token answers 200 with `redeemable:
        false` and a `reason`. The token may also be sent as a `token` query
        parameter.
      operationId: previewDistributionInvite
      parameters:
        - name: token
          in: query
          description: Invitation token, when not sent in the body
          required: false
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                token:
                  type: string
                  description: Invitation token
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    $ref: '#/components/schemas/DistributionInviteView'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security: []
components:
  schemas:
    DistributionInviteView:
      type: object
      properties:
        invite_id:
          type: string
        publisher_name:
          type: string
        products:
          type: array
          items:
            $ref: '#/components/schemas/InviteProduct'
        scope:
          type: array
          items:
            type: string
        expires_at:
          type: integer
        redeemable:
          type: boolean
        reason:
          type: string
          description: Why the token is not redeemable
        brokerage_name:
          type: string
        branding:
          type: object
          properties:
            display_name:
              type: string
            logo_data_uri:
              type: string
            accent_color:
              type: string
            muted_color:
              type: string
        product_type:
          type: string
        required_roles:
          type: array
          items:
            type: string
      required:
        - redeemable
    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
  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.