# List organizations

URL: https://docs.hanzo.ai/docs/openapi/iam/listorganizations

> Returns the organizations you can act in, the ones you belong to first and the rest after, newest first, narrowed by an optional query against the name or the display name.

`GET /v1/iam/organizations`

> [IAM →](https://docs.hanzo.ai/docs/openapi/iam) · [All API references →](https://docs.hanzo.ai/docs/openapi) · [Get started →](https://docs.hanzo.ai/docs/guides)

|               |                                             |
| ------------- | ------------------------------------------- |
| **Address**   | `https://api.hanzo.ai/v1/iam/organizations` |
| **Method**    | `GET`                                       |
| **Operation** | `listOrganizations`                         |
| **Auth**      | `Authorization: Bearer $HANZO_API_KEY`      |

Returns the organizations you can act in, the ones you belong to first
and the rest after, newest first, narrowed by an optional query against the
name or the display name.

Platform operators see every organization; everyone else sees their own. Pass
the cursor from the previous page to continue; an empty cursor in the answer
means there is nothing more.

THE SCOPE IS THE HANDLER'S OWN, so it holds at every endpoint. The Guard refuses
a bearerless request before this runs, but the MCP server carries a typed op to
its handler with no middleware in front of it — a handler that read no
principal would answer such a caller with the whole registry. Reading the
principal here is what makes the answer the same one over both.

## Request

4 fields.

| Field             | In     | Type    | Required | Description |
| ----------------- | ------ | ------- | -------- | ----------- |
| `q`               | query  | string  | —        |             |
| `limit`           | query  | integer | —        |             |
| `cursor`          | query  | string  | —        |             |
| `X-Forwarded-For` | header | string  | —        |             |

## Response

| Status    | Body                        | Meaning           |
| --------- | --------------------------- | ----------------- |
| `200`     | iam.ListOrganizationsOutput | ok                |
| `202`     | Approval                    | held for approval |
| `default` | problem-details             | refused           |

`200` body — 77 fields.

| Field                                       | In   | Type                | Always | Description                                                                                                                                               |
| ------------------------------------------- | ---- | ------------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `cursor`                                    | body | string              | —      |                                                                                                                                                           |
| `organizations`                             | body | iam.Organization\[] | —      |                                                                                                                                                           |
| `organizations[].accountItems`              | body | iam.AccountItem\[]  | —      |                                                                                                                                                           |
| `organizations[].accountItems[].modifyRule` | body | string              | —      |                                                                                                                                                           |
| `organizations[].accountItems[].name`       | body | string              | —      |                                                                                                                                                           |
| `organizations[].accountItems[].regex`      | body | string              | —      |                                                                                                                                                           |
| `organizations[].accountItems[].tab`        | body | string              | —      |                                                                                                                                                           |
| `organizations[].accountItems[].viewRule`   | body | string              | —      |                                                                                                                                                           |
| `organizations[].accountItems[].visible`    | body | boolean             | —      |                                                                                                                                                           |
| `organizations[].accountMenu`               | body | string              | —      |                                                                                                                                                           |
| `organizations[].avatar`                    | body | string              | —      | How the organization appears across Hanzo — the square mark beside its name — as an image or as one emoji, never both.                                    |
| `organizations[].balanceCredit`             | body | number (double)     | —      |                                                                                                                                                           |
| `organizations[].balanceCurrency`           | body | string              | —      |                                                                                                                                                           |
| `organizations[].countryCodes`              | body | string\[]           | —      |                                                                                                                                                           |
| `organizations[].createdAt`                 | body | string (date-time)  | —      |                                                                                                                                                           |
| `organizations[].createdTime`               | body | string              | —      |                                                                                                                                                           |
| `organizations[].dcrPolicy`                 | body | string              | —      |                                                                                                                                                           |
| `organizations[].defaultApplication`        | body | string              | —      |                                                                                                                                                           |
| `organizations[].defaultAvatar`             | body | string              | —      |                                                                                                                                                           |
| `organizations[].defaultPassword`           | body | string              | —      |                                                                                                                                                           |
| `organizations[].deleted`                   | body | boolean             | —      |                                                                                                                                                           |
| `organizations[].disableSignin`             | body | boolean             | —      |                                                                                                                                                           |
| `organizations[].displayName`               | body | string              | —      |                                                                                                                                                           |
| `organizations[].emoji`                     | body | string              | —      |                                                                                                                                                           |
| `organizations[].enableSoftDeletion`        | body | boolean             | —      |                                                                                                                                                           |
| `organizations[].enableTour`                | body | boolean             | —      |                                                                                                                                                           |
| `organizations[].failedSigninFrozenTime`    | body | integer (int64)     | —      |                                                                                                                                                           |
| `organizations[].failedSigninLimit`         | body | integer (int64)     | —      | Per-organization signin throttle.                                                                                                                         |
| `organizations[].favicon`                   | body | string              | —      |                                                                                                                                                           |
| `organizations[].founder`                   | body | string              | —      | Founder is the stable storage id of the identity that provisioned this org (self-service onboarding).                                                     |
| `organizations[].hasPrivilegeConsent`       | body | boolean             | —      |                                                                                                                                                           |
| `organizations[].id`                        | body | string              | —      |                                                                                                                                                           |
| `organizations[].initScore`                 | body | integer (int64)     | —      |                                                                                                                                                           |
| `organizations[].ipRestriction`             | body | string              | —      |                                                                                                                                                           |
| `organizations[].ipWhitelist`               | body | string              | —      |                                                                                                                                                           |
| `organizations[].isPersonal`                | body | boolean             | —      |                                                                                                                                                           |
| `organizations[].isProfilePublic`           | body | boolean             | —      |                                                                                                                                                           |
| `organizations[].kerberosKdcHost`           | body | string              | —      |                                                                                                                                                           |
| `organizations[].kerberosKeytab`            | body | string              | —      |                                                                                                                                                           |
| `organizations[].kerberosRealm`             | body | string              | —      |                                                                                                                                                           |
| `organizations[].kerberosServiceName`       | body | string              | —      |                                                                                                                                                           |
| `organizations[].languages`                 | body | string\[]           | —      |                                                                                                                                                           |
| `organizations[].ldapAttributes`            | body | string\[]           | —      |                                                                                                                                                           |
| `organizations[].logo`                      | body | string              | —      |                                                                                                                                                           |
| `organizations[].logoDark`                  | body | string              | —      |                                                                                                                                                           |
| `organizations[].masterPassword`            | body | string              | —      |                                                                                                                                                           |
| `organizations[].masterVerificationCode`    | body | string              | —      |                                                                                                                                                           |
| `organizations[].mfaItems`                  | body | iam.MfaItem\[]      | —      |                                                                                                                                                           |
| `organizations[].mfaItems[].name`           | body | string              | —      |                                                                                                                                                           |
| `organizations[].mfaItems[].rule`           | body | string              | —      |                                                                                                                                                           |
| `organizations[].mfaRememberInHours`        | body | integer (int64)     | —      |                                                                                                                                                           |
| `organizations[].name`                      | body | string              | —      |                                                                                                                                                           |
| `organizations[].navItems`                  | body | string\[]           | —      |                                                                                                                                                           |
| `organizations[].orgBalance`                | body | number (double)     | —      | Balance fields are read-only mirrors; authoritative balances live in Commerce (billing.hanzo.ai).                                                         |
| `organizations[].owner`                     | body | string              | —      |                                                                                                                                                           |
| `organizations[].passwordExpireDays`        | body | integer (int64)     | —      |                                                                                                                                                           |
| `organizations[].passwordObfuscatorKey`     | body | string              | —      |                                                                                                                                                           |
| `organizations[].passwordObfuscatorType`    | body | string              | —      |                                                                                                                                                           |
| `organizations[].passwordOptions`           | body | string\[]           | —      |                                                                                                                                                           |
| `organizations[].passwordSalt`              | body | string              | —      |                                                                                                                                                           |
| `organizations[].passwordType`              | body | string              | —      |                                                                                                                                                           |
| `organizations[].platform`                  | body | boolean             | —      | Platform marks an organization the platform itself declares (init\_data.json): the brand orgs and the others the seed creates, never one a customer made. |
| `organizations[].tags`                      | body | string\[]           | —      |                                                                                                                                                           |
| `organizations[].themeData`                 | body | iam.ThemeData       | —      |                                                                                                                                                           |
| `organizations[].themeData.borderRadius`    | body | integer (int64)     | —      |                                                                                                                                                           |
| `organizations[].themeData.colorPrimary`    | body | string              | —      |                                                                                                                                                           |
| `organizations[].themeData.isCompact`       | body | boolean             | —      |                                                                                                                                                           |
| `organizations[].themeData.isEnabled`       | body | boolean             | —      |                                                                                                                                                           |
| `organizations[].themeData.themeType`       | body | string              | —      |                                                                                                                                                           |
| `organizations[].updatedAt`                 | body | string (date-time)  | —      |                                                                                                                                                           |
| `organizations[].useEmailAsUsername`        | body | boolean             | —      |                                                                                                                                                           |
| `organizations[].usePermanentAvatar`        | body | boolean             | —      |                                                                                                                                                           |
| `organizations[].userBalance`               | body | number (double)     | —      |                                                                                                                                                           |
| `organizations[].userNavItems`              | body | string\[]           | —      |                                                                                                                                                           |
| `organizations[].userTypes`                 | body | string\[]           | —      |                                                                                                                                                           |
| `organizations[].websiteUrl`                | body | string              | —      |                                                                                                                                                           |
| `organizations[].widgetItems`               | body | string\[]           | —      |                                                                                                                                                           |

Failure carries the platform error shape — see [Errors](https://docs.hanzo.ai/docs/errors).

## Examples

**CLI**

```bash
hanzo iam organizations list
```

**SDK**

**.ts**

```ts
import { Configuration, IamApi } from 'hanzoai';

const api = new IamApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.listOrganizations();
```

**.py**

```python
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import IamApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = IamApi(client).list_organizations()
```

**.go**

```go
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.IamAPI.ListOrganizations(context.Background()).Execute()
if err != nil {
	return err
}
```

**.rs**

```rust
use hanzo_client::apis::{configuration::Configuration, iam_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = iam_api::list_organizations(&cfg, Default::default()).await?;
```

**.java**

```java
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.IamApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new IamApi(client).listOrganizations();
```

**HTTP**

```bash
curl https://api.hanzo.ai/v1/iam/organizations \
  -H "Authorization: Bearer $HANZO_API_KEY"
```

**MCP**

Tool `iam`, op `listOrganizations` — POST the JSON-RPC envelope to `https://api.hanzo.ai/v1/mcp`.

```bash
curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "iam",
         "arguments": {
           "op": "listOrganizations",
           "input": {}
         }
       }
     }'
```

---

[IAM API](https://docs.hanzo.ai/docs/openapi/iam) · [All Hanzo APIs](https://docs.hanzo.ai/docs/openapi) · [Interactive reference](https://docs.hanzo.ai/docs/openapi/reference)
