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

# Preview an invite link

> What this invite link lets a guest choose. No account needed.

Call it to render the guest's language chooser, which needs both of its answers:
`active_languages` is exactly the set the join will accept, so offer those and nothing
else, and `languages_required` is how many of them the guest picks — one for a `dual`
room, two for a `mono` one, and `null` for a room whose mode is not settled yet, where
either count is accepted and the guest's choice fixes it.

`active_languages` narrows to two once the room holds two languages, and widens again
when someone disconnects — so read it right before showing the chooser rather than
reusing an older response.

Nothing about the organization behind the room is returned.

A code that is unknown, malformed or revoked returns 404 — all alike, so nothing here
confirms whether a link ever existed. So does one whose signature does not check out:
every code we issue is signed, and a code that was mistyped or built by hand is refused
as not ours. Send the code exactly as `POST /v1/rooms/{room_id}/invites` returned it.

A code that *was* valid returns 410 once it has expired, once its uses are spent, or
once the room has ended; the message says which, because at that point the only
decision left is whether to ask for a new link.



## OpenAPI

````yaml https://api.staging.glot.com/openapi.json get /v1/invites/{invite_code}
openapi: 3.1.0
info:
  title: glot-api
  version: 0.1.0
servers:
  - url: https://api.staging.glot.com
security: []
tags:
  - name: rooms
    description: Create translation rooms and let participants join them.
  - name: invites
    description: Invite links that let a guest join a room without an account.
  - name: usage
    description: Minutes and charges over time, for reporting and charts.
  - name: billing
    description: Buy prepaid credit and review the balance behind it.
  - name: api-keys
    description: Create and revoke keys used to authenticate requests.
  - name: supported-languages
    description: Languages available for translation.
  - name: users
    description: The authenticated user's own profile.
paths:
  /v1/invites/{invite_code}:
    get:
      tags:
        - invites
      summary: Preview an invite link
      description: >-
        What this invite link lets a guest choose. No account needed.


        Call it to render the guest's language chooser, which needs both of its
        answers:

        `active_languages` is exactly the set the join will accept, so offer
        those and nothing

        else, and `languages_required` is how many of them the guest picks — one
        for a `dual`

        room, two for a `mono` one, and `null` for a room whose mode is not
        settled yet, where

        either count is accepted and the guest's choice fixes it.


        `active_languages` narrows to two once the room holds two languages, and
        widens again

        when someone disconnects — so read it right before showing the chooser
        rather than

        reusing an older response.


        Nothing about the organization behind the room is returned.


        A code that is unknown, malformed or revoked returns 404 — all alike, so
        nothing here

        confirms whether a link ever existed. So does one whose signature does
        not check out:

        every code we issue is signed, and a code that was mistyped or built by
        hand is refused

        as not ours. Send the code exactly as `POST /v1/rooms/{room_id}/invites`
        returned it.


        A code that *was* valid returns 410 once it has expired, once its uses
        are spent, or

        once the room has ended; the message says which, because at that point
        the only

        decision left is whether to ask for a new link.
      operationId: get_invite_v1_invites__invite_code__get
      parameters:
        - name: invite_code
          in: path
          required: true
          schema:
            type: string
            title: Invite Code
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvitePreviewResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    InvitePreviewResponse:
      properties:
        active_languages:
          items:
            $ref: '#/components/schemas/SupportedLanguageResponse'
          type: array
          title: Active Languages
          description: >-
            The languages this room will still accept, alphabetically by name —
            offer exactly these and nothing else.


            **The limit is on languages, not on people.** A room translates
            between at most two languages, but any number of guests may join it:
            a hundred people speaking those two languages are all admitted, and
            this list does not shrink as they arrive.


            So it narrows only as *languages* are taken up. While the room holds
            fewer than two, every supported language is offered — a guest may
            join the one already being spoken, or bring the second. Once two are
            in use, those two are offered from then on, however many people
            join; a third language would have no translator. The list widens
            again on its own once everyone speaking a language has disconnected
            and freed it.


            When `languages_required` is 2 the guest picks a *pair* from this
            list, and the pair has to fit the same two-language limit — so if
            the room already holds one language, the pair must include it.


            An empty list means the link cannot be redeemed right now; `mode`
            and `room_status` say why.
        mode:
          anyOf:
            - type: string
            - type: 'null'
          title: Mode
          description: >-
            How this room's audio reaches the translator: `dual` when each
            speaker joins from their own device, `mono` when one device carries
            both. A link works in a room of either mode, and minting one neither
            sets nor changes it.


            `null` means no mode has been settled yet — the first join token for
            the room decides it, and this guest's may be that token. What it
            implies for the guest is on `languages_required`, which is the field
            to read.
        languages_required:
          anyOf:
            - type: integer
            - type: 'null'
          title: Languages Required
          description: >-
            **How many of `active_languages` the guest must send** to `POST
            /v1/invites/{invite_code}/join`. `1` for a `dual` room, `2` for a
            `mono` room — where one device carries both speakers, so one
            connection carries both their languages. Sending a different count
            returns 409 without spending a use.


            `null` when the room has no mode yet: either count is accepted, and
            whichever the guest sends fixes the room's mode for its lifetime.
            Offer one language in that case unless you know the guest is sharing
            a device.
        room_status:
          type: string
          title: Room Status
          description: >-
            `created` before anyone has joined, `active` once the call is
            running. A `finished` room has no usable link, so this link would
            already have returned 410 rather than reporting it.
      type: object
      required:
        - active_languages
        - mode
        - languages_required
        - room_status
      title: InvitePreviewResponse
      description: >-
        What a guest holding an invite link may choose, without signing in.


        Everything a language chooser needs and nothing about the organization
        behind the

        room. Read it right before showing the chooser: a room's languages
        change as people

        join and leave, so a preview fetched minutes earlier can be stale.


        **An empty `active_languages` means this link cannot be redeemed right
        now** — there

        is no language the join would accept. `mode` and `room_status` say why.


        Read it with `languages_required`: together they are the whole chooser —
        which

        languages to offer, and how many the guest must pick.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SupportedLanguageResponse:
      properties:
        code:
          type: string
          title: Code
        name:
          type: string
          title: Name
      type: object
      required:
        - code
        - name
      title: SupportedLanguageResponse
      description: >-
        A language available for translation, and the BCP-47 `code` used to
        request it.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````

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