Hanzo
OpenapiAffiliate

Counts a click on a share link.

Counts a click on a share link. PUBLIC — it takes no principal, because a visitor clicking a shareable link has no session yet.

POST /v1/affiliate/click

Addresshttps://api.hanzo.ai/v1/affiliate/click
MethodPOST
Operationpost_affiliate_click
AuthAuthorization: Bearer $HANZO_API_KEY

Counts a click on a share link. PUBLIC — it takes no principal, because a visitor clicking a shareable link has no session yet.

The ping folds into an in-memory buffer and NEVER writes the money database synchronously, so a click flood cannot contend with the accrual and payout write path; tallies are flushed in one batch on the next authenticated links read and at shutdown. Clicks are a vanity metric: no accrual and no payout ever reads them — those key on real metered spend — so click inflation cannot move money.

Any well-formed code is accepted WITHOUT checking that it exists, deliberately: this is not a code-existence oracle. counted reports that the buffer took the ping, not that the code is real; an unknown code simply no-ops at flush time.

Request

1 field, body application/json (required).

FieldInTypeRequiredDescription
codebodystringCode is the share-link code that was clicked.

Response

StatusBodyMeaning
200clickCountok

200 body — 1 field.

FieldInTypeAlwaysDescription
countedbodybooleanCounted says the in-memory buffer took the ping.

Failure carries the platform error shape — see Errors.

Examples

hanzo affiliates click

Affiliate API · All Hanzo APIs · Interactive reference

How is this guide?

On this page