Skip to main content
GET
/
v1
/
affiliate
/
codeAvailable
Check whether a referral code is available
curl --request GET \
  --url https://api.testnet.arcus.xyz/v1/affiliate/codeAvailable
{
  "code": "<string>",
  "available": true
}
Returns { code, available } for a single referral code string. available: true means no row exists in the codes directory and the code is currently free for POST /v1/affiliate/createCode. Advisory only. Two callers can both observe available: true and race on createCode; only one will end up owning the code. Use this endpoint for live form-validation feedback in the UI, but treat the createCode response as the authoritative result. Public — no X-API-Key, no signature.

Query Parameters

code
string
required

Referral code to check (uppercase A-Z, digits, _, -; 1-32 characters).

Required string length: 1 - 32
Pattern: ^[A-Z0-9_-]{1,32}$

Response

Code availability result.

code
string
required

The canonical code that was checked.

Pattern: ^[A-Z0-9_-]{1,32}$
available
boolean
required

True when the code is currently unclaimed and may be passed to POST /v1/affiliate/createCode. Advisory only — the authoritative uniqueness check happens on createCode, so a true response does not reserve the code.