Navigation

Create an Organization

Base URL: https://cloud.mongodb.com/api/public/v1.0

Syntax

POST /api/public/v1.0/orgs

Request Parameters

Request Path Parameters

This endpoint does not use HTTP request path parameters.

Request Query Parameters

Field Required/Optional Description
envelope Optional.

A boolean that specifies whether or not to wrap the response in an envelope.

Defaults to false.

pretty Optional.

A boolean that specifies whether or not to return a “pretty-printed” JSON document.

Defaults to false.

Request Body Parameters

Name Type Description
name string The name of the organization you want to create.

Response Elements

Name Description
id The unique identifier for the organization.
name The name of the organization.

Examples

Example Request

curl -u "username:apiKey" --digest -H "Content-Type: application/json" -X POST "https://cloud.mongodb.com/api/public/v1.0/orgs" --data '{ "name" : "myNewOrganization" }'

Example Response

Response Header

HTTP/1.1 401 Unauthorized
Content-Type: application/json;charset=ISO-8859-1
Date: {dateInUnixFormat}
WWW-Authenticate: Digest realm="MMS Public API", domain="", nonce="{nonce}", algorithm=MD5, op="auth", stale=false
Content-Length: {requestLengthInBytes}
Connection: keep-alive
HTTP/1.1 200 OK
Vary: Accept-Encoding
Content-Type: application/json
Strict-Transport-Security: max-age=300
Date: {dateInUnixFormat}
Connection: keep-alive
Content-Length: {requestLengthInBytes}

Response Body

{"id":"5a38289880eef5072af2f1f1","name":"myNewOrganization"}