---
title: "Create a Deployment Draft"
method: POST
path: "/groups/{groupId}/apps/{appId}/drafts"
tags: ["deploy"]
---

# Create a Deployment Draft

`POST /groups/{groupId}/apps/{appId}/drafts`

Create a new application deployment draft, if none exists.

## Response `201`

Successfully created draft.

- DeploymentDraft
  - `_id` string — The unique ID of the draft.
  - `user_id` string — The unique `_id` value of the MongoDB Cloud user that created the draft.
  - `app` 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/deployment-models-and-regions/#deployment-models).
    - `environment` 'development' | 'testing' | 'qa' | 'production' — The application's 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' | 'device-sync' — The product this app is for.

## Other responses

- `409` — Draft already exists

## Changes

- **2024-02-20** (v3) `e2240dd053bd` — 1 breaking, 6 info
  - the `app/allOf[#/components/schemas/App]/environment` response's property type/format changed from `string`/`` to ``/`` for status `201`
  - added `#/components/schemas/AppEnvironment, subschema #1` to the `app/allOf[#/components/schemas/App]/environment` response property `allOf` list for the response status `201`
  - removed the `` enum value from the `app/allOf[#/components/schemas/App]/environment` response property for the response status `201`
  - removed the `development` enum value from the `app/allOf[#/components/schemas/App]/environment` response property for the response status `201`
  - …3 more
- **2023-12-04** (v3) `1d1564c0dca1` — 1 breaking, 1 info
  - removed the success response with the status `200`
  - added the success response with the status `201`

[Change history](https://skmtc.dev/mongodb/apis/mongodb-atlas-app-services-admin-api/changes/groups/:groupId/apps/:appId/drafts/post.md)

---

[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/1365ab72bc03/schema)
