Customers
Create a customer
Through a click (click_id, the referral's identity carries over and the partner is whoever owns it) or directly to a partner (partner_id, recorded as tracked_by: api). Set external_customer_id so charges you send later match.
Scope: commissions:write (or write)
post/v1/customers
Request
- Base URL: https://api.affiliaterail.com
- URL: https://api.affiliaterail.com/v1/customers
- Auth: HTTP bearer
Request body
Example request
{
"program_id": "prg_7uSyy9FqVLCFWrdPeZaK",
"partner_id": "part_7uSyy9FqVLCFWrdPeZaK",
"click_id": "clk_7uSyy9FqVLCFWrdPeZaK"
}Response
The new customer
Example response
{
"id": "cus_7uSyy9FqVLCFWrdPeZaK",
"program_id": "prg_7uSyy9FqVLCFWrdPeZaK",
"partner_id": "part_7uSyy9FqVLCFWrdPeZaK",
"referral_id": "ref_7uSyy9FqVLCFWrdPeZaK",
"link_id": "lnk_7uSyy9FqVLCFWrdPeZaK",
"coupon_id": "cpn_7uSyy9FqVLCFWrdPeZaK",
"lead_at": "2026-08-21T10:15:30.000Z",
"converted_at": "2026-08-21T10:15:30.000Z",
"created_at": "2026-08-21T10:15:30.000Z",
"updated_at": "2026-08-21T10:15:30.000Z"
}Changes
No recorded changes to this operation across all 1 revision of this API.