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
- idstringUnique identifier for the access.
- objectstringAlways
access. - typestringWhat it is. A Telegram, Discord, WhatsApp, TradingView or GPT access is connected in the app.
telegramdiscordwhatsapptrading_viewgptlinkpdffile - titlestringIts name on the members' page.
- descriptionstringA few words under its name.
- tier_idsarray of stringsThe tiers that open it.
- urlstring or nullThe link, or the file's URL, for a
link, apdfor afile. - file_namestring or nullThe file's name, for a
pdfor afile. - connectedbooleanWhether a Telegram, Discord, WhatsApp, TradingView or GPT access is connected. Always
truefor the others. - livebooleanWhether members have it now.
falsewhile it is only in the draft.
{
"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
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.
curl https://api.sublaunch.com/v1/accesses \
-H "Authorization: Bearer $SUBLAUNCH_API_KEY"{
"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
Adds a link, a PDF or a file to what the Sublaunch's tiers open, in the draft.
Body parameters
- typestringRequiredA
link, apdfor afile. The other types are connected in the app.linkpdffile - titlestringRequiredIts name on the members' page, 80 characters at most.
- urlstringRequiredThe link, or the file's public HTTPS URL.
- file_namestringThe file's name, for a
pdfor afile. - descriptionstringA few words under its name, 1 000 characters at most.
- tier_idsarray of stringsThe tiers that open it, by ID. Every tier by default.
Returns
The new access object.
Errors
- A required parameter is missing.
paramnames it. - A parameter has a value the API does not accept.
paramnames it. - The body has a field this endpoint does not take.
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"]
}'{
"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
Changes an access's name, description, link or the tiers that open it, in the draft.
Path parameters
- access_idstringRequiredThe access's ID, as List accesses returns it.
Body parameters
- titlestringIts name on the members' page, 80 characters at most.
- descriptionstringA few words under its name, 1 000 characters at most.
- urlstringThe link, or the file's URL. Only for a
link, apdfor afile. - tier_idsarray of stringsThe tiers that open it, by ID, one at least.
Returns
The updated access object.
Errors
- No access 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/accesses/aK3x9Q \
-H "Authorization: Bearer $SUBLAUNCH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"tier_ids": ["tier1", "tier2"]
}'{
"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
Removes an access in the draft. Members lose it once you publish the draft.
Path parameters
- access_idstringRequiredThe access's ID, as List accesses returns it.
Returns
An object with the access's id and deleted set to true.
Errors
- No access with this ID in the key's Sublaunch.
curl -X DELETE https://api.sublaunch.com/v1/accesses/pD7m2K \
-H "Authorization: Bearer $SUBLAUNCH_API_KEY"{
"id": "pD7m2K",
"object": "access",
"deleted": true
}