Replace org
Blocks or unblocks the opt-in to public betas for every member of the org the caller acts in.
PUT /v1/flag/optin/org
| Address | https://api.hanzo.ai/v1/flag/optin/org |
| Method | PUT |
| Operation | put_flag_optin_org |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Blocks or unblocks the opt-in to public betas for every member of the org the caller acts in. An owner or admin of that org, or a SuperAdmin, may; a member may not. It only withholds: blocked, no member gets a public beta by opting in, and their own choices are kept for when it is lifted; it never turns a beta on. A shared sign-up org has no admin to speak for its members and is refused. The change is on the audit trail before it lands.
Request
1 field, body application/json (required).
| Field | In | Type | Required | Description |
|---|---|---|---|---|
blocked | body | boolean | — | Blocked turns the opt-in off for every member of the org when true, and back on when false. |
Response
| Status | Body | Meaning |
|---|---|---|
200 | flag.orgOptinOut | ok |
default | problem-details | refused |
200 body — 1 field.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
blocked | body | boolean | — | Blocked is true when the org's members do not get public betas by opting in. |
Failure carries the platform error shape — see Errors.
Examples
hanzo flag optin orgimport { Configuration, FlagApi } from 'hanzoai';
const api = new FlagApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.putFlagOptinOrg({ blocked: false });from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import FlagApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = FlagApi(client).put_flag_optin_org(blocked=False)cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)
resp, _, err := client.FlagAPI.PutFlagOptinOrg(context.Background()).Execute()
if err != nil {
return err
}use hanzo_client::apis::{configuration::Configuration, flag_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = flag_api::put_flag_optin_org(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.FlagApi;
ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));
var result = new FlagApi(client).putFlagOptinOrg();curl -X PUT https://api.hanzo.ai/v1/flag/optin/org \
-H "Authorization: Bearer $HANZO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"blocked": false
}'MCP reaches flag through the flag tool, which names its 12 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": "get_flag_activity"
}
}
}'