mongocli iam organization create

The mongocli iam organization create command creates a new Cloud Manager or Ops Manager organization.

You must have the Global Owner role to create an organization.

mongocli iam organization|organizations|org|orgs create <organization-name>
[ --output|-o <output-format> ]
[ --profile|-P <profile-name> ]

The service for which the organization is created is determined by your profile.


Use -h or --help to view the command-line help for this command.

--output, -o

Command output format. Valid values are:

  • json for output in JSON format
  • go-template for custom output using the Go template
  • go-template-file for custom output specified using the Go template file

If omitted, the command returns output in the default format.

--profile, -P

Name of the profile where your credentials are saved.

You must have credentials with the Global Owner role to create an organization. You can use either a Global API key pair or a Personal API key:

Credential Type
public_api_key Value
private_api_key Value
Global API Keys
Public Global API key
Private Global API key
Personal API Key
Cloud Manager or Ops Manager username
Personal API key

The profile must include a service value of either:

  • "ops-manager" for an Ops Manager organization, or
  • "cloud-manager" for a Cloud Manager organization.

If omitted, uses the default profile. To learn more about creating a profile, see Configure the MongoDB CLI.


The command prints following fields in the specified format to the terminal if the command succeeds. If the command returns errors, see Troubleshooting for recommended solutions.

Unique identifier of the organization.
One or more links to sub-resources and/or related resources. The relations between URLs are explained in the Web Linking Specification.
Name of the organization.

The following command creates an Ops Manager organization called myOrg using the default profile, which contains the Global Owner credentials and specifies the Ops Manager service:

mongocli iam organization create myOrg --output json

The previous command creates the Ops Manager organization myOrg and prints the following in the specified format to the terminal. For more information on these fields, see Output.

"id": "abcdefghi123456789",
"isDeleted": false,
"links": [
"rel": "self",
"href": ""
"rel": "",
"href": ""
"rel": "",
"href": ""
"rel": "",
"href": ""
"name": "myOrg"
Give Feedback