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

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

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

## Request

- Base URL: `https://management.azure.com`
- URL: `https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.AgFoodPlatform/checkNameAvailability`
- Auth: OAuth 2
  - Implicit: `https://login.microsoftonline.com/common/oauth2/authorize`
  - Scopes: `user_impersonation`

Checks the name availability of the resource with requested resource name.

## Path parameters

- `subscriptionId` string, uuid, required

## Query parameters

- `api-version` string, required

## Request body

- CheckNameAvailabilityRequest: The check availability request body.
  - `name` string: The name of the resource for which availability needs to be checked.
  - `type` string: The resource type.

## Response `200`

Success

- CheckNameAvailabilityResponse: The check availability result.
  - `nameAvailable` boolean: Indicates if the resource name is available.
  - `reason` 'Invalid' | 'AlreadyExists': The reason why the given name is not available.
  - `message` string: Detailed reason why the given name is available.

## Other responses

- `default`: Error

---

[API](https://skmtc.dev/azure/apis/agrifood-microsoft-agfoodplatform-agfoodplatform.md) - [All operations](https://skmtc.dev/azure/apis/agrifood-microsoft-agfoodplatform-agfoodplatform/llms.txt) - [OpenAPI document](https://skmtc.dev/azure/apis/agrifood-microsoft-agfoodplatform-agfoodplatform/revisions/2e29eb8fb1fb?raw)
