---
title: "Create a VPC Private Endpoint"
method: POST
path: "/groups/{groupId}/apps/{appId}/security/private_endpoints"
tags: ["security"]
---

# Create a VPC Private Endpoint

`POST /groups/{groupId}/apps/{appId}/security/private_endpoints`

Configure a new private endpoint for the App.

## Request body

- PrivateEndpointCreate
  - `cloud_provider_region` string, required — The cloud provider region that hosts the private endpoint.
  - `cloud_provider_endpoint_id` string, required — The private endpoint ID from the cloud provider.
  - `comment` string — An optional comment that describes the endpoint.
  - `endpoint_type` 'sync' | 'general', required — The type of endpoint. For more information on endpoint types and migrating deprecated endpoints to `"general"` or `"sync"`, see [Use a VPC Private Endpoint](https://www.mongodb.com/docs/atlas/app-services/security/private-endpoints).

## Response `201`

Created

- PrivateEndpoint
  - `_id` string
  - `cloud_provider_region` string — The cloud provider region that hosts the private endpoint.
  - `cloud_provider_endpoint_id` string — The private endpoint ID from the cloud provider.
  - `comment` string — An optional comment that describes the endpoint.
  - `endpoint_type` 'sync' | 'general' | 'legacy' — The type of endpoint. For more information on migrating deprecated `"legacy"` endpoints, see [Migrate Legacy Endpoints](https://www.mongodb.com/docs/atlas/app-services/security/private-endpoints/#migrate-a-legacy-endpoint).

## Other responses

- `400` — - Bad Request - VPC endpoint id (cloud_provider_endpoint_id) is invalid - Endpoint type is "legacy"

## Changes

- **2024-04-18** (v3) `aec31f78ae64` — 3 breaking, 1 warning, 1 info
  - added the new required request property `endpoint_type`
  - the request property `cloud_provider_endpoint_id` became required
  - the request property `cloud_provider_region` became required
  - removed the request property `_id`
  - …1 more
- **2023-05-11** (v3) `ab15c3dfb59e` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/mongodb/apis/mongodb-atlas-app-services-admin-api/changes/groups/:groupId/apps/:appId/security/private_endpoints/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)
