Hanzo
OpenapiAffiliate

Mints a new share link for the caller's own affiliate and answers it with its…

Mints a new share link for the caller's own affiliate and answers it with its full URL, 201.

POST /v1/affiliate/me/links

Addresshttps://api.hanzo.ai/v1/affiliate/me/links
MethodPOST
Operationpost_affiliate_me_links
AuthAuthorization: Bearer $HANZO_API_KEY

Mints a new share link for the caller's own affiliate and answers it with its full URL, 201.

APPROVAL IS REQUIRED: an org that has applied but is not approved is refused, because a link that cannot accrue is a link that quietly loses the referral. A requested vanity code must be valid and free across the WHOLE directory — codes are one global namespace, so a taken code is a 409 rather than a silent alias. Omit the code and a random one is minted.

Bounded per affiliate. The label is cosmetic: it is trimmed, stripped of control characters and capped, and it is never part of a code.

Request

2 fields, body application/json (required).

FieldInTypeRequiredDescription
codebodystringCode is an optional vanity code; it must be free across the whole directory, and omitting it mints a random one.
labelbodystringLabel is cosmetic — trimmed, stripped of control characters, capped — and never part of a code.

Response

StatusBodyMeaning
201linkMintcreated

201 body — 8 fields.

FieldInTypeAlwaysDescription
linkbodycodeView
link.clicksbodyintegerClicks is how many pings this code has taken.
link.codebodystringCode is the link's slug — 3–32 chars of a–z, 0–9 and hyphen — unique across the WHOLE directory, so any affiliate's code resolves an attribution.
link.conversionsbodyintegerConversions is how many of those signups have actually produced positive commission for the caller.
link.createdAtbodyintegerCreatedAt is when the link was minted, Unix seconds UTC.
link.labelbodystringLabel is the caller's own note for the link ("twitter", "newsletter").
link.signupsbodyintegerSignups is how many orgs were attributed with this code — DERIVED by counting attribution edges, never stored, so it cannot drift from the ledger.
link.urlbodystringURL is the full shareable link, the brand host plus ?aff=<code>.

Failure carries the platform error shape — see Errors.

Examples

hanzo affiliates me links create

Affiliate API · All Hanzo APIs · Interactive reference

How is this guide?

On this page