---
title: "Create a new app"
method: POST
path: "/groups/{groupId}/apps"
tags: ["apps"]
---

# Create a new app

`POST /groups/{groupId}/apps`

## Query parameters

- `defaults` boolean
- `product` 'standard' | 'atlas' | 'data-api'

## Request body

- AppConstructor — An object that describes a new app to create
  - `name` string — The name of the application. Must begin with a letter and may only contain ASCII letters, numbers, underscores, and hyphens.
  - `provider_region` union
    - 'aws-us-east-1' | 'aws-us-west-2' | 'aws-us-east-2' | 'aws-eu-central-1' | 'aws-eu-west-1' | 'aws-eu-west-2' | 'aws-ap-southeast-1' | 'aws-ap-southeast-2' | 'aws-ap-south-1' | 'aws-sa-east-1'
    - 'azure-eastus2' | 'azure-westus' | 'azure-westeurope' | 'azure-eastasia' | 'azure-southeastasia'
    - 'gcp-us-central1' | 'gcp-us-east4' | 'gcp-us-west1' | 'gcp-europe-west1' | 'gcp-asia-south1'
  - `location` 'US-VA' | 'US-OR' | 'DE-FF' | 'IE' | 'AU' | 'IN-MB' | 'SG' | 'BR-SP' — An identifier of the location where an app server is physically deployed to, regardless of the cloud provider that hosts the app.
  - `deployment_model` 'GLOBAL' | 'LOCAL' — An application [deployment model](https://www.mongodb.com/docs/atlas/app-services/apps/deploy/deployment-models-and-regions/#deployment-models).
  - `environment` '' | 'development' | 'testing' | 'qa' | 'production' — The application's environment. An empty string indicates that the app does not have a specified environment.
  - `template_id` string — The id of an [App Services template app](https://www.mongodb.com/docs/atlas/app-services/apps/create/template-apps/) to use as a base for the new app.
  - `data_source` union
    - object
      - `name` 'mongodb-atlas', required
      - `type` 'mongodb-atlas', required
      - `config` object, required
        - `clusterName` string, required — The service name used to refer to the data source within this Atlas app. The name may be at most 64 characters long and must only contain ASCII letters, numbers, underscores, and hyphens.
        - `readPreference` 'primary' | 'primaryPreferred' | 'secondary' | 'secondaryPreferred' | 'nearest' — The [read preference](https://www.mongodb.com/docs/atlas/app-services/mongodb/read-preference/) mode for read requests to the data source.
        - `wireProtocolEnabled` boolean — If true, clients may [connect to the app over the MongoDB Wire Protocol](https://www.mongodb.com/docs/atlas/app-services/mongodb/wire-protocol/#connect-over-the-wire-protocol).
    - object
      - `name` 'mongodb-datafederation', required
      - `type` 'datalake', required
      - `config` object, required
        - `dataLakeName` string, required — The service name used to refer to the Federated database instance within this Atlas app. The name may be at most 64 characters long and must only contain ASCII letters, numbers, underscores, and hyphens.

## Response `201`

The application was successfully created.

- AppInstance — A specific, existing application.
  - `name` string — The name of the application. Must begin with a letter and may only contain ASCII letters, numbers, underscores, and hyphens.
  - `provider_region` union
    - 'aws-us-east-1' | 'aws-us-west-2' | 'aws-us-east-2' | 'aws-eu-central-1' | 'aws-eu-west-1' | 'aws-eu-west-2' | 'aws-ap-southeast-1' | 'aws-ap-southeast-2' | 'aws-ap-south-1' | 'aws-sa-east-1'
    - 'azure-eastus2' | 'azure-westus' | 'azure-westeurope' | 'azure-eastasia' | 'azure-southeastasia'
    - 'gcp-us-central1' | 'gcp-us-east4' | 'gcp-us-west1' | 'gcp-europe-west1' | 'gcp-asia-south1'
  - `location` 'US-VA' | 'US-OR' | 'DE-FF' | 'IE' | 'AU' | 'IN-MB' | 'SG' | 'BR-SP' — An identifier of the location where an app server is physically deployed to, regardless of the cloud provider that hosts the app.
  - `deployment_model` 'GLOBAL' | 'LOCAL' — An application [deployment model](https://www.mongodb.com/docs/atlas/app-services/apps/deploy/deployment-models-and-regions/#deployment-models).
  - `environment` '' | 'development' | 'testing' | 'qa' | 'production' — The application's environment. An empty string indicates that the app does not have a specified environment.
  - `_id` string — The application's unique internal ID.
  - `client_app_id` string — The application's public App ID.
  - `domain_id` string — The application's associated domain ID.
  - `group_id` string — The application's [Atlas Project/Group ID](https://docs.atlas.mongodb.com/tutorial/manage-projects/).
  - `last_used` integer — The time this app was last used in [UNIX time](https://en.wikipedia.org/wiki/Unix_time) (i.e. the number of seconds since Jan 1, 1970).
  - `last_modified` integer — The time this app was last modified in [UNIX time](https://en.wikipedia.org/wiki/Unix_time) (i.e. the number of seconds since Jan 1, 1970).
  - `product` 'standard' | 'atlas' | 'data-api' — The product this app is for.

## Other responses

- `400` — There is an error in the request.

---

[API](https://skmtc.dev/mongodb/apis/mongodb-atlas-app-services-admin-api.md) · [All operations](https://skmtc.dev/mongodb/apis/mongodb-atlas-app-services-admin-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/mongodb/mongodb-atlas-app-services-admin-api/revisions/eb671cf4e125/schema)
