List Case Studies
GET /v1/console/case-studies
List all case studies in the tenant, including inactive ones.
Authentication
Requires CASE_STUDIES.can_view permission.
Query parameters
Number of records to skip.
Max records to return (1-100).
Include inactive case studies.
Example request
curl "https://mind-be.staging.miva.university/v1/console/case-studies?include_inactive=true" \
-H "Authorization: Bearer <access_token>"
Response
{
"success": true,
"data": [
{
"id": "6650e5f6a7b8c9d0e1f2a3b4",
"title": "Diabetic Patient Consultation",
"slug": "diabetic-patient-consultation",
"description": "Practice a consultation with a Type 2 diabetic patient...",
"avatar_id": "6650a1b2c3d4e5f6a7b8c9d0",
"avatar": {
"id": "6650a1b2c3d4e5f6a7b8c9d0",
"name": "Maria Rodriguez",
"image_url": "https://cdn.example.com/avatars/maria.png",
"bio": "Maria is a 54-year-old teacher recently diagnosed with Type 2 diabetes.",
"role": "Patient",
"tags": ["diabetes", "chronic-care"],
"is_active": true
},
"media_url": null,
"document_url": null,
"instructions": [],
"time_limit_minutes": null,
"is_active": true,
"created_at": "2025-06-01T14:00:00Z"
}
],
"total": 1,
"page": 1,
"page_size": 20,
"total_pages": 1,
"message": null
}
Get Case Study
GET /v1/console/case-studies/{case_study_id}
Get the full case study detail including system prompt and AI overrides.
Authentication
Requires CASE_STUDIES.can_view permission.
Path parameters
Example request
curl https://mind-be.staging.miva.university/v1/console/case-studies/6650e5f6a7b8c9d0e1f2a3b4 \
-H "Authorization: Bearer <access_token>"
Response
{
"success": true,
"data": {
"id": "6650e5f6a7b8c9d0e1f2a3b4",
"title": "Diabetic Patient Consultation",
"slug": "diabetic-patient-consultation",
"description": "Practice a consultation with a Type 2 diabetic patient...",
"avatar_id": "6650a1b2c3d4e5f6a7b8c9d0",
"avatar": {
"id": "6650a1b2c3d4e5f6a7b8c9d0",
"name": "Maria Rodriguez",
"image_url": "https://cdn.example.com/avatars/maria.png",
"bio": "Maria is a 54-year-old teacher recently diagnosed with Type 2 diabetes.",
"role": "Patient",
"tags": ["diabetes", "chronic-care"],
"is_active": true
},
"media_url": null,
"document_url": null,
"instructions": [],
"time_limit_minutes": null,
"system_prompt": null,
"first_message": null,
"llm_model": null,
"tts_voice": null,
"stt_language": null,
"knowledge_base_id": "6650d4e5f6a7b8c9d0e1f2a3",
"is_active": true,
"created_at": "2025-06-01T14:00:00Z",
"updated_at": null,
"knowledge_base_document_count": 3
},
"message": null
}
Create Case Study
POST /v1/console/case-studies
Create a new case study. Link a reusable avatar by passing its ID in the avatar field.
Authentication
Requires CASE_STUDIES.can_create permission.
Request body
Case study title. Max 255 characters.
URL-safe slug. Auto-generated from the title if omitted.
Description. Max 5000 characters.
Media URL (image/video). Max 1000 characters.
Document URL (PDF). Max 1000 characters.
List of instruction strings. Max 20 items.
Session time limit (1-180 minutes).
Custom system prompt for the AI agent.
AI’s opening message. Max 2000 characters.
Override LLM model. Max 100 characters.
Override TTS voice. Max 100 characters.
Override STT language. Max 10 characters.
Knowledge base ID for RAG context.
Example request
curl -X POST https://mind-be.staging.miva.university/v1/console/case-studies \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{
"title": "Diabetic Patient Consultation",
"description": "Practice a consultation with a Type 2 diabetic patient.",
"avatar": "6650a1b2c3d4e5f6a7b8c9d0",
"knowledge_base_id": "6650d4e5f6a7b8c9d0e1f2a3",
"time_limit_minutes": 30
}'
Response
{
"success": true,
"data": {
"id": "6650e5f6a7b8c9d0e1f2a3b4",
"title": "Diabetic Patient Consultation",
"slug": "diabetic-patient-consultation",
"description": "Practice a consultation with a Type 2 diabetic patient.",
"avatar_id": "6650a1b2c3d4e5f6a7b8c9d0",
"avatar": {
"id": "6650a1b2c3d4e5f6a7b8c9d0",
"name": "Maria Rodriguez",
"image_url": "https://cdn.example.com/avatars/maria.png",
"bio": "Maria is a 54-year-old teacher recently diagnosed with Type 2 diabetes.",
"role": "Patient",
"tags": ["diabetes", "chronic-care"],
"is_active": true
},
"media_url": null,
"document_url": null,
"instructions": [],
"time_limit_minutes": 30,
"system_prompt": null,
"first_message": null,
"llm_model": null,
"tts_voice": null,
"stt_language": null,
"knowledge_base_id": "6650d4e5f6a7b8c9d0e1f2a3",
"is_active": true,
"created_at": "2025-06-01T14:00:00Z",
"updated_at": null
},
"message": "Case study created successfully"
}
When llm_model, tts_voice, or stt_language are null, the tenant’s AI config defaults are used at runtime.
Update Case Study
PATCH /v1/console/case-studies/{case_study_id}
Partial update — only send the fields you want to change.
Authentication
Requires CASE_STUDIES.can_edit permission.
Path parameters
Request body
ID of a different reusable avatar.
Updated instructions list.
Link a different knowledge base.
Example request
curl -X PATCH https://mind-be.staging.miva.university/v1/console/case-studies/6650e5f6a7b8c9d0e1f2a3b4 \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{
"avatar": "6650b2c3d4e5f6a7b8c9d0e1",
"system_prompt": "You are Maria Rodriguez, a 54-year-old patient. Be cooperative but anxious.",
"llm_model": "gpt-4o"
}'
Response
Returns the full updated case study object.
Delete Case Study
DELETE /v1/console/case-studies/{case_study_id}
Soft-delete a case study. Students will no longer see it, but existing session data is preserved.
Authentication
Requires CASE_STUDIES.can_delete permission.
Path parameters
Example request
curl -X DELETE https://mind-be.staging.miva.university/v1/console/case-studies/6650e5f6a7b8c9d0e1f2a3b4 \
-H "Authorization: Bearer <access_token>"
Response
Returns the soft-deleted case study object with is_active: false.
List Avatars
GET /v1/console/case-study-avatars
List all case study avatars in the tenant, including inactive ones.
Authentication
Requires CASE_STUDIES.can_view permission.
Query parameters
Number of records to skip.
Max records to return (1-100).
Example request
curl "https://mind-be.staging.miva.university/v1/console/case-study-avatars" \
-H "Authorization: Bearer <access_token>"
Response
{
"success": true,
"data": [
{
"id": "6650a1b2c3d4e5f6a7b8c9d0",
"name": "Maria Rodriguez",
"image_url": "https://cdn.example.com/avatars/maria.png",
"role": "Patient",
"tags": ["diabetes", "chronic-care"],
"is_active": true,
"created_at": "2025-06-01T14:00:00Z"
}
],
"total": 1,
"page": 1,
"page_size": 20,
"total_pages": 1,
"message": null
}
Get Avatar
GET /v1/console/case-study-avatars/{avatar_id}
Get a specific avatar’s full details.
Authentication
Requires CASE_STUDIES.can_view permission.
Path parameters
Example request
curl https://mind-be.staging.miva.university/v1/console/case-study-avatars/6650a1b2c3d4e5f6a7b8c9d0 \
-H "Authorization: Bearer <access_token>"
Response
{
"success": true,
"data": {
"id": "6650a1b2c3d4e5f6a7b8c9d0",
"name": "Maria Rodriguez",
"image_url": "https://cdn.example.com/avatars/maria.png",
"bio": "Maria is a 54-year-old teacher recently diagnosed with Type 2 diabetes.",
"role": "Patient",
"tags": ["diabetes", "chronic-care"],
"is_active": true,
"created_at": "2025-06-01T14:00:00Z",
"updated_at": null
},
"message": null
}
Create Avatar
POST /v1/console/case-study-avatars
Create a reusable avatar that can be linked to case studies via the avatar field.
Authentication
Requires CASE_STUDIES.can_create permission.
Request body
Avatar name. Max 255 characters.
Avatar image URL. Max 1000 characters.
Character background. Max 2000 characters.
Character role (e.g. “Patient”, “Client”). Max 255 characters.
Tags for categorization. Max 20 items.
Example request
curl -X POST https://mind-be.staging.miva.university/v1/console/case-study-avatars \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{
"name": "Maria Rodriguez",
"role": "Patient",
"bio": "Maria is a 54-year-old teacher recently diagnosed with Type 2 diabetes.",
"tags": ["diabetes", "chronic-care"]
}'
Response
{
"success": true,
"data": {
"id": "6650a1b2c3d4e5f6a7b8c9d0",
"name": "Maria Rodriguez",
"image_url": null,
"bio": "Maria is a 54-year-old teacher recently diagnosed with Type 2 diabetes.",
"role": "Patient",
"tags": ["diabetes", "chronic-care"],
"is_active": true,
"created_at": "2025-06-01T14:00:00Z",
"updated_at": null
},
"message": "Case study avatar created successfully"
}
Update Avatar
PATCH /v1/console/case-study-avatars/{avatar_id}
Partial update — only send the fields you want to change.
Authentication
Requires CASE_STUDIES.can_edit permission.
Path parameters
Request body
Example request
curl -X PATCH https://mind-be.staging.miva.university/v1/console/case-study-avatars/6650a1b2c3d4e5f6a7b8c9d0 \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{ "bio": "Updated background story." }'
Response
Returns the full updated avatar object.
Delete Avatar
DELETE /v1/console/case-study-avatars/{avatar_id}
Soft-delete an avatar.
Authentication
Requires CASE_STUDIES.can_delete permission.
Path parameters
Example request
curl -X DELETE https://mind-be.staging.miva.university/v1/console/case-study-avatars/6650a1b2c3d4e5f6a7b8c9d0 \
-H "Authorization: Bearer <access_token>"
Response
Returns the soft-deleted avatar object.