curl --request POST \
--url https://api.example.com/course/update \
--header 'Content-Type: application/json' \
--header 'x-access'\''courser-auth-token: <x-access'\''courser-auth-token>' \
--data '
{
"courseID": "<string>",
"name": "<string>",
"placeholder": "<string>",
"color": "<string>",
"instructions": "<string>",
"openAIKey": "<string>"
}
'{
"_id": "<string>",
"name": "<string>",
"instructions": "<string>",
"color": "<string>",
"placeholder": "<string>",
"backgroundImg": "<string>",
"openAIAssistantID": "<string>",
"openAIFiles": [
"<string>"
],
"transcriptions": [
"<string>"
],
"sourceFiles": [
"<string>"
],
"openAIKey": "<string>"
}Update a course’s name, appearance, AI instructions, and other settings. Supports image uploads.
curl --request POST \
--url https://api.example.com/course/update \
--header 'Content-Type: application/json' \
--header 'x-access'\''courser-auth-token: <x-access'\''courser-auth-token>' \
--data '
{
"courseID": "<string>",
"name": "<string>",
"placeholder": "<string>",
"color": "<string>",
"instructions": "<string>",
"openAIKey": "<string>"
}
'{
"_id": "<string>",
"name": "<string>",
"instructions": "<string>",
"color": "<string>",
"placeholder": "<string>",
"backgroundImg": "<string>",
"openAIAssistantID": "<string>",
"openAIFiles": [
"<string>"
],
"transcriptions": [
"<string>"
],
"sourceFiles": [
"<string>"
],
"openAIKey": "<string>"
}courseID are optional — only the fields you include will be updated. Authentication is required.
multipart/form-data. If you are only updating text fields, you can send the request as application/json."#3b82f6".multipart/form-data. The image is uploaded to Cloudinary and the resulting URL is stored in backgroundImg.curl --request POST \
--url http://localhost:8000/course/update \
--header "x-access'courser-auth-token: <your_jwt_token>" \
--header 'Content-Type: application/json' \
--data '{
"courseID": "64f1a2b3c4d5e6f7a8b9c0d1",
"name": "Advanced Marine Biology",
"color": "#3b82f6",
"placeholder": "Ask me anything about marine ecosystems",
"instructions": "You are an expert marine biology tutor. Provide detailed, scientifically accurate answers."
}'
{
"_id": "64f1a2b3c4d5e6f7a8b9c0d1",
"name": "Advanced Marine Biology",
"instructions": "You are an expert marine biology tutor. Provide detailed, scientifically accurate answers.",
"color": "#3b82f6",
"placeholder": "Ask me anything about marine ecosystems",
"backgroundImg": "https://res.cloudinary.com/dlk3ezbal/image/upload/v1699589098/newimage.png",
"openAIAssistantID": "asst_abc123xyz",
"openAIFiles": ["file-abc123"],
"transcriptions": ["64f1a2b3c4d5e6f7a8b9c0d2"],
"sourceFiles": [],
"openAIKey": ""
}