> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hydradb.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List Tenant IDs

> List all tenants registered for your organization.

## When to use it

* **Org-level admin dashboards** – show all tenants belonging to an organization
* **Audit and compliance** – generate a complete tenant inventory
* **Recovery** – identify tenants whose creation failed and may need to be re-created

This endpoint is scoped to the organization associated with your API key. It does not require a `tenant_id` parameter.

## Endpoint

* **Auth:** Bearer token
* **Idempotency:** Read-only
* **Async:** No

## Example

<CodeGroup>
  ```bash cURL theme={"dark"}
  curl 'https://api.hydradb.com/tenants/tenant_ids' \
    -H "Authorization: Bearer <your_api_key>"
  ```

  ```typescript TypeScript SDK theme={"dark"}
  const response = await client.tenant.getTenantIds();
  const tenantIds = response.tenant_ids;
  ```

  ```python Python SDK theme={"dark"}
  response = client.tenant.get_tenant_ids()
  tenant_ids = response.tenant_ids
  ```
</CodeGroup>

## Query parameters

None.

## Response

```json theme={"dark"}
{
  "tenant_ids": ["my_first_tenant", "acme_corp", "test_env"],
  "failed_tenant_ids": [
    {
      "tenant_id": "broken_tenant",
      "error": "Provisioning failed: vectorstore unreachable"
    }
  ],
  "message": "Successfully retrieved tenant IDs"
}
```

| Field               | Description                                                                                                                                                                              |
| ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `tenant_ids`        | Array of tenant IDs that are active or currently provisioning.                                                                                                                           |
| `failed_tenant_ids` | Array of tenants whose creation failed. Each entry contains `tenant_id` and `error`. To retry, re-create the tenant via [`POST /tenants/create`](/api-reference/endpoint/create-tenant). |
| `message`           | Human-readable status.                                                                                                                                                                   |

## Related endpoints

* **Related:** [Create tenant](/api-reference/endpoint/create-tenant) – re-create a tenant whose creation failed
* **Related:** [Check infra status](/api-reference/endpoint/infra-status) – inspect provisioning status for an individual tenant

## Errors

Common codes: `400 INVALID_PARAMETERS`, `401 UNAUTHORIZED`. See [Error Responses](/api-reference/error-responses) for the full list.
