.. _mongocli-iam-projects-invitations-invite:

========================================
mongocli iam projects invitations invite
========================================

.. default-domain:: mongodb

.. contents:: On this page
   :local:
   :backlinks: none
   :depth: 1
   :class: singlecol

Invite the specified MongoDB user to your project.

To use this command, you must authenticate with a user account or an API key with the Project User Admin role.

Syntax
------

.. code-block::
   :caption: Command Syntax

   mongocli iam projects invitations invite <email> [options]

.. Code end marker, please don't delete this comment

Arguments
---------

.. list-table::
   :header-rows: 1
   :widths: 20 10 10 60

   * - Name
     - Type
     - Required
     - Description
   * - email
     - string
     - true
     - Email address that belongs to the user that you want to invite to the project.

Options
-------

.. list-table::
   :header-rows: 1
   :widths: 20 10 10 60

   * - Name
     - Type
     - Required
     - Description
   * - -h, --help
     - 
     - false
     - help for invite
   * - -o, --output
     - string
     - false
     - Output format. Valid values are json, json-path, go-template, or go-template-file. To see the full output, use the -o json option.
   * - --projectId
     - string
     - false
     - Hexadecimal string that identifies the project to use. This option overrides the settings in the configuration file or environment variable.
   * - --role
     - strings
     - true
     - User's roles for the associated project. Valid values include GROUP_CLUSTER_MANAGER, GROUP_DATA_ACCESS_ADMIN, GROUP_DATA_ACCESS_READ_ONLY, GROUP_DATA_ACCESS_READ_WRITE, GROUP_OWNER, GROUP_READ_ONLY, GROUP_AUTOMATION_ADMIN, GROUP_BACKUP_ADMIN, and GROUP_MONITORING_ADMIN.
   * - --teamId
     - strings
     - false
     - Unique 24-digit string that identifies the team.

Inherited Options
-----------------

.. list-table::
   :header-rows: 1
   :widths: 20 10 10 60

   * - Name
     - Type
     - Required
     - Description
   * - -P, --profile
     - string
     - false
     - Name of the profile to use from your configuration file. To learn about profiles for MongoCLI, see https://dochub.mongodb.org/core/atlas-cli-configuration-file.

Examples
--------

.. code-block::
   :copyable: false

   # Invite the MongoDB user with the email user@example.com to the project with the ID 5f71e5255afec75a3d0f96dc with GROUP_READ_ONLY access:
   mongocli iam projects invitations invite user@example.com --projectId 5f71e5255afec75a3d0f96dc --role GROUP_READ_ONLY --output json
