# List share

URL: https://docs.hanzo.ai/docs/openapi/share/get-share

> Returns the tunnel shares the caller's org currently has open, across every environment that org has enabled.

`GET /v1/share`

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

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

Returns the tunnel shares the caller's org currently has open, across
every environment that org has enabled. It is a READ and it degrades honestly: an
unconfigured deployment, an org that has not provisioned yet, and an unreachable
controller all answer an EMPTY list at 200 rather than an error, so the console
never error-toasts on load.

## Request

`GET /v1/share` takes no parameters and no body — the credential is the whole request.

## Response

| Status    | Body            | Meaning |
| --------- | --------------- | ------- |
| `200`     | share.sharesOut | ok      |
| `default` | problem-details | refused |

`200` body — 6 fields.

| Field                  | In   | Type               | Always | Description                                                                                                                 |
| ---------------------- | ---- | ------------------ | ------ | --------------------------------------------------------------------------------------------------------------------------- |
| `shares`               | body | share.shareView\[] | —      | Shares is the org's active shares — empty rather than absent when there are none, or when the controller cannot be reached. |
| `shares[].backend`     | body | string             | —      | Backend is the local endpoint the share proxies to.                                                                         |
| `shares[].backendMode` | body | string             | —      | BackendMode is how the tunnel serves the backend, e.g. proxy or web.                                                        |
| `shares[].createdAt`   | body | integer (int64)    | —      | CreatedAt is when the share was opened, unix seconds.                                                                       |
| `shares[].token`       | body | string             | —      | Token is the share's own identifier, the leaf of its public URL.                                                            |
| `shares[].url`         | body | string             | —      | URL is the share's public address, rendered from the deployment's URL template.                                             |

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

## Examples

**CLI**

```bash
hanzo share get
```

**SDK**

**.ts**

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

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

**.py**

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

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

**.go**

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

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

**.rs**

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

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

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

**.java**

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

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

var result = new ShareApi(client).getShare();
```

**HTTP**

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

**MCP**

MCP reaches **share** through the `share` tool, which names its 2 operations with its own verbs — this one among them, under a name only MCP declares. `describe` explains any of them:

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

---

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