Skip to main content
POST
/
course
/
update
Update course
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>"
}
Updates one or more settings for an existing course. All body fields except courseID are optional — only the fields you include will be updated. Authentication is required.
If you are uploading a background image, send the request as multipart/form-data. If you are only updating text fields, you can send the request as application/json.

Request headers

x-access'courser-auth-token
string
required
Your JWT authentication token.

Request body

courseID
string
required
The ID of the course to update.
name
string
New display name for the course.
placeholder
string
New input hint text shown in the chatbot’s message field.
color
string
New accent color for the chatbot UI as a hex string, e.g. "#3b82f6".
instructions
string
Custom AI system prompt that replaces the default assistant instructions.
openAIKey
string
A custom OpenAI API key to use for this course instead of the platform default.
image
file
A background image for the chatbot. Must be sent as multipart/form-data. The image is uploaded to Cloudinary and the resulting URL is stored in backgroundImg.

Response

200 — Success

Returns the full updated course object.
_id
string
Unique identifier for the course.
name
string
The course display name.
instructions
string
The AI system prompt used by the course chatbot.
color
string
The chatbot accent color as a hex string.
placeholder
string
The input field hint text shown in the chatbot UI.
backgroundImg
string
URL of the chatbot background image. Updated to a new Cloudinary URL if an image was uploaded.
openAIAssistantID
string
The OpenAI assistant ID for this course.
openAIFiles
string[]
IDs of files uploaded to OpenAI for retrieval.
transcriptions
string[]
Array of Transcription document IDs for the course’s processed videos.
sourceFiles
string[]
Array of Source document IDs (MongoDB ObjectIds) for the processed YouTube videos.
openAIKey
string
Custom OpenAI API key for this course, if set.

Examples

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."
  }'
200
{
  "_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": ""
}

Build docs developers (and LLMs) love