---
title: "Check if an IoT hub name is available"
method: POST
path: "/subscriptions/{subscriptionId}/providers/Microsoft.Devices/checkNameAvailability"
tags: ["POST"]
---

# Check if an IoT hub name is available

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

Check if an IoT hub name is available.

## 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

- OperationInputs — Input values.
  - `name` string, required — The name of the IoT hub to check.

## Response `200`

The request has succeeded.

- IotHubNameAvailabilityInfo — The properties indicating whether a given IoT hub name is available.
  - `nameAvailable` boolean — The value which indicates whether the provided name is available.
  - `reason` 'Invalid' | 'AlreadyExists' — The reason for unavailability.
  - `message` string — The detailed reason message.

## Other responses

- `default` — An unexpected error response.

---

[API](https://skmtc.net/azure/apis/iothub-microsoft-devices-iothub.md) · [All operations](https://skmtc.net/azure/apis/iothub-microsoft-devices-iothub/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/azure/iothub-microsoft-devices-iothub/revisions/7807b4f14d4d/schema)
