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

# 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

## Parameters

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

## 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 result of the request to list operations.

## Response `200`

The request has succeeded.

- 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` — An unexpected error response.

## Changes

- **2026-07-13** (2015-12-01) `bd5ddd708825` — 2 warning, 1 info
  - deleted the `path` request parameter `subscriptionId`
  - deleted the `query` request parameter `api-version`
  - api tag `Location` added
- **2026-07-13** (2015-12-01) `a4db6a42da8a` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/azure/apis/batch-microsoft-batch-batch/changes/subscriptions/:subscriptionId/providers/Microsoft.Batch/locations/:locationName/checkNameAvailability/post.md)

---

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