Update course
curl --request PATCH \
--url https://staging.api.soludesks.com/v1/external/learnhub/courses/{id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Customer Support Foundations",
"description": "A practical onboarding course for support teams.",
"level": "BEGINNER",
"categories": []
}
'import requests
url = "https://staging.api.soludesks.com/v1/external/learnhub/courses/{id}"
payload = {
"name": "Customer Support Foundations",
"description": "A practical onboarding course for support teams.",
"level": "BEGINNER",
"categories": []
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Customer Support Foundations',
description: 'A practical onboarding course for support teams.',
level: 'BEGINNER',
categories: []
})
};
fetch('https://staging.api.soludesks.com/v1/external/learnhub/courses/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging.api.soludesks.com/v1/external/learnhub/courses/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Customer Support Foundations',
'description' => 'A practical onboarding course for support teams.',
'level' => 'BEGINNER',
'categories' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://staging.api.soludesks.com/v1/external/learnhub/courses/{id}"
payload := strings.NewReader("{\n \"name\": \"Customer Support Foundations\",\n \"description\": \"A practical onboarding course for support teams.\",\n \"level\": \"BEGINNER\",\n \"categories\": []\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://staging.api.soludesks.com/v1/external/learnhub/courses/{id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Customer Support Foundations\",\n \"description\": \"A practical onboarding course for support teams.\",\n \"level\": \"BEGINNER\",\n \"categories\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.api.soludesks.com/v1/external/learnhub/courses/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Customer Support Foundations\",\n \"description\": \"A practical onboarding course for support teams.\",\n \"level\": \"BEGINNER\",\n \"categories\": []\n}"
response = http.request(request)
puts response.read_body{
"status": 123,
"success": true,
"code": "<string>",
"message": "<string>",
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"level": "beginner",
"description": "<string>",
"source": "MANUAL_CREATION",
"requirements": "<string>",
"status": "DRAFT",
"categories": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"created_datetime": "2023-11-07T05:31:56Z",
"updated_datetime": "2023-11-07T05:31:56Z"
}
],
"has_enrollments": true,
"quizzes_count": 123,
"cover_image_url": "<string>",
"preview_video_url": "<string>",
"preview_video_status": "<string>",
"preview_video_ready": "<string>",
"preview_video_error": "<string>",
"preview_video_has_subtitles": true,
"preview_video_playback_endpoint": "<string>",
"instructors": "<string>",
"overall_duration_seconds": 123,
"created_datetime": "2023-11-07T05:31:56Z",
"updated_datetime": "2023-11-07T05:31:56Z",
"sections": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"description": "<string>",
"order": 123,
"lessons": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"description": "<string>",
"source": "MANUAL_CREATION",
"lesson_type": "VIDEO",
"order": 123,
"text_content": "<string>",
"video_content_url": "<string>",
"video_url": "<string>",
"video_status": "<string>",
"video_ready": "<string>",
"video_error": "<string>",
"video_has_subtitles": "<string>",
"video_playback_endpoint": "<string>",
"video_caption": "<string>",
"duration_seconds": 123,
"document_url": "<string>",
"document_name": "<string>",
"image_url": "<string>",
"image_name": "<string>",
"content_media": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"media_type": "VIDEO",
"position": 123,
"file_name": "<string>",
"content_type": "<string>",
"duration_seconds": 123,
"image_url": "<string>",
"video_url": "<string>",
"video_status": "<string>",
"video_ready": "<string>",
"video_error": "<string>",
"video_has_subtitles": "<string>",
"video_playback_endpoint": "<string>"
}
],
"resources": [
{}
],
"quiz": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lesson_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lesson": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"lesson_type": "VIDEO",
"duration_seconds": 123,
"order": 123,
"section_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"course_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"status": "DRAFT",
"total_points": "<string>",
"created_datetime": "2023-11-07T05:31:56Z",
"updated_datetime": "2023-11-07T05:31:56Z"
},
"created_datetime": "2023-11-07T05:31:56Z",
"updated_datetime": "2023-11-07T05:31:56Z"
}
],
"created_datetime": "2023-11-07T05:31:56Z",
"updated_datetime": "2023-11-07T05:31:56Z"
}
]
},
"errors": [
{}
]
}{
"status": 400,
"success": false,
"code": "REQUEST_FAILED",
"message": "Bad request.",
"data": null,
"errors": []
}{
"status": 401,
"success": false,
"code": "REQUEST_FAILED",
"message": "Missing or invalid API key.",
"data": null,
"errors": []
}{
"status": 403,
"success": false,
"code": "REQUEST_FAILED",
"message": "Permission denied, inactive service provider, or unsupported key mode.",
"data": null,
"errors": []
}{
"status": 404,
"success": false,
"code": "REQUEST_FAILED",
"message": "Resource not found.",
"data": null,
"errors": []
}{
"status": 409,
"success": false,
"code": "REQUEST_FAILED",
"message": "Idempotency conflict or request already in progress.",
"data": null,
"errors": []
}{
"status": 422,
"success": false,
"code": "REQUEST_FAILED",
"message": "Validation failed.",
"data": null,
"errors": []
}{
"status": 429,
"success": false,
"code": "REQUEST_FAILED",
"message": "Rate limit exceeded.",
"data": null,
"errors": []
}{
"status": 500,
"success": false,
"code": "REQUEST_FAILED",
"message": "Internal server error.",
"data": null,
"errors": []
}Courses
Update Course
Update course through SoluDesks APIs.
Tenant API keys operate inside the tenant LearnHub workspace. Service-provider API keys use the same endpoint family for service-provider-owned admin training content where supported.
PATCH
/
v1
/
external
/
learnhub
/
courses
/
{id}
Update course
curl --request PATCH \
--url https://staging.api.soludesks.com/v1/external/learnhub/courses/{id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Customer Support Foundations",
"description": "A practical onboarding course for support teams.",
"level": "BEGINNER",
"categories": []
}
'import requests
url = "https://staging.api.soludesks.com/v1/external/learnhub/courses/{id}"
payload = {
"name": "Customer Support Foundations",
"description": "A practical onboarding course for support teams.",
"level": "BEGINNER",
"categories": []
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Customer Support Foundations',
description: 'A practical onboarding course for support teams.',
level: 'BEGINNER',
categories: []
})
};
fetch('https://staging.api.soludesks.com/v1/external/learnhub/courses/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging.api.soludesks.com/v1/external/learnhub/courses/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Customer Support Foundations',
'description' => 'A practical onboarding course for support teams.',
'level' => 'BEGINNER',
'categories' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://staging.api.soludesks.com/v1/external/learnhub/courses/{id}"
payload := strings.NewReader("{\n \"name\": \"Customer Support Foundations\",\n \"description\": \"A practical onboarding course for support teams.\",\n \"level\": \"BEGINNER\",\n \"categories\": []\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://staging.api.soludesks.com/v1/external/learnhub/courses/{id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Customer Support Foundations\",\n \"description\": \"A practical onboarding course for support teams.\",\n \"level\": \"BEGINNER\",\n \"categories\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.api.soludesks.com/v1/external/learnhub/courses/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Customer Support Foundations\",\n \"description\": \"A practical onboarding course for support teams.\",\n \"level\": \"BEGINNER\",\n \"categories\": []\n}"
response = http.request(request)
puts response.read_body{
"status": 123,
"success": true,
"code": "<string>",
"message": "<string>",
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"level": "beginner",
"description": "<string>",
"source": "MANUAL_CREATION",
"requirements": "<string>",
"status": "DRAFT",
"categories": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"created_datetime": "2023-11-07T05:31:56Z",
"updated_datetime": "2023-11-07T05:31:56Z"
}
],
"has_enrollments": true,
"quizzes_count": 123,
"cover_image_url": "<string>",
"preview_video_url": "<string>",
"preview_video_status": "<string>",
"preview_video_ready": "<string>",
"preview_video_error": "<string>",
"preview_video_has_subtitles": true,
"preview_video_playback_endpoint": "<string>",
"instructors": "<string>",
"overall_duration_seconds": 123,
"created_datetime": "2023-11-07T05:31:56Z",
"updated_datetime": "2023-11-07T05:31:56Z",
"sections": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"description": "<string>",
"order": 123,
"lessons": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"description": "<string>",
"source": "MANUAL_CREATION",
"lesson_type": "VIDEO",
"order": 123,
"text_content": "<string>",
"video_content_url": "<string>",
"video_url": "<string>",
"video_status": "<string>",
"video_ready": "<string>",
"video_error": "<string>",
"video_has_subtitles": "<string>",
"video_playback_endpoint": "<string>",
"video_caption": "<string>",
"duration_seconds": 123,
"document_url": "<string>",
"document_name": "<string>",
"image_url": "<string>",
"image_name": "<string>",
"content_media": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"media_type": "VIDEO",
"position": 123,
"file_name": "<string>",
"content_type": "<string>",
"duration_seconds": 123,
"image_url": "<string>",
"video_url": "<string>",
"video_status": "<string>",
"video_ready": "<string>",
"video_error": "<string>",
"video_has_subtitles": "<string>",
"video_playback_endpoint": "<string>"
}
],
"resources": [
{}
],
"quiz": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lesson_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lesson": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"lesson_type": "VIDEO",
"duration_seconds": 123,
"order": 123,
"section_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"course_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"status": "DRAFT",
"total_points": "<string>",
"created_datetime": "2023-11-07T05:31:56Z",
"updated_datetime": "2023-11-07T05:31:56Z"
},
"created_datetime": "2023-11-07T05:31:56Z",
"updated_datetime": "2023-11-07T05:31:56Z"
}
],
"created_datetime": "2023-11-07T05:31:56Z",
"updated_datetime": "2023-11-07T05:31:56Z"
}
]
},
"errors": [
{}
]
}{
"status": 400,
"success": false,
"code": "REQUEST_FAILED",
"message": "Bad request.",
"data": null,
"errors": []
}{
"status": 401,
"success": false,
"code": "REQUEST_FAILED",
"message": "Missing or invalid API key.",
"data": null,
"errors": []
}{
"status": 403,
"success": false,
"code": "REQUEST_FAILED",
"message": "Permission denied, inactive service provider, or unsupported key mode.",
"data": null,
"errors": []
}{
"status": 404,
"success": false,
"code": "REQUEST_FAILED",
"message": "Resource not found.",
"data": null,
"errors": []
}{
"status": 409,
"success": false,
"code": "REQUEST_FAILED",
"message": "Idempotency conflict or request already in progress.",
"data": null,
"errors": []
}{
"status": 422,
"success": false,
"code": "REQUEST_FAILED",
"message": "Validation failed.",
"data": null,
"errors": []
}{
"status": 429,
"success": false,
"code": "REQUEST_FAILED",
"message": "Rate limit exceeded.",
"data": null,
"errors": []
}{
"status": 500,
"success": false,
"code": "REQUEST_FAILED",
"message": "Internal server error.",
"data": null,
"errors": []
}Authorizations
External API key. Format: Bearer <API_KEY>
Path Parameters
Body
application/json
Maximum string length:
255DRAFT- DraftPUBLISHED- PublishedARCHIVED- Archived
Available options:
DRAFT, PUBLISHED, ARCHIVED beginner- Beginnerintermediate- Intermediateadvanced- Advanced
Available options:
beginner, intermediate, advanced 