Affiliates
Create affiliate
Changed onCreates an affiliate for a user on an account. If the user is already an affiliate of the account, returns that affiliate, reactivating it if it was archived.
Required permissions:
- affiliate:create
post/affiliates
Request
- Base URL: https://api.whop.com/api/v1
- URL: https://api.whop.com/api/v1/affiliates
- Auth: HTTP bearer
Request body
Example request
{
"account_id": "biz_xxxxxxxxxxxxxx"
}Response
A successful response
Example response
{
"active_members_count": 42,
"company": {
"id": "biz_xxxxxxxxxxxxxx"
},
"created_at": "2023-12-01T05:00:00.401Z",
"id": "aff_xxxxxxxxxxxxxx",
"total_overrides_count": 42,
"total_referrals_count": 42,
"updated_at": "2023-12-01T05:00:00.401Z",
"user": {
"id": "user_xxxxxxxxxxxxx",
"name": "Jane Smith",
"username": "janesmith"
}
}Changes
- breaking
added the new required request property
- warning
removed the request property
- breaking