POST/api/v2/users/{userId}/referrals/links

Creates a campaign link (code generated from the name unless supplied). Requires invite permission and accepted terms.

Authentication

Send your API key in the x-api-key header on every request.

Parameters

Request parameters
FieldTypeRequiredDescription
userId (path)integer (int32)Yes

Request body

application/json

Request body fields
FieldTypeRequiredDescription
ProgramIdstring (uuid)NoDefaults to the company's public programme.
NamestringYes
CodestringNo6–24 chars of [A-Za-z0-9_-]; generated from the name when omitted. Stored upper-case.
ChannelstringYessocial, community, email, website, event or other.
LocalestringNoBCP-47 tag, at most 8 chars; defaults to en.
DestinationstringNoAllowlisted destination (signup, home, cards, topup, rewards); defaults to signup.
ExpiresAtstring (date-time)No

Responses

201 — Created

Response 201 fields
FieldTypeRequiredDescription
Idstring (uuid)Yes
ProgramIdstring (uuid)Yes
ProgramNamestringYes
NamestringYes
CodestringYes
ChannelstringYes
LocalestringYes
DestinationstringYes
StatusstringYes
ActiveFromstring (date-time)Yes
ExpiresAtstring (date-time)Yes
CreatedAtstring (date-time)Yes
ShareUrlstringYes
SignupCountunknownYes
QualifiedCountunknownYes
ClickCountunknownYes
UniqueClickCountunknownYes
OfferVersionIdstring (uuid)Yes
SuggestedCaptionstringYes
OwnerUserIdunknownNo
OwnerNamestringNo
OwnerEmailstringNo

Example request

curl -X POST "https://{base_url}/api/v2/users/{userId}/referrals/links" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"Name":"…","Channel":"…"}'

This page is generated from the live OpenAPI specification and always matches the current API.