> ## Documentation Index
> Fetch the complete documentation index at: https://vastai-80aa3a82-auto-openapi-update-8483c1e9.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Invite Team Member

> Sends an email invitation to a user to join the current team with a specified role.



## OpenAPI

````yaml /api-reference/openapi.yaml post /api/v0/team/invite/
openapi: 3.1.0
info:
  title: Vast.ai API
  description: >-
    Vast.ai REST API for managing GPU cloud instances, machine operations, and
    AI/ML workflows.


    ## AI Agent Quick-Start


    Install the CLI skill for your agent (Claude Code, Cursor, Windsurf, etc.):
      npx skills add vast-ai/vast-cli

    CLI reference:
    https://raw.githubusercontent.com/vast-ai/vast-cli/master/vastai/SKILL.md

    SDK reference:
    https://raw.githubusercontent.com/vast-ai/vast-cli/master/vastai_sdk/SKILL.md


    ## Auth

    All endpoints require `Authorization: Bearer $VAST_API_KEY`.

    Get your key at: https://cloud.vast.ai/manage-keys/


    ## Key Quirks

    - `gpu_ram` in CLI = GB; in REST API = MB (CLI auto-converts)

    - SSH keys must be registered BEFORE creating an instance (VM: no recovery;
    Docker: can add post-create)

    - `onstart` field is limited to 4048 characters -- gzip+base64 for longer
    scripts

    - `POST /api/v0/asks/{id}/` (create instance) returns `new_contract` as the
    instance ID, not `id`

    - Poll trap: if `actual_status` becomes `exited`, `unknown`, or `offline` it
    will never reach `running` -- destroy and retry
  version: 1.0.0
  contact:
    name: Vast.ai Support
    url: https://discord.gg/vast
servers:
  - url: https://console.vast.ai
    description: Production server
security:
  - BearerAuth: []
paths:
  /api/v0/team/invite/:
    post:
      tags:
        - Team
      summary: Invite Team Member
      description: >-
        Sends an email invitation to a user to join the current team with a
        specified role.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  description: Email address of the user to invite
                  example: user@example.com
                role:
                  type: string
                  description: Role to assign to the new team member
                  example: developer
      responses:
        '200':
          description: 'Success: {"success": true, "msg": "New invitation sent to <email>"}'
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Always true on success
                  msg:
                    type: string
                    description: Confirmation including the invitee email address
              example:
                success: true
                msg: New invitation sent to user@example.com
        '400':
          description: >-
            Only a team account can invite; missing email or role param; invitee
            cannot get owner role; can't invite yourself; invitee is already a
            member
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: '"Sending account must be verified."'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: '"Invalid role choice for invitee" or "Team metadata not found."'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: >-
            "Error: invitation already sent to <email> only <N> seconds ago."
            (rate limit)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - BearerAuth: []
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
        msg:
          type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: API key must be provided in the Authorization header

````