Hanzo
OpenapiReferral

Records that the caller's org signed up through a referral code.

Records that the caller's org signed up through a referral code.

POST /v1/referral/claim

Addresshttps://api.hanzo.ai/v1/referral/claim
MethodPOST
Operationpost_referral_claim
AuthAuthorization: Bearer $HANZO_API_KEY

Records that the caller's org signed up through a referral code.

The REFEREE is the validated caller, never a client field, and the referrer is resolved from the code — so a caller can only ever attach THEMSELVES to someone else's code. Referring yourself is 400 and an unknown code is 404.

It is idempotent and first-touch: an org can be referred once, ever. A repeat call returns the referral already on file with created=false and 200, where the first call answers 201.

Recording a referral grants nothing, and neither does anything downstream of it: the edge later advances to qualified when the referee makes metered spend (POST /v1/admin/referral/sweep), and that is the end of it. No credit is ever issued from this package.

Request

1 field, body application/json (required).

FieldInTypeRequiredDescription
codebodystringCode is the referrer's referral code, as it appeared in their ?ref= link.

Response

StatusBodyMeaning
200claimViewok

200 body — 5 fields.

FieldInTypeAlwaysDescription
codebodystringCode is the referral code the referral was recorded against.
createdbodybooleanCreated is true when this call recorded the referral and false when it found one already recorded for this referee — the idempotent replay.
createdAtbodyintegerCreatedAt is when the referral was first recorded, as a Unix timestamp.
idbodystringID is the referral's handle.
statusbodystringStatus is the referral's lifecycle state: "signup" until the referee makes metered spend, then "qualified", then "credited".

Failure carries the platform error shape — see Errors.

Examples

hanzo referrals claim

Referral API · All Hanzo APIs · Interactive reference

How is this guide?

On this page