For the complete documentation index, see llms.txt. This page is also available as Markdown.

Referral Code

Endpoints for working with referral codes: look up a code and its associated reward, or apply a code to a referred account. For background on what referral codes are, see the Referral Code Overview.

Deprecated

Lookup a referral code

get

Deprecated. Use the Open Endpoint Lookup a referral code instead.

Returns a referral code along with the referrer's name and the reward the code unlocks.

Authorizations
AuthorizationstringRequired

Authorize your requests using a tenant's API Key. Use this method only in server-to-server interactions.

Path parameters
tenant_aliasstringRequired

Tenant being referenced. E.g. "aboih12h16t" or "test_abo912126tastastt"

codestringRequired

The referral code to look up, for example BOBTESTERSON. Can be a user's primary or non-primary referral code.

Responses
200

Referral code found

application/json

A referral code, the referrer it belongs to, and details of the reward it unlocks.

codestringOptional

The unique identifier for the code. For example BOBTESTERSON.

Example: CFMVQHNUEU2AWWDO
dateCreatedinteger · int64Optional

Unix timestamp (milliseconds) when the code was created.

Example: 1774386824953
programIdstring · nullableOptional

The ID of the program that the code belongs to. Null if not associated with a specific program.

referrerNamestringOptional

The display name of the owner of this code. For example Bob Testerson.

Example: Bob T
get/{tenant_alias}/code/{code}

Lookup a referral code (Open Endpoint)

get

Returns a referral code along with the referrer's name and the reward the code unlocks. Use this from client-side contexts such as the Mobile and Web SDKs.

This is an Open Endpoint and is disabled by default. Contact support to enable open endpoints.

Authorizations
AuthorizationstringRequired

Authorize your requests using a tenant's API Key. Use this method only in server-to-server interactions.

Path parameters
tenant_aliasstringRequired

Tenant being referenced. E.g. "aboih12h16t" or "test_abo912126tastastt"

referral_codestringRequired

The code to be validated, for example BOBTESTERSON. Can be a user's primary or non-primary referral code.

Responses
200

Referral code found

application/json

A referral code, the referrer it belongs to, and details of the reward it unlocks (Classic reward format).

codestringOptional

The unique identifier for the code. For example BOBTESTERSON.

Example: CFMVQHNUEU2AWWDO
dateCreatedinteger · int64Optional

Unix timestamp (milliseconds) when the code was created.

Example: 1774386824953
programIdstring · nullableOptional

The ID of the program that the code belongs to. Null if not associated with a specific program.

referrerNamestringOptional

The display name of the owner of this code. For example Bob Testerson.

Example: Bob T
get/{tenant_alias}/open/code/{referral_code}

Apply a referral code

post

Applies a referral code to the specified account and user, marking them as referred by the code's owner.

Requires a write token or an API key. This is an Open Endpoint and is disabled by default. Contact support to enable open endpoints.

Authorizations
AuthorizationstringRequired

Authorize your requests using a tenant's API Key. Use this method only in server-to-server interactions.

Path parameters
tenant_aliasstringRequired

Tenant being referenced. E.g. "aboih12h16t" or "test_abo912126tastastt"

codestringRequired

The referral code to apply to the user's account.

accountIdstringRequired

The account to apply the referral code to. This account will be marked as referred by the owner of the code.

userIdstringRequired

The user to apply the referral code to. This user will be marked as referred by the owner of the code.

Responses
200

Referral code applied

application/json

A referral code, the referrer it belongs to, and details of the reward it unlocks.

codestringOptional

The unique identifier for the code. For example BOBTESTERSON.

Example: CFMVQHNUEU2AWWDO
dateCreatedinteger · int64Optional

Unix timestamp (milliseconds) when the code was created.

Example: 1774386824953
programIdstring · nullableOptional

The ID of the program that the code belongs to. Null if not associated with a specific program.

referrerNamestringOptional

The display name of the owner of this code. For example Bob Testerson.

Example: Bob T
post/{tenant_alias}/open/code/{code}/account/{accountId}/user/{userId}

Last updated