# Check a tenant ID {#top}

**Read** · `GET /v1/tenant-ids` · MCP tool `check-tenant-id`

Tells you whether a tenant ID is available before you create your tenant. Send the ID you want, or your organisation's name and the ID is made from it. If the ID is taken, `alternative` suggests one that is free. You need to be signed in with a session.

Roles that can call it: `viewer`, `builder`, `deployer`.

## Parameters

| Name | In | Required | Description |
|---|---|---|---|
| `organisation_name` | query | no | Your organisation's name, to make the tenant ID from |
| `tenant_id` | query | no | The tenant ID you want. If you send it, it is checked instead of one made from the name |

## Returns

A JSON object with these keys: `tenant`, `available`, `unavailable_because`, `explanation`, `alternative`, `guarantee`, `caller_authenticated`.

## Example request

```sh
curl 'https://api.tarsana.io/v1/tenant-ids?organisation_name=Acme&tenant_id=acme' \
  -H "X-Tarsana-Session: $SESSION"
```

## Example response

```json
{
  "tenant": "acme",
  "available": false,
  "unavailable_because": "taken",
  "explanation": "That tenant ID is already taken. Choose another one.",
  "alternative": "acme-2",
  "guarantee": "namespaces are separated, callers are not authenticated",
  "caller_authenticated": false
}
```

## Errors

| Code | HTTP | What it means |
|---|---|---|
| [`invalid_parameter`](/api/errors#invalid_parameter) | 400 | A value in your request does not have the expected format, for example a submission ID that is not a spec hash. Check the value against the field's description and try again. |
| [`unauthenticated`](/api/errors#unauthenticated) | 401 | Your request has no credential, or one that Tarsana does not recognise. Sign in with `login`, or send a valid access token. |
| [`forbidden`](/api/errors#forbidden) | 403 | Your role does not allow this operation. The response names the roles that do; ask for a credential with one of them. |
| [`sign_in_not_configured`](/api/errors#sign_in_not_configured) | 503 | Signing in with an email link is not available on this Tarsana deployment. Contact Tarsana support. |
| [`rate_limited`](/api/errors#rate_limited) | 429 | You sent too many requests in a short time. Wait for the number of seconds in `retry_after_seconds`, then try again. |
| [`surface_fault`](/api/errors#surface_fault) | 500 | Something went wrong on our side. Try again later, and contact Tarsana support if it keeps happening. |
