API reference
Share keys
A share key copies an access or a course from one Sublaunch to another, as Share key and Import with key in the app. The owner gets the key of an access or a course and gives it to another creator, who imports a copy into their own Sublaunch. The original never changes.
An imported access keeps its words, cover and settings, gets its own codes, opens to the members of every tier and is connected again with Connect an access. A TradingView indicator's session cookie never goes with it. An imported course is the importer's own private copy, with its lessons.
Imports wait in the Sublaunch's draft until you publish the draft. A team member's key needs Access for an access and Classroom for a course.
The share key object
An access's or a course's key, or what it copied, as Share key and Import with key in the app.
Attributes
- objectstringAlways
share_key. - actionstringWhat was done.
getimport - kindstringWhat the key opens.
accesscourse - access_idstringWith
get, the access whose key it is. - course_idstringWith
get, the course whose key it is. - keystringWith
get, the key, likeSLK-…. The same at each ask. - accessobjectWith
import, the copy, an access object. - courseobjectWith
import, the copy, a course object.
{
"object": "share_key",
"action": "get",
"kind": "course",
"course_id": "Hc4mQ9xRt2",
"key": "SLK-q8Zr3mK2xV7pL9nT4wB6cY1dF5hJ0sGa"
}Get or import a key
Gives an access's or a course's share key, or imports what a key opens into the key's Sublaunch. get returns the key of access_id or course_id, made at the first ask and the same after, to give another creator. import copies what key opens. An access comes last in Access, in the draft, with its words, cover and settings, new codes, open to every tier and not connected. A course is copied at once as the owner's own private course, its card first in Access, in the draft.
Body parameters
- actionstringRequired
getgives the key ofaccess_idorcourse_id.importcopies whatkeyopens into this Sublaunch.getimport - access_idstringFor
get, the access whose key to give, as List accesses returns it. - course_idstringFor
get, the course whose key to give, as List courses returns it. Giveaccess_idorcourse_id, not both. - keystringFor
import, the key another creator gave, likeSLK-…. - kindstringFor
import,accessorcourse, what the key opens. Found by the key when left out.accesscourse - listed_instringDeprecated and ignored. An imported course's card goes in Access.
classroomaccess
Returns
A share key object, with the key for get, and the copied access or course for import.
Errors
- Neither
access_idnorcourse_id, both, a field another action takes, or a key that opens nothing.paramnames it. - 403forbiddenA team member's role does not edit Access for an access, or Classroom for a course.
- No access or course with this ID in the key's Sublaunch.
- The key could not be made. Try again.
curl -X POST https://api.sublaunch.com/v1/share-keys \
-H "Authorization: Bearer $SUBLAUNCH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"action": "get",
"course_id": "Hc4mQ9xRt2"
}'{
"object": "share_key",
"action": "get",
"kind": "course",
"course_id": "Hc4mQ9xRt2",
"key": "SLK-q8Zr3mK2xV7pL9nT4wB6cY1dF5hJ0sGa"
}