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

  • idstring
    Unique identifier for the affiliate.
  • objectstring
    Always affiliate.
  • user_idstring or null
    Their Sublaunch user ID.
  • codestring or null
    Their referral code.
  • commission_ratenumber
    The percent they earn of each payment they bring, as drafted until published.
  • statusstring
    inactive while they are paused.
    activeinactivedeleted
  • members_activeinteger
    Members they brought whose membership is active now.
  • members_totalinteger
    Members they ever brought.
  • joined_atstring
    When they joined the program, ISO 8601.
Affiliate object
{
  "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

GET/v1/affiliatesread scopeMCPlist_affiliates

Returns the Sublaunch's affiliates, newest first.

Query parameters

  • statusstring
    Only the affiliates with this status.
    activeinactive
  • limitinteger
    How many objects to return, from 1 to 100. 25 by default.
  • cursorstring
    The next_cursor of 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. param names it.
  • The cursor is not one this list gave, was made for other filters, or goes deeper than its limit.
GET/v1/affiliates
curl -G https://api.sublaunch.com/v1/affiliates \
  -H "Authorization: Bearer $SUBLAUNCH_API_KEY" \
  -d status=active
Response200
{
  "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

PATCH/v1/affiliates/:affiliate_idwrite scopeMCPupdate_affiliate

Changes an affiliate's commission in the draft, or pauses them at once. They get an email.

Path parameters

  • affiliate_idstringRequired
    The affiliate's ID, as List affiliates returns it.

Body parameters

  • commission_ratenumber
    The percent they earn of each payment they bring, from 0 to 100.
  • statusstring
    inactive pauses them, active turns them back on.
    activeinactive

Returns

The updated affiliate object.

Errors

PATCH/v1/affiliates/:affiliate_id
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
  }'
Response200
{
  "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

DELETE/v1/affiliates/:affiliate_idwrite scopeMCPdelete_affiliate

Removes an affiliate from the program. Their link stops paying them, and they get an email.

Path parameters

  • affiliate_idstringRequired
    The affiliate's ID, as List affiliates returns it.

Returns

An object with the affiliate's id and deleted set to true.

Errors

DELETE/v1/affiliates/:affiliate_id
curl -X DELETE \
  https://api.sublaunch.com/v1/affiliates/Af6tR2kQxM \
  -H "Authorization: Bearer $SUBLAUNCH_API_KEY"
Response200
{
  "id": "Af6tR2kQxM",
  "object": "affiliate",
  "deleted": true
}

The affiliate program object

Your Sublaunch's affiliate program, with the invitation codes people join it with.

Attributes

  • objectstring
    Always affiliate_program.
  • onboolean
    Whether the program has an invitation code to join it.
  • descriptionstring
    What the program says to affiliates.
  • invitation_codesarray of objects
    Its invitation codes.
Affiliate program object
{
  "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

GET/v1/affiliate-programread scopeMCPget_affiliate_program

Returns the Sublaunch's affiliate program as drafted, on or off, with its invitation codes and the commission each gives.

Returns

The affiliate program object.

GET/v1/affiliate-program
curl https://api.sublaunch.com/v1/affiliate-program \
  -H "Authorization: Bearer $SUBLAUNCH_API_KEY"
Response200
{
  "object": "affiliate_program",
  "on": true,
  "description": "Earn 30% of every payment you bring.",
  "invitation_codes": [
    {
      "code": "PARTNERS",
      "commission_rate": 30,
      "from_affiliate_tab": true
    }
  ]
}