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

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

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

Checks whether the container registry name is available for use. The name must contain only alphanumeric characters, be globally unique, and between 5 and 50 characters in length.

## Parameters

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

## Request body

- RegistryNameCheckRequest — A request to check whether a container registry name is available.
  - `name` string, required — The name of the container registry.
  - `type` 'Microsoft.ContainerRegistry/registries', required — The resource type for Container Registry.
  - `resourceGroupName` string — The resource group name of the container registry.
  - `autoGeneratedDomainNameLabelScope` 'Unsecure' | 'TenantReuse' | 'SubscriptionReuse' | 'ResourceGroupReuse' | 'NoReuse' — The auto generated domain name label of the container registry. This value defaults to "Unsecure".

## Response `200`

The request has succeeded.

- RegistryNameStatus — The result of a request to check the availability of a container registry name.
  - `availableLoginServerName` string — The complete login server name with domain name label (DNL) hash, if available
  - `nameAvailable` boolean — The value that indicates whether the name is available.
  - `reason` string — If any, the reason that the name is not available.
  - `message` string — If any, the error message that provides more detail for the reason that the name is not available.

## Other responses

- `default` — An unexpected error response.

---

[API](https://skmtc.net/azure/apis/containerregistry-microsoft-containerregistry-registry.md) · [All operations](https://skmtc.net/azure/apis/containerregistry-microsoft-containerregistry-registry/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/azure/containerregistry-microsoft-containerregistry-registry/revisions/32d4ccbab0a7/schema)
