Skip to main content
POST
Create a new affiliate

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Affiliate details

firstName
string
required

First name of the affiliate

lastName
string
required

Last name of the affiliate

email
string<email>
required

Email of the affiliate

commissionRate
number<float>

Commission rate for the affiliate

Optional slug for the affiliate's first referral link. If omitted, a slug is generated automatically.

Response

Affiliate created successfully

id
string<uuid>

The affiliate ID

firstName
string

First name of the affiliate

lastName
string

Last name of the affiliate

name
string | null

Full name of the affiliate (optional)

email
string<email>

Email of the affiliate

password
string | null
deprecated

Hashed Password of the affiliate (optional)

emailVerified
boolean | null

Flag to indicate if the email has been verified

image
string | null

Profile image URL of the affiliate

detailsComplete
boolean

Flag to indicate if affiliate details are complete

programId
string<uuid>

The program ID that the affiliate is associated with

payoutEmail
string<email>

Email to be used for payouts

paymentMethod
string

Payment method for the affiliate (e.g., WISE)

commissionRate
number<float>

Commission rate for the affiliate (0 - 100)

Deprecated legacy field; often null. Use affiliateLinks for all link slugs.

All affiliate link records for this affiliate. This is the source of truth for referral link slugs.

status
string

Status of the affiliate (active/inactive)

createdAt
string<date-time>

Timestamp when the affiliate was created

updatedAt
string<date-time>

Timestamp when the affiliate was last updated

numberOfReferredUsers
integer

Number of users referred by the affiliate

numberOfClicks
integer

Number of clicks generated by the affiliate

totalCommissionEarned
number<float>

Total commission earned by the affiliate

Last modified on September 14, 2024