Skip to main content
POST
Create customers in bulk

Authorizations

X-Api-Key
string
header
required

Your Affelios API key. Create one in the dashboard under Settings > API keys.

Body

application/json

The customers to create, at most 1,000.

externalId
string
required

Your unique ID for the customer. Customers without one are skipped.

Minimum string length: 1
externalBrandId
string
required

The External ID of the brand the customer registered with, as set on the brand in Affelios.

Minimum string length: 1
regDate
string
required

When the customer registered, as a date and time string in UTC, for example 2026-11-17T09:12:00Z.

Minimum string length: 1
clickKey
string | null

The click key your site stored when the customer arrived from an affiliate link.

externalProductId
string | null

The External ID of the product the customer signed up for, if any.

username
string | null

A display name for the customer, shown in reports.

country
string | null

The customer's country name.

country_code
string | null

The customer's country as an ISO country code, for example GB.

Response

How many customers were created, skipped as duplicates, or failed.

The result of creating or importing customers in bulk.

numImported
integer<int32>

Customers created.

numDuplicates
integer<int32>

Customers skipped because one with the same external ID already exists.

numFailed
integer<int32>

Customers that could not be created.

firstFailureId
string | null

The external ID of the last customer that failed. When several fail, this may not be the customer firstFailureMessage describes.

firstFailureMessage
string | null

Why the first failed customer was rejected.