Sync members

Re-projects the caller org's bots as members into every space of the org and removes the ones whose agent is gone.

POST /v1/bot/members/sync

Addresshttps://api.hanzo.ai/v1/bot/members/sync
MethodPOST
Operationpost_bot_members_sync
AuthAuthorization: Bearer $HANZO_API_KEY

Re-projects the caller org's bots as members into every space of the org and removes the ones whose agent is gone. Idempotent, and admin only — the admin bit rides the caller to team, which is what decides it.

Request

The document declares no body for POST /v1/bot/members/sync. The handler is typed in cloud but its shape is not yet emitted, so the fields are not listed here — ask MCP's describe for post_bot_members_sync, which answers from the running route.

Response

StatusBodyMeaning
200bot.BotSyncok
defaultproblem-detailsrefused

200 body — 2 fields.

FieldInTypeAlwaysDescription
projectedbodyinteger (int64)—Projected is how many roster entries the reconcile touched.
syncedbodyboolean—Synced is true when the reconcile ran.

Failure carries the platform error shape — see Errors.

Examples

hanzo bot members sync
import { Configuration, BotApi } from 'hanzoai';

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

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

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

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

let result = bot_api::post_bot_members_sync(&cfg, Default::default()).await?;
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.BotApi;

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

var result = new BotApi(client).postBotMembersSync();
curl -X POST https://api.hanzo.ai/v1/bot/members/sync \
  -H "Authorization: Bearer $HANZO_API_KEY"

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

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_bot_members"
         }
       }
     }'

Bot API · All Hanzo APIs · Interactive reference

Was this page useful?