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

# Preview an invitation

> Shows which team and role an invitation is for, without accepting it. The invitation must be for your account's email address. Your account must be verified.



## OpenAPI

````yaml /spec/platform-teams.yaml get /v2/teams/invitations/get-team-info
openapi: 3.0.1
info:
  title: Teams & Access
  version: 1.0.0
  description: >
    Create teams, invite people, and control what each member can do.


    A team is a separate account that owns its own resources and billing.

    Members work on the team's resources with their own API token by adding

    `teamID` to their requests. Access comes from two places:


    - **Role permissions** apply across the whole team. Every member has
      exactly one role.
    - **Resource permissions** give one member access to one specific
      resource, such as a single app or database.

    A request is allowed if either source grants a required permission.


    Every team starts with these built-in roles:


    | Role | Permissions |

    |------|-------------|

    | مالک | `manage` and `create` on every resource type, plus `billing.manage`
    and `team.manage`. The team creator always has this role. |

    | مدیر | `manage` and `create` on every resource type |

    | گرداننده | `operate` on every resource type |

    | بازرس | `view` on every resource type |

    | حسابدار | `billing.manage` |

    | مهمان | No permissions |


    The number of members, custom roles and resource permissions per team,

    and the number of teams per user, are limited.
servers:
  - url: https://api.liara.ir
security:
  - bearerAuth: []
tags:
  - name: Teams
    description: Create, list, rename and delete teams.
  - name: Invitations
    description: Invite people to a team and accept invitations.
  - name: Members
    description: List members, remove them, change their role, or leave a team.
  - name: Roles
    description: List roles and manage custom roles.
  - name: Resource Permissions
    description: Give members access to specific resources.
paths:
  /v2/teams/invitations/get-team-info:
    get:
      tags:
        - Invitations
      summary: Preview an invitation
      description: >-
        Shows which team and role an invitation is for, without accepting it.
        The invitation must be for your account's email address. Your account
        must be verified.
      operationId: getInvitationInfo
      parameters:
        - $ref: '#/components/parameters/InvitationToken'
      responses:
        '200':
          description: The team and role of the invitation.
          content:
            application/json:
              schema:
                type: object
                properties:
                  teamID:
                    type: string
                  teamName:
                    type: string
                  teamColor:
                    $ref: '#/components/schemas/TeamColor'
                  roleID:
                    type: string
                  roleName:
                    type: string
              example:
                teamID: '000000000000000000000002'
                teamName: my-team
                teamColor: CARBON_SEA
                roleID: '000000000000000000000020'
                roleName: گرداننده
        '400':
          $ref: '#/components/responses/InvitationBadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/InvitationForbidden'
        '409':
          $ref: '#/components/responses/AlreadyJoined'
components:
  parameters:
    InvitationToken:
      name: token
      in: query
      required: true
      description: The `token` from the invitation link.
      schema:
        type: string
      example: <invitation-token>
  schemas:
    TeamColor:
      type: string
      enum:
        - PURPLE_FIRE
        - GOLDEN_NATURE
        - WOLF_AND_MIST
        - CARBON_SEA
        - WINTER_FOG
        - RED_SEA
    Error:
      type: object
      description: Standard error body.
      properties:
        statusCode:
          type: integer
        error:
          type: string
          description: HTTP status text.
        message:
          type: string
          description: What went wrong.
        data:
          type: object
          nullable: true
          description: >-
            Extra details. When present, `code` is a stable, machine-readable
            error code.
          properties:
            code:
              type: string
    AuthError:
      type: object
      description: Error body returned when the API token is rejected.
      properties:
        error:
          type: string
  responses:
    InvitationBadRequest:
      description: >-
        The invitation token is missing, invalid or expired
        (`invalid_invitation_token`), or you're already in the maximum number of
        teams (`max_teams_reached`).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            statusCode: 400
            error: Bad Request
            message: Invalid invitation token
            data:
              code: invalid_invitation_token
    Unauthorized:
      description: The API token is missing, invalid or expired.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AuthError'
          example:
            error: Unauthorized.
    InvitationForbidden:
      description: >-
        The invitation is for a different email address, was cancelled or
        already used, or its team no longer exists (`invalid_invitation_token`);
        or your account isn't verified (`account_verification_required`).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            statusCode: 403
            error: Forbidden
            message: Invalid invitation token
            data:
              code: invalid_invitation_token
    AlreadyJoined:
      description: You're already a member of this team.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            statusCode: 409
            error: Conflict
            message: You are already joined to this team
            data:
              code: already_joined
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Send your API token as `Authorization: Bearer <api-token>`.'

````

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