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

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

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

Determines whether a resource can be created with the specified name.

## Parameters

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

## Request body

- CheckNameAvailabilityRequest — A request to check whether the specified name for a resource is available.
  - `name` string, required — The name whose availability is to be checked.
  - `type` 'Microsoft.Sql/servers', required — The type of resource that is used as the scope of the availability check.

## Response `200`

OK

- CheckNameAvailabilityResponse — A response indicating whether the specified name for a resource is available.
  - `available` boolean — True if the name is available, otherwise false.
  - `message` string — A message explaining why the name is unavailable. Will be null if the name is available.
  - `name` string — The name whose availability was checked.
  - `reason` 'Invalid' | 'AlreadyExists' — The reason code explaining why the name is unavailable. Will be null if the name is available.

## Changes

- **2018-06-12** (2014-04-01) `b581a9a8cef7` — 2 warning
  - deleted the `path` request parameter `subscriptionId`
  - deleted the `query` request parameter `api-version`

[Change history](https://skmtc.dev/azure/apis/azure-sql-database/changes/subscriptions/:subscriptionId/providers/Microsoft.Sql/checkNameAvailability/post.md)

---

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