---
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"

---

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