Docs Menu

Create a Realm App with Realm API

On this page

  • Prerequisites
  • Procedure
  • Authenticate a MongoDB Atlas User
  • Get the Group ID
  • Create a new Realm App

You can use the Realm Admin API to create a new server-side Realm app.


Use your MongoDB Cloud API key pair to call the authentication endpoint:

curl --request POST \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data '{"username": "<Public API Key>", "apiKey": "<Private API Key>"}' \

If authentication succeeds, MongoDB Realm returns an access token as part of the JSON response document:

"access_token": "<access_token>",
"refresh_token": "<refresh_token>",
"user_id": "<user_id>",
"device_id": "<device_id>"

Save the access_token, which you'll use as the Bearer token to authenticate in the upcoming steps.

See also:

To delete a Realm app you will need to find the Group ID in Atlas.

Follow these steps and save the Group ID for the last step.


You can create a new Realm app through the create endpoint.

Your request should include:

  • The access_token from step 1 in a Bearer token Authorization header.
  • The Group ID from step 2.
  • A name for your new app.

If creation succeeds, the MongoDB Realm returns a 201 response and a JSON document.

←  Create a Realm App with Realm CLITemplate Apps →
Give Feedback
© 2022 MongoDB, Inc.


  • Careers
  • Investor Relations
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2022 MongoDB, Inc.