Upload an image
POST/media/images
Uploads an image through the same organization storage, security validation, optimization, and deduplication pipeline used by the course editor. Send raw file bytes as canonical base64, without a data URL prefix. The returned permanent URL can be placed in a content cover or image block.
Request body
contentTypeenumrequiredMIME type of the encoded image. It must match the file signature.
image/jpegimage/pngimage/webpimage/gif
datastringrequiredRaw image bytes encoded as canonical base64, without data:image/...;base64,. Maximum decoded size: 3 MB.
filenamestringrequiredOriginal filename, including its extension, for audit and storage metadata.
Responses
200Upload an image.400Validation failed or the request body is malformed.401Missing, invalid or revoked API key.403The key's organization does not own this resource.429Rate limit exceeded (240 reads/min, 60 writes/min per key).500Unexpected server error.curl https://api.cursare.com/v1/media/images \
--request POST \
--header 'Authorization: Bearer cr_live_…' \
--header 'Content-Type: application/json' \
--data '{
"contentType": "image/jpeg",
"data": "string",
"filename": "string"
}'{
"data": {
"deduplicated": true,
"mime": "string",
"size": 0,
"url": "string"
}
}