POST
/api/v2/users/{userId}/referrals/linksCreates 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
| Field | Type | Required | Description |
|---|---|---|---|
| userId (path) | integer (int32) | Yes |
Request body
application/json
| Field | Type | Required | Description |
|---|---|---|---|
| ProgramId | string (uuid) | No | Defaults to the company's public programme. |
| Name | string | Yes | |
| Code | string | No | 6–24 chars of [A-Za-z0-9_-]; generated from the name when omitted. Stored upper-case. |
| Channel | string | Yes | social, community, email, website, event or other. |
| Locale | string | No | BCP-47 tag, at most 8 chars; defaults to en. |
| Destination | string | No | Allowlisted destination (signup, home, cards, topup, rewards); defaults to signup. |
| ExpiresAt | string (date-time) | No |
Responses
201 — Created
| Field | Type | Required | Description |
|---|---|---|---|
| Id | string (uuid) | Yes | |
| ProgramId | string (uuid) | Yes | |
| ProgramName | string | Yes | |
| Name | string | Yes | |
| Code | string | Yes | |
| Channel | string | Yes | |
| Locale | string | Yes | |
| Destination | string | Yes | |
| Status | string | Yes | |
| ActiveFrom | string (date-time) | Yes | |
| ExpiresAt | string (date-time) | Yes | |
| CreatedAt | string (date-time) | Yes | |
| ShareUrl | string | Yes | |
| SignupCount | unknown | Yes | |
| QualifiedCount | unknown | Yes | |
| ClickCount | unknown | Yes | |
| UniqueClickCount | unknown | Yes | |
| OfferVersionId | string (uuid) | Yes | |
| SuggestedCaption | string | Yes | |
| OwnerUserId | unknown | No | |
| OwnerName | string | No | |
| OwnerEmail | string | No |
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.