A valid request URL is required to generate request examples{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"code": "<string>",
"owner_contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"active": true,
"referred_count": 123,
"rate_basis_points": 123,
"fixed_amount_minor": 123,
"fixed_currency": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "referral_code_taken",
"message": "this environment already has a referral code with that string"
}
}Issue a referral code
Requires billing:write. Gives one of your own users a code to share, and states what you will owe for it.
Exactly one of rate_basis_points (a share of what the referred team pays) or fixed_amount_minor with fixed_currency (a flat bounty). There is no environment-wide default to fall back on: a code with no terms is a payout nobody agreed to.
Codes are issued here rather than minted by the person who holds them — a code anybody can mint for themselves is a code an attacker mints in a loop and attaches to sign-ups they control.
A valid request URL is required to generate request examples{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"code": "<string>",
"owner_contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"active": true,
"referred_count": 123,
"rate_basis_points": 123,
"fixed_amount_minor": 123,
"fixed_currency": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "referral_code_taken",
"message": "this environment already has a referral code with that string"
}
}Authorizations
Headers
The organization the caller is acting on — the org_… code that appears in the panel URL. It identifies; the membership JOIN is what authorizes, so a forged code reads nothing: the answer is not_a_member (403), which does not mean the session is over. Absent, the session's default organization answers, or — if that membership was revoked while the session was open — any other one the caller still holds.
Query Parameters
Body
Response
The code, ready to be shared.
A code one of your users shares, and the terms you promised for it. Exactly one of rate_basis_points and fixed_amount_minor is set; the other reads null rather than being omitted, so a reader cannot mistake an absent field for one they never heard of.