# List pairing

URL: https://docs.hanzo.ai/docs/openapi/channel/get-channel-pairing

> Returns the pairing requests waiting for the caller org to approve — one per person who messaged a connected bot on a channel whose DM policy is "pairing" and who is not allowed yet.

`GET /v1/channel/pairing`

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

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

Returns the pairing requests waiting for the caller org to approve
— one per person who messaged a connected bot on a channel whose DM policy is
"pairing" and who is not allowed yet. Each row carries the CODE an org admin
passes to POST /v1/channel/pairing/approve. Expired requests are not
returned. Codes are capability strings: they are shown here, and never logged.

## Request

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

## Response

| Status    | Body                 | Meaning |
| --------- | -------------------- | ------- |
| `200`     | channel.pairingQueue | ok      |
| `default` | problem-details      | refused |

`200` body — 6 fields.

| Field                 | In   | Type                   | Always | Description                                                                                                                                                                                                             |
| --------------------- | ---- | ---------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `pending`             | body | channel.pairingView\[] | —      | Pending is every unexpired pairing request waiting on an org admin, each carrying the channel, the requesting sender and the code to approve it with.                                                                   |
| `pending[].channel`   | body | string                 | —      | Channel is the transport the request arrived on — discord, slack, teams or telegram — and half of what approval names.                                                                                                  |
| `pending[].code`      | body | string                 | —      | Code is the CAPABILITY that authorises the approval: eight characters from a 32-symbol uppercase alphabet (A-Z0-9 minus the confusables 0, O, 1 and I), minted with crypto/rand and also sent to the requester in chat. |
| `pending[].createdAt` | body | integer (int64)        | —      | CreatedAt is Unix SECONDS of FIRST contact: when the request was minted and the code sent.                                                                                                                              |
| `pending[].lastSeen`  | body | integer (int64)        | —      | LastSeen is Unix SECONDS of the MOST RECENT message from this sender while the request has been pending.                                                                                                                |
| `pending[].sender`    | body | string                 | —      | Sender is the transport-native user id waiting for access — the same identity inbox messages carry.                                                                                                                     |

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

## Examples

**CLI**

```bash
hanzo channel pairing get
```

**SDK**

**.ts**

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

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

**.py**

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

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

**.go**

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

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

**.rs**

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

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

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

**.java**

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

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

var result = new ChannelApi(client).getChannelPairing();
```

**HTTP**

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

**MCP**

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

---

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