lessons

Embed
Preview of the card
<a href="https://linkyhub.net/docs/ref-lessons"><img src="https://linkyhub.net/docs/_api/public/orgs/2fd2a4b7-b627-4925-af1e-1c51bf890403/spaces/c4b920fb-a433-40b5-b354-ff84bf0c3eb1/pages/1dce9765-c08a-4473-a7bb-1dfc89bee8b0/social-card.svg?v=3e7ae33eec8b" alt="lessons" width="600" height="315"></a>
GEThttps://linkyhub.net/api/v3/products/{productId}/lessonsScope products:read

A course’s lessons, in order.

Parameters

productIdstringpathrequired

Code samples

cURL
curl -X GET "https://linkyhub.net/api/v3/products/{productId}/lessons" \
  -H "Authorization: Bearer $LINKYHUB_API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Done.
Example
{
  "data": [
    {}
  ]
}
Schema
dataobject[]required
Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
default An error.
Example
{
  "error": "string",
  "message": "string"
}
Schema
errorstringrequired
A stable code to branch on, e.g. insufficient_scope.
messagestringrequired
A sentence to show a person.
Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
POSThttps://linkyhub.net/api/v3/products/{productId}/lessonsScope products:write

Add a lesson at the end. A digital download becomes a course.

Parameters

productIdstringpathrequired

Request body

application/json
titlestringrequired
bodystring
videoUrlstring
isPreviewboolean
Readable by anyone, as the course sample.
{
  "title": "string",
  "body": "string",
  "videoUrl": "string",
  "isPreview": true
}

Code samples

cURL
curl -X POST "https://linkyhub.net/api/v3/products/{productId}/lessons" \
  -H "Authorization: Bearer $LINKYHUB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"title":"string","body":"string","videoUrl":"string","isPreview":true}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

201 Done.
{}
Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
default An error.

Same as default · GET /products/{productId}/lessons

Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
DELETEhttps://linkyhub.net/api/v3/lessons/{lessonId}Scope products:write

Delete a lesson.

Parameters

lessonIdstringpathrequired

Code samples

cURL
curl -X DELETE "https://linkyhub.net/api/v3/lessons/{lessonId}" \
  -H "Authorization: Bearer $LINKYHUB_API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Done.
{}
Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
default An error.

Same as default · GET /products/{productId}/lessons

Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
PATCHhttps://linkyhub.net/api/v3/lessons/{lessonId}Scope products:write

Change a lesson. Only the fields sent change; null clears body or video.

Parameters

lessonIdstringpathrequired

Request body

application/json
titlestring
bodystring
videoUrlstring
isPreviewboolean
Readable by anyone, as the course sample.
{
  "title": "string",
  "body": "string",
  "videoUrl": "string",
  "isPreview": true
}

Code samples

cURL
curl -X PATCH "https://linkyhub.net/api/v3/lessons/{lessonId}" \
  -H "Authorization: Bearer $LINKYHUB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"title":"string","body":"string","videoUrl":"string","isPreview":true}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Done.
{}
Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
default An error.

Same as default · GET /products/{productId}/lessons

Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
POSThttps://linkyhub.net/api/v3/lessons/{lessonId}/moveScope products:write

Move a lesson between two others of the same course (null for either end).

Parameters

lessonIdstringpathrequired

Request body

application/json
beforeIdstringrequired
afterIdstringrequired
{
  "beforeId": "string",
  "afterId": "string"
}

Code samples

cURL
curl -X POST "https://linkyhub.net/api/v3/lessons/{lessonId}/move" \
  -H "Authorization: Bearer $LINKYHUB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"beforeId":"string","afterId":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Done.
{}
Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
default An error.

Same as default · GET /products/{productId}/lessons

Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
Updated