API reference

Accesses

An access is what a membership opens besides the courses. Groups and tools like Telegram, Discord, WhatsApp, TradingView and GPT are connected in the app, the API lists them. Links, PDFs and files can be added here too.

Accesses change in the Sublaunch's draft. Members get them once you publish the draft.

The access object

Something a membership opens besides the courses, like a Telegram group, a Discord server, a link or a file.

Attributes

  • idstring
    Unique identifier for the access.
  • objectstring
    Always access.
  • typestring
    What it is. A Telegram, Discord, WhatsApp, TradingView or GPT access is connected in the app.
    telegramdiscordwhatsapptrading_viewgptlinkpdffile
  • titlestring
    Its name on the members' page.
  • descriptionstring
    A few words under its name.
  • tier_idsarray of strings
    The tiers that open it.
  • urlstring or null
    The link, or the file's URL, for a link, a pdf or a file.
  • file_namestring or null
    The file's name, for a pdf or a file.
  • connectedboolean
    Whether a Telegram, Discord, WhatsApp, TradingView or GPT access is connected. Always true for the others.
  • liveboolean
    Whether members have it now. false while it is only in the draft.
Access object
{
  "id": "aK3x9Q",
  "object": "access",
  "type": "telegram",
  "title": "Private Telegram group",
  "description": "Live alerts and the daily setup.",
  "tier_ids": ["tier1"],
  "url": null,
  "file_name": null,
  "connected": true,
  "live": true
}

List accesses

GET/v1/accessesread scopeMCPlist_accesses

Returns what the Sublaunch's tiers open besides courses, with the tiers of each, connected or not, live or only in the draft.

Returns

A list of access objects, whole in one page.

GET/v1/accesses
curl https://api.sublaunch.com/v1/accesses \
  -H "Authorization: Bearer $SUBLAUNCH_API_KEY"
Response200
{
  "object": "list",
  "data": [
    {
      "id": "aK3x9Q",
      "object": "access",
      "type": "telegram",
      "title": "Private Telegram group",
      "description": "Live alerts and the daily setup.",
      "tier_ids": ["tier1"],
      "url": null,
      "file_name": null,
      "connected": true,
      "live": true
    },
    {
      "id": "pD7m2K",
      "object": "access",
      "type": "pdf",
      "title": "Risk management playbook",
      "description": "The rules we trade by, in 20 pages.",
      "tier_ids": ["tier1"],
      "url": "https://example.com/playbook.pdf",
      "file_name": "playbook.pdf",
      "connected": true,
      "live": false
    }
  ],
  "has_more": false,
  "next_cursor": null
}

Create an access

POST/v1/accesseswrite scopeMCPcreate_access

Adds a link, a PDF or a file to what the Sublaunch's tiers open, in the draft.

Body parameters

  • typestringRequired
    A link, a pdf or a file. The other types are connected in the app.
    linkpdffile
  • titlestringRequired
    Its name on the members' page, 80 characters at most.
  • urlstringRequired
    The link, or the file's public HTTPS URL.
  • file_namestring
    The file's name, for a pdf or a file.
  • descriptionstring
    A few words under its name, 1 000 characters at most.
  • tier_idsarray of strings
    The tiers that open it, by ID. Every tier by default.

Returns

The new access object.

Errors

POST/v1/accesses
curl -X POST https://api.sublaunch.com/v1/accesses \
  -H "Authorization: Bearer $SUBLAUNCH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "pdf",
    "title": "Risk management playbook",
    "url": "https://example.com/playbook.pdf",
    "file_name": "playbook.pdf",
    "tier_ids": ["tier1"]
  }'
Response201
{
  "id": "pD7m2K",
  "object": "access",
  "type": "pdf",
  "title": "Risk management playbook",
  "description": "The rules we trade by, in 20 pages.",
  "tier_ids": ["tier1"],
  "url": "https://example.com/playbook.pdf",
  "file_name": "playbook.pdf",
  "connected": true,
  "live": false
}

Update an access

PATCH/v1/accesses/:access_idwrite scopeMCPupdate_access

Changes an access's name, description, link or the tiers that open it, in the draft.

Path parameters

  • access_idstringRequired
    The access's ID, as List accesses returns it.

Body parameters

  • titlestring
    Its name on the members' page, 80 characters at most.
  • descriptionstring
    A few words under its name, 1 000 characters at most.
  • urlstring
    The link, or the file's URL. Only for a link, a pdf or a file.
  • tier_idsarray of strings
    The tiers that open it, by ID, one at least.

Returns

The updated access object.

Errors

PATCH/v1/accesses/:access_id
curl -X PATCH https://api.sublaunch.com/v1/accesses/aK3x9Q \
  -H "Authorization: Bearer $SUBLAUNCH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "tier_ids": ["tier1", "tier2"]
  }'
Response200
{
  "id": "aK3x9Q",
  "object": "access",
  "type": "telegram",
  "title": "Private Telegram group",
  "description": "Live alerts and the daily setup.",
  "tier_ids": ["tier1", "tier2"],
  "url": null,
  "file_name": null,
  "connected": true,
  "live": false
}

Delete an access

DELETE/v1/accesses/:access_idwrite scopeMCPdelete_access

Removes an access in the draft. Members lose it once you publish the draft.

Path parameters

  • access_idstringRequired
    The access's ID, as List accesses returns it.

Returns

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

Errors

DELETE/v1/accesses/:access_id
curl -X DELETE https://api.sublaunch.com/v1/accesses/pD7m2K \
  -H "Authorization: Bearer $SUBLAUNCH_API_KEY"
Response200
{
  "id": "pD7m2K",
  "object": "access",
  "deleted": true
}