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

  • objectstring
    Always share_key.
  • actionstring
    What was done.
    getimport
  • kindstring
    What the key opens.
    accesscourse
  • access_idstring
    With get, the access whose key it is.
  • course_idstring
    With get, the course whose key it is.
  • keystring
    With get, the key, like SLK-…. The same at each ask.
  • accessobject
    With import, the copy, an access object.
  • courseobject
    With import, the copy, a course object.
Share key object
{
  "object": "share_key",
  "action": "get",
  "kind": "course",
  "course_id": "Hc4mQ9xRt2",
  "key": "SLK-q8Zr3mK2xV7pL9nT4wB6cY1dF5hJ0sGa"
}

Get or import a key

POST/v1/share-keyswrite scopeMCPshare_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
    get gives the key of access_id or course_id. import copies what key opens into this Sublaunch.
    getimport
  • access_idstring
    For get, the access whose key to give, as List accesses returns it.
  • course_idstring
    For get, the course whose key to give, as List courses returns it. Give access_id or course_id, not both.
  • keystring
    For import, the key another creator gave, like SLK-….
  • kindstring
    For import, access or course, what the key opens. Found by the key when left out.
    accesscourse
  • listed_instring
    Deprecated 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_id nor course_id, both, a field another action takes, or a key that opens nothing. param names it.
  • A 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.
POST/v1/share-keys
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"
  }'
Response200
{
  "object": "share_key",
  "action": "get",
  "kind": "course",
  "course_id": "Hc4mQ9xRt2",
  "key": "SLK-q8Zr3mK2xV7pL9nT4wB6cY1dF5hJ0sGa"
}