---
title: "POST /subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/checkNameAvailability"
method: POST
path: "/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/checkNameAvailability"
---

# POST /subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/checkNameAvailability

`POST /subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/checkNameAvailability`

Checks availability of a cluster name. Cluster names should be globally unique; at least 3 characters and at most 40 characters long; they must only contain lowercase letters, numbers, and hyphens; and must not start or end with a hyphen.

## Parameters

- `../../../../../../common-types/resource-management/v4/types.json#/components/parameters/ApiVersionParameter` — unresolved $ref
- `../../../../../../common-types/resource-management/v4/types.json#/components/parameters/SubscriptionIdParameter` — unresolved $ref

## Request body

- NameAvailabilityRequest — Request from client to check cluster name availability.
  - `name` string, required — Cluster name to verify.
  - `type` 'Microsoft.DBforPostgreSQL/serverGroupsv2', required — Resource type used for name availability verification.

## Response `200`

The request has succeeded.

- NameAvailability — Represents cluster name availability.
  - `message` string — Error message.
  - `nameAvailable` boolean — Indicates whether the cluster name is available.
  - `name` string — Name of the cluster.
  - `type` string — Type of the cluster.

## Other responses

- `default` — An unexpected error response.

## Changes

- **2026-07-13** `07bfe9612bb7` — 1 info
  - api tag `Clusters` removed

[Change history](https://skmtc.dev/azure/apis/postgresqlhsc-microsoft-dbforpostgresql-postgresqlhsc/changes/subscriptions/:subscriptionId/providers/Microsoft.DBforPostgreSQL/checkNameAvailability/post.md)

---

[API](https://skmtc.dev/azure/apis/postgresqlhsc-microsoft-dbforpostgresql-postgresqlhsc.md) · [All operations](https://skmtc.dev/azure/apis/postgresqlhsc-microsoft-dbforpostgresql-postgresqlhsc/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/azure/postgresqlhsc-microsoft-dbforpostgresql-postgresqlhsc/revisions/07bfe9612bb7/schema)
