Skip to main content
POST
Create affiliate

Authorizations

X-API-Key
string
header
required

Preferred authentication method. Pass the API key in the X-API-Key HTTP request header. The user account must have api_status enabled.

Body

application/json
email
string<email>
required

Affiliate email (must be unique).

password
string

Login password (min 8 chars). Repeating consecutive characters are allowed.

password_repeat
string

Password confirmation.

company_name
string

Company name.

Maximum string length: 255
firstname
string
Maximum string length: 255
lastname
string
Maximum string length: 255
phone
string
Maximum string length: 64
website_url
string
Maximum string length: 255
status
integer

Affiliate account status (Identity): 1=active, 2=pending, 3=inactive. The field is not range-validated: sending 5 is accepted with a 200/201 and hides the account from the list and from GET by id (404). Sending 1 again restores it.

country
integer

Country geoname_id. Auto-detected from IP if 0.

region
string
Maximum string length: 128
city
string
Maximum string length: 128
address
string
Maximum string length: 128
postal_code
string
Maximum string length: 16
timezone
string

IANA timezone (e.g. America/New_York). Defaults to platform timezone.

Maximum string length: 64
number_format_id
integer

Number format ID.

date_format_id
integer

Date format ID.

contacts
string

JSON string with contact information.

notes
string

Notes about the affiliate.

internal_notes
string

Internal notes (not visible to affiliate).

payment_details
string

Payment details (JSON string).

referred_by
integer

Referrer affiliate ID.

referral_commission
number

Referral commission percentage (default 5).

managers
string

Manager ID or comma-separated IDs to assign.

custom_fields
object

Custom field values.

tags
string

Comma-separated tag labels.

traffic_sources
integer[]

Traffic source IDs.

image_data
string

Base64-encoded image (data:image/png;base64,...).

external_id
string

External identifier.

Maximum string length: 64
trafficback_url
string<uri>

Affiliate-level trafficback URL. All invalid traffic from this affiliate will be redirected to this URL. Overrides offer-level and global trafficback settings. Available on Enterprise and Custom plans only.

Maximum string length: 255
login_redirect_url
string

Custom login redirect URL for affiliate portal.

send_welcome_email
enum<integer>

Send welcome email: 1=yes, 2=no.

Available options:
1,
2
send_verification_email
enum<integer>

Send verification email: 1=yes, 2=no.

Available options:
1,
2
ip
string

IP address (used for auto-detecting country/timezone).

Response

Created affiliate.

status
string
Example:

"success"

code
integer
Example:

200

name
string
Example:

"OK"

message
string
info
object