Skip to main content
POST
Error

Autorizações

Authorization
string
header
obrigatório

A staff session token, uk_st_…. Minted by sign-up, sign-in or the two-factor exchange. Only a 401 means it is spent; not_a_member (403) is about the organization named in X-Organization-Id and leaves the token good for the others.

Cabeçalhos

X-Organization-Id
string

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.

Parâmetros de consulta

environment
enum<string>
padrão:live

Which environment to act in. A view parameter, valid only on the staff surface — a machine credential never chooses its environment, it is resolved from the key.

Opções disponíveis:
live,
test

Corpo

application/json
owner_contact_id
string<uuid>
obrigatório

Whose code this is, resolved inside the environment above. A contact from the other environment answers 404.

code
string
obrigatório

What goes in the ?ref= link. Trimmed and upper-cased before it is stored and before it is looked up, so ana and ANA are one code.

rate_basis_points
integer | null

A share of what the referred team actually pays: 3000 is 30%. Between 1 and 10000.

fixed_amount_minor
integer<int64> | null

A flat bounty in minor units, proportional to what stays paid after refunds.

fixed_currency
string | null

Required with fixed_amount_minor. A payment in another currency is refused rather than converted — an exchange rate is not something this system holds.

Resposta

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.

id
string<uuid>
code
string

What goes in the ?ref= link, upper-cased.

owner_contact_id
string<uuid>

Whose code it is.

active
boolean

Whether it still attributes new sign-ups. Turning it off touches nothing already attributed.

referred_count
integer<int64>

How many contacts this code brought in.

rate_basis_points
integer | null

A share of what the referred team pays: 3000 is 30%.

fixed_amount_minor
integer<int64> | null

A flat bounty in minor units, earned in proportion to what stays paid after refunds.

fixed_currency
string | null

The currency of the flat bounty. A payment in another currency is refused rather than converted.

created_at
string<date-time>