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

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

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

Check the specified namespace name availability.

## Path parameters

- `subscriptionId` string, required

## Query parameters

- `api-version` string, required

## Request body

- CheckNameAvailability — Description of the check name availability request properties.
  - `name` string, required — The namespace name to check for availability. The namespace name can contain only letters, numbers, and hyphens. The namespace must start with a letter, and it must end with a letter or number.

## Response `200`

Check availability returned successfully.

- CheckNameAvailabilityResult — Description of the check name availability request properties.
  - `message` string — The detailed info regarding the reason associated with the namespace.
  - `nameAvailable` boolean — Value indicating namespace is available. Returns true if the namespace is available; otherwise, false.
  - `reason` 'None' | 'InvalidName' | 'SubscriptionIsDisabled' | 'NameInUse' | 'NameInLockdown' | 'TooManyNamespaceInCurrentSubscription' — Specifies the reason for the unavailability of the service.

## Other responses

- `default` — Relay error response describing why the operation failed.

---

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