Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.coraltalk.com/llms.txt

Use this file to discover all available pages before exploring further.

Roleplay

A roleplay is a scenario-based speaking assignment where students practice a conversation in a defined role.

Endpoints

MethodPathDescription
POST/roleplayCreate
GET/roleplayList (?classId= optional)
GET/roleplay/:idGet
PUT/roleplay/:idUpdate
DELETE/roleplay/:idDelete

Create

FieldRequiredDescription
nameYesScenario title
classIdYesClass ID
roleplayStudentRoleYesStudent’s role
roleplayCoralRoleYesCoral’s role
roleplayScenarioYesScenario description
roleplayDurationNoMax duration (seconds, default 600)
curl -X POST "https://app.coraltalk.com/api/v1/prod/roleplay" \
  -H "Authorization: Bearer ct_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Salary negotiation",
    "classId": "CLASS_ID",
    "roleplayStudentRole": "Job candidate",
    "roleplayCoralRole": "Hiring manager",
    "roleplayScenario": "Negotiate a starting salary"
  }'

Student URL

https://app.coraltalk.com/exam/{EXAM_ID}/roleplay
Or on a custom domain: https://exams.yourschool.edu/exam/{EXAM_ID}/roleplay