Skip to main content
POST
https://backend.themarketunited.com
/
referral
/
attribution
Attribute a referral code
curl --request POST \
  --url https://backend.themarketunited.com/referral/attribution \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "code": "UM-7ZAFAB8F"
}
'
{
  "ok": true,
  "changed": true,
  "referredBy": "<string>"
}

Authorizations

Authorization
string
header
required

SIWE access token returned by POST /auth/verify.

Body

application/json
code
string
required

Referral code to attribute the authenticated user to.

Maximum string length: 32
Example:

"UM-7ZAFAB8F"

Response

Attribution recorded.

ok
boolean
changed
boolean

True when this call set the referrer (first touch); false when already attributed.

referredBy
string

Wallet address of the referrer.