# List public

URL: https://docs.hanzo.ai/docs/openapi/team/get-team-public

> Lists the rooms orgs have published, across every org.

`GET /v1/team/public`

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

|               |                                        |
| ------------- | -------------------------------------- |
| **Address**   | `https://api.hanzo.ai/v1/team/public`  |
| **Method**    | `GET`                                  |
| **Operation** | `get_team_public`                      |
| **Auth**      | `Authorization: Bearer $HANZO_API_KEY` |

Lists the rooms orgs have published, across every org.

It is NOT part of GET /rooms, and the separation is the point: that address
answers the CALLER'S rooms, so folding these in would put strangers' channels
in somebody's own sidebar.

It reads the directory and never a tenant's store. Every field it can answer
with is one an org published by making a room public, so there is nothing here
to scope by org — a directory only its own org can read is not a directory.
An authenticated principal is still required, because an anonymous crawler is
not who this is for.

## Request

3 fields.

| Field   | In    | Type    | Required | Description                                            |
| ------- | ----- | ------- | -------- | ------------------------------------------------------ |
| `q`     | query | string  | —        | Q matches a room's name or its topic.                  |
| `org`   | query | string  | —        | Org narrows to one org's published rooms.              |
| `limit` | query | integer | —        | Limit caps the page, 50 when unstated and 200 at most. |

## Response

| Status    | Body             | Meaning |
| --------- | ---------------- | ------- |
| `200`     | team.publicRooms | ok      |
| `default` | problem-details  | refused |

`200` body — 8 fields.

| Field             | In   | Type            | Always | Description                                                            |
| ----------------- | ---- | --------------- | ------ | ---------------------------------------------------------------------- |
| `rooms`           | body | team.listed\[]  | —      | Rooms is every published room the query matched, newest-written first. |
| `rooms[].members` | body | integer (int64) | —      | Members counts the room, and never names anybody in it.                |
| `rooms[].name`    | body | string          | —      | Name is what a person sees, without the sigil a client draws.          |
| `rooms[].org`     | body | string          | —      | Org owns the room.                                                     |
| `rooms[].room`    | body | string          | —      | Room addresses it in the owning store — what a join is called with.    |
| `rooms[].space`   | body | string          | —      | Space is where the room lives inside that org.                         |
| `rooms[].topic`   | body | string          | —      | Topic is the room's one-line subject, empty when it has none.          |
| `rooms[].updated` | body | integer (int64) | —      | Updated is when this row was last written, unix seconds.               |

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

## Examples

**CLI**

```bash
hanzo team public
```

**SDK**

**.ts**

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

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

**.py**

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

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

**.go**

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

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

**.rs**

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

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

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

**.java**

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

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

var result = new TeamApi(client).getTeamPublic();
```

**HTTP**

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

**MCP**

Tool `team`, op `get_team_public` — 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": "team",
         "arguments": {
           "op": "get_team_public",
           "input": {}
         }
       }
     }'
```

---

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