API reference
Affiliates
Affiliates sell your Sublaunch for a commission on each payment they bring. They join your affiliate program with one of its invitation codes. A change or a removal sends them an email, as from the app.
A new commission waits in the Sublaunch's draft until you publish the draft. Pausing or removing an affiliate is at once.
The affiliate object
Someone who sells your Sublaunch for a commission on each payment they bring.
Attributes
- idstringUnique identifier for the affiliate.
- objectstringAlways
affiliate. - user_idstring or nullTheir Sublaunch user ID.
- codestring or nullTheir referral code.
- commission_ratenumberThe percent they earn of each payment they bring, as drafted until published.
- statusstring
inactivewhile they are paused.activeinactivedeleted - members_activeintegerMembers they brought whose membership is active now.
- members_totalintegerMembers they ever brought.
- joined_atstringWhen they joined the program, ISO 8601.
{
"id": "Af6tR2kQxM",
"object": "affiliate",
"user_id": "Us7mQ2kX9P",
"code": "482913",
"commission_rate": 30,
"status": "active",
"members_active": 14,
"members_total": 22,
"joined_at": "2026-09-02T18:41:07.000Z"
}List affiliates
Returns the Sublaunch's affiliates, newest first.
Query parameters
- statusstringOnly the affiliates with this status.
activeinactive - limitintegerHow many objects to return, from 1 to 100. 25 by default.
- cursorstringThe
next_cursorof the previous page, to get the page after it. Keep the other parameters the same. See Pagination.
Returns
A list of affiliate objects.
Errors
- A parameter has a value the API does not accept.
paramnames it. - The
cursoris not one this list gave, was made for other filters, or goes deeper than its limit.
curl -G https://api.sublaunch.com/v1/affiliates \
-H "Authorization: Bearer $SUBLAUNCH_API_KEY" \
-d status=active{
"object": "list",
"data": [
{
"id": "Af6tR2kQxM",
"object": "affiliate",
"user_id": "Us7mQ2kX9P",
"code": "482913",
"commission_rate": 30,
"status": "active",
"members_active": 14,
"members_total": 22,
"joined_at": "2026-09-02T18:41:07.000Z"
}
],
"has_more": true,
"next_cursor": "eyJ0IjoiMjAyNi0xMS0xNVQxNzowMjo0MC4wMDBaIn0"
}Update an affiliate
Changes an affiliate's commission in the draft, or pauses them at once. They get an email.
Path parameters
- affiliate_idstringRequiredThe affiliate's ID, as List affiliates returns it.
Body parameters
- commission_ratenumberThe percent they earn of each payment they bring, from 0 to 100.
- statusstring
inactivepauses them,activeturns them back on.activeinactive
Returns
The updated affiliate object.
Errors
- No affiliate with this ID in the key's Sublaunch.
- A parameter has a value the API does not accept.
paramnames it. - The body has a field this endpoint does not take.
curl -X PATCH \
https://api.sublaunch.com/v1/affiliates/Af6tR2kQxM \
-H "Authorization: Bearer $SUBLAUNCH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"commission_rate": 40
}'{
"id": "Af6tR2kQxM",
"object": "affiliate",
"user_id": "Us7mQ2kX9P",
"code": "482913",
"commission_rate": 40,
"status": "active",
"members_active": 14,
"members_total": 22,
"joined_at": "2026-09-02T18:41:07.000Z"
}Delete an affiliate
Removes an affiliate from the program. Their link stops paying them, and they get an email.
Path parameters
- affiliate_idstringRequiredThe affiliate's ID, as List affiliates returns it.
Returns
An object with the affiliate's id and deleted set to true.
Errors
- No affiliate with this ID in the key's Sublaunch.
curl -X DELETE \
https://api.sublaunch.com/v1/affiliates/Af6tR2kQxM \
-H "Authorization: Bearer $SUBLAUNCH_API_KEY"{
"id": "Af6tR2kQxM",
"object": "affiliate",
"deleted": true
}The affiliate program object
Your Sublaunch's affiliate program, with the invitation codes people join it with.
Attributes
- objectstringAlways
affiliate_program. - onbooleanWhether the program has an invitation code to join it.
- descriptionstringWhat the program says to affiliates.
- invitation_codesarray of objectsIts invitation codes.
{
"object": "affiliate_program",
"on": true,
"description": "Earn 30% of every payment you bring.",
"invitation_codes": [
{
"code": "PARTNERS",
"commission_rate": 30,
"from_affiliate_tab": true
}
]
}Retrieve the affiliate program
Returns the Sublaunch's affiliate program as drafted, on or off, with its invitation codes and the commission each gives.
Returns
curl https://api.sublaunch.com/v1/affiliate-program \
-H "Authorization: Bearer $SUBLAUNCH_API_KEY"{
"object": "affiliate_program",
"on": true,
"description": "Earn 30% of every payment you bring.",
"invitation_codes": [
{
"code": "PARTNERS",
"commission_rate": 30,
"from_affiliate_tab": true
}
]
}