---
title: "POST /subscriptions/{subscriptionId}/providers/Microsoft.Batch/locations/{locationName}/checkNameAvailability"
method: POST
path: "/subscriptions/{subscriptionId}/providers/Microsoft.Batch/locations/{locationName}/checkNameAvailability"
---

# POST /subscriptions/{subscriptionId}/providers/Microsoft.Batch/locations/{locationName}/checkNameAvailability

`POST /subscriptions/{subscriptionId}/providers/Microsoft.Batch/locations/{locationName}/checkNameAvailability`

Checks whether the Batch account name is available in the specified region.

## Path parameters

- `locationName` string, required
- `subscriptionId` string, required

## Query parameters

- `api-version` string, required

## Request body

- CheckNameAvailabilityParameters — Parameters for a check name availability request.
  - `name` string, required — The name to check for availability
  - `type` 'Microsoft.Batch/batchAccounts', required — The resource type. Must be set to Microsoft.Batch/batchAccounts

## Response `200`

Success. Returns details about whether a Batch account name is available.

- CheckNameAvailabilityResult — The CheckNameAvailability operation response.
  - `nameAvailable` boolean — Gets a boolean value that indicates whether the name is available for you to use. If true, the name is available. If false, the name has already been taken or invalid and cannot be used.
  - `reason` 'Invalid' | 'AlreadyExists' — Gets the reason that a Batch account name could not be used. The Reason element is only returned if NameAvailable is false.
  - `message` string — Gets an error message explaining the Reason value in more detail.

## Other responses

- `default` — Error response describing why the operation failed.

---

[API](https://skmtc.net/azure/apis/batchmanagement.md) · [All operations](https://skmtc.net/azure/apis/batchmanagement/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/azure/batchmanagement/versions/ea58b7a60d64/schema)
