---
title: "Check if a resource name is available."
method: POST
path: "/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability"
---

# Check if a resource name is available.

`POST /subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability`

Check if a resource name is available.

## Path parameters

- `subscriptionId` string, required

## Query parameters

- `api-version` string, required

## Request body

- ResourceNameAvailabilityRequest — Resource name availability request content.
  - `name` string, required — Resource name to verify.
  - `type` 'Site' | 'Slot' | 'HostingEnvironment' | 'PublishingUser' | 'Microsoft.Web/sites' | 'Microsoft.Web/sites/slots' | 'Microsoft.Web/hostingEnvironments' | 'Microsoft.Web/publishingUsers', required — Resource type used for verification.
  - `isFqdn` boolean — Is fully qualified domain name.

## Response `200`

OK

- ResourceNameAvailability — Information regarding availability of a resource name.
  - `nameAvailable` boolean — <code>true</code> indicates name is valid and available. <code>false</code> indicates the name is invalid, unavailable, or both.
  - `reason` 'Invalid' | 'AlreadyExists' — <code>Invalid</code> indicates the name provided does not match Azure App Service naming requirements. <code>AlreadyExists</code> indicates that the name is already in use and is therefore unavailable.
  - `message` string — If reason == invalid, provide the user with the reason why the given name is invalid, and provide the resource naming requirements so that the user can select a valid name. If reason == AlreadyExists, explain that resource name is already in use, and direct them to select a different name.

## Other responses

- `default` — App Service error response.

---

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