List pairing

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

GET /v1/transport/pairing

Addresshttps://api.hanzo.ai/v1/transport/pairing
MethodGET
Operationget_transport_pairing
AuthAuthorization: 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 transport whose DM policy is "pairing" and who is not allowed yet. Each row carries the CODE an org admin passes to POST /v1/transport/pairing/approve. Expired requests are not returned. Codes are capability strings: they are shown here, and never logged. Reading them is an org admin's, as approving them is.

Request

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

Response

StatusBodyMeaning
200transport.pairingQueueok
defaultproblem-detailsrefused

200 body — 6 fields.

FieldInTypeAlwaysDescription
pendingbodytransport.pairingView[]—Pending is every unexpired pairing request waiting on an org admin, each carrying the transport, the requesting sender and the code to approve it with.
pending[].codebodystring—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[].createdAtbodyinteger (int64)—CreatedAt is Unix SECONDS of FIRST contact: when the request was minted and the code sent.
pending[].lastSeenbodyinteger (int64)—LastSeen is Unix SECONDS of the MOST RECENT message from this sender while the request has been pending.
pending[].senderbodystring—Sender is the transport-native user id waiting for access — the same identity inbox messages carry.
pending[].transportbodystring—Transport is the transport the request arrived on — discord, slack, teams or telegram — and half of what approval names.

Failure carries the platform error shape — see Errors.

Examples

hanzo transport pairing get
import { Configuration, TransportApi } from 'hanzoai';

const api = new TransportApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getTransportPairing();
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import TransportApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = TransportApi(client).get_transport_pairing()
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.TransportAPI.GetTransportPairing(context.Background()).Execute()
if err != nil {
	return err
}
use hanzo_client::apis::{configuration::Configuration, transport_api};

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

let result = transport_api::get_transport_pairing(&cfg, Default::default()).await?;
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.TransportApi;

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

var result = new TransportApi(client).getTransportPairing();

The method above is the one at the current release of the document. [email protected] (npm) and [email protected] (PyPI) were generated from an earlier release, where this operation carried a different id, so it spells the method differently — regenerating the clients is what makes the two agree. SDKs →

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

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

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": "transport",
         "arguments": {
           "op": "get_transport_pairing",
           "input": {}
         }
       }
     }'

Transport API · All Hanzo APIs · Interactive reference

Was this page useful?
Broken link or missing step? Drop it in #docs on Discord or open a PR.