Skip to main content

Account Preferences

Account preferences are authenticated and scoped to the account bound to the API key or active Console session. Share Hive is available as an explicit account opt-in and starts unselected. No account lends spare capacity until its owner enables the preference.

Read preferences​

curl "https://api.colabhive.com/api/builder/v1/account/preferences" \
-H "X-API-Key: hive_..."
{
"account_id": "0914e1c6-2218-48b6-a7a1-4a13fb478b22",
"share_hive_opt_in": false
}

All account members may read the effective value. The response always contains an explicit boolean; absence is never interpreted as consent.

Change Share Hive opt-in​

Only the account owner may change this preference.

curl -X PATCH "https://api.colabhive.com/api/builder/v1/account/preferences" \
-H "X-API-Key: hive_..." \
-H "Content-Type: application/json" \
-d '{"share_hive_opt_in": true}'

Setting the value to true makes spare capacity owned by this account eligible for Share Hive. It does not bypass tenancy, residency or isolation policy. Set it back to false to stop new Share Hive use of that capacity.

Python SDK​

from colabhive import ColabHive

client = ColabHive(api_key="hive_...", account_id="0914e1c6-...")

current = client.accounts.get_preferences()
updated = client.accounts.set_share_hive_opt_in(True)

MCP​

The MCP server exposes the same contract through get_account_preferences and set_share_hive_opt_in. The write tool requires the explicit enabled boolean and the server enforces the account-owner role; an agent cannot select a different account in the tool input.