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

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

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

Check the availability of name for resource

## Path parameters

- `subscriptionId` string, required

## Query parameters

- `api-version` string, required

## Request body

- NameAvailabilityRequest — Request from client to check resource name availability.
  - `name` string, required — Resource name to verify.
  - `type` string — Resource type used for verification.

## Response `200`

OK

- NameAvailability — Represents a resource name availability.
  - `message` string — Error Message.
  - `nameAvailable` boolean — Indicates whether the resource name is available.
  - `reason` string — Reason for name being unavailable.

## Other responses

- `default` — Error response describing why the operation failed.

## Changes

- **2021-07-02** (2017-12-01-preview) `ae137050faec` — 1 info
  - endpoint added
- **2020-09-09** (2017-12-01-preview) `47f1c002a84e` — 1 breaking
  - api path removed without deprecation

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

---

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