Skip to main content
POST
Claim a referral code

Authorizations

X-API-Key
string
header
required

Body

application/json

A referral code captured from the URL, offered up by a newly signed-up user.

code
string
required

The referral code as captured. Trimmed and normalized server-side.

Required string length: 1 - 64
source
string | null

The affiliate's own tag for where the link was shared, banked at click time by the link redirect. Absent for a link followed any other way. Narrowed rather than validated server-side: an unrecognized value becomes untagged rather than failing a claim.

Maximum string length: 32

Response

Successful Response

The outcome of a claim.

Always 200. A code that does not apply (a reload, an existing customer clicking a colleague's link) reports attributed: false rather than an error, because none of those are failures worth alarming a new user about.

attributed
boolean
required

Whether the code was recorded against this workspace.

credits_on_upgrade
integer
required

Whole credits this workspace will receive when it starts a paid plan; 0 when nothing was attributed. Signing up pays nothing, so this is the promise the welcome message makes.

referrer_name
string | null
required

The workspace that invited them, for the welcome message.