Create handle

Sets the caller's public leaderboard display name, or clears it.

POST /v1/affiliate/me/handle

Addresshttps://api.hanzo.ai/v1/affiliate/me/handle
MethodPOST
Operationpost_affiliate_me_handle
AuthAuthorization: Bearer $HANZO_API_KEY

Sets the caller's public leaderboard display name, or clears it.

The handle IS the opt-in. An empty handle opts out: the affiliate keeps its rank and can still see its own row, it simply stops being listed to anyone else. That is the whole privacy control — there is no separate visibility flag, and no way to be listed without choosing a name.

Requires a validated principal and an existing affiliate record; apply first. The handle is bounded and restricted to letters, digits, space, hyphen, underscore and dot.

Request

1 field, body application/json (required).

FieldInTypeRequiredDescription
handlebodystring—Handle is the public leaderboard display name; empty opts out.

Response

StatusBodyMeaning
200affiliate.handleSetok
defaultproblem-detailsrefused

200 body — 1 field.

FieldInTypeAlwaysDescription
handlebodystring—Handle is the display name as STORED, echoed back after trimming.

Failure carries the platform error shape — see Errors.

Examples

hanzo affiliate me handle
import { Configuration, AffiliateApi } from 'hanzoai';

const api = new AffiliateApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.postAffiliateMeHandle({ handle: "<handle>" });
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import AffiliateApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = AffiliateApi(client).post_affiliate_me_handle(handle="<handle>")
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

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

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

let result = affiliate_api::post_affiliate_me_handle(&cfg, Default::default()).await?;
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.AffiliateApi;

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

var result = new AffiliateApi(client).postAffiliateMeHandle();
curl -X POST https://api.hanzo.ai/v1/affiliate/me/handle \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "handle": "<handle>"
     }'

MCP reaches affiliate through the affiliate tool, which names its 10 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_affiliates"
         }
       }
     }'

Affiliate API · All Hanzo APIs · Interactive reference

Was this page useful?