---
title: "Update the PostgreSQL private endpoint"
method: PATCH
path: "/v1/organizations/{organizationId}/postgres/{postgresId}/privateEndpoint"
tags: ["Postgres"]
---

# Update the PostgreSQL private endpoint

`PATCH /v1/organizations/{organizationId}/postgres/{postgresId}/privateEndpoint`

## Request

- Base URL: `https://api.clickhouse.cloud`
- URL: `https://api.clickhouse.cloud/v1/organizations/{organizationId}/postgres/{postgresId}/privateEndpoint`
- Auth: HTTP basic

**This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Approves VPC endpoints by ID and sets the supported regions. At least one of `allowedVpcEndpoints` and `supportedRegions` is required, and each one provided replaces the existing list in full, so include every entry to keep. Private endpoints are available only for AWS Postgres services, and only for organizations with the feature enabled. Available on the Scale and Enterprise plans; Basic organizations get a 403.

## Path parameters

- `organizationId` string, uuid, required
- `postgresId` string, uuid, required

## Request body

- PostgresPrivateEndpointPatchRequest
  - `allowedVpcEndpoints` PostgresPrivateEndpointVpcEndpoint[]: Full replacement of the approved VPC endpoints: endpoints not listed are no longer allowed to connect. Each endpoint ID must be unique.
    - `vpcEndpointId` string, required: ID of the AWS VPC endpoint that is allowed to connect.
    - `description` string: Optional description of the VPC endpoint.
  - `supportedRegions` string[]: Full replacement of the supported regions. AWS region IDs, other than the service region, from which VPC endpoints can connect, such as `us-west-2`. The service region is always supported and must not be listed. Requires cross-region private endpoints to be enabled for the organization.

## Response `200`

Successful response

- object
  - `status` number: HTTP status code.
  - `requestId` string, uuid: Unique id assigned to every request. UUIDv4
  - `result` PostgresPrivateEndpoint
    - `state` string, required: State of the private endpoint service: one of 'creating', 'available', 'deleting'. More states may be added. It is `creating` for about 5 to 10 minutes after creation, then `available`.
    - `endpointServiceName` string: Name of the AWS endpoint service. Use it as the service name when creating a VPC endpoint. Omitted until the service is created.
    - `endpointServiceId` string: ID of the AWS endpoint service. Omitted until the service is created.
    - `privateHostname` string: Hostname that resolves to the Postgres service from an approved VPC endpoint. Omitted until the service is available.
    - `privateDnsName` string: Private DNS name of the endpoint service. Omitted until it is assigned.
    - `privateDnsVerificationState` string: Verification state of the private DNS name. Omitted until it is assigned.
    - `ipAddressType` string, required: IP address type of the endpoint service.
    - `ports` PostgresPrivateEndpointPort[], required: Ports the endpoint service forwards.
      - `port` integer, required: Port exposed by the endpoint service.
      - `targetPort` integer, required: Port on the Postgres service it forwards to.
    - `supportedRegions` string[], required: AWS region IDs, other than the service region, from which VPC endpoints can connect, such as `us-west-2`. The service region is always supported and must not be listed. Requires cross-region private endpoints to be enabled for the organization.
    - `allowedVpcEndpoints` PostgresPrivateEndpointVpcEndpoint[], required: VPC endpoints approved to connect.
      - `vpcEndpointId` string, required: ID of the AWS VPC endpoint that is allowed to connect.
      - `description` string: Optional description of the VPC endpoint.

## Other responses

- `400`: The request cannot be processed due to a client error. Please verify your request parameters and try again.
- `403`: The caller lacks permission on the Postgres service, private endpoints are not enabled for the organization, the organization is on the Basic plan, a requested region is not enabled for it, or the request comes from a restricted country.
- `404`: The Postgres service does not exist, or it has no private endpoint.
- `500`: An internal server error has occurred. If this issue persists, please contact ClickHouse Cloud support for assistance.

## Changes

- **2026-12-02** `dd7b68280285`: 2 info
  - added the non-success response with the status `403`
  - added the non-success response with the status `404`
- **2026-11-19** `e89771bdf991`: 1 breaking
  - removed the required property `result/id` from the response with the `200` status
- **2026-11-17** `c0b2c701c12e`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/clickhouse/apis/openapi-spec-for-clickhouse-cloud/changes/v1/organizations/:organizationId/postgres/:postgresId/privateEndpoint/patch.md)

---

[API](https://skmtc.dev/clickhouse/apis/openapi-spec-for-clickhouse-cloud.md) - [All operations](https://skmtc.dev/clickhouse/apis/openapi-spec-for-clickhouse-cloud/llms.txt) - [OpenAPI document](https://skmtc.dev/clickhouse/apis/openapi-spec-for-clickhouse-cloud/revisions/eac345053548?raw)
