cURL
curl --request POST \ --url https://codecombat.com/api/users \ --header 'Authorization: Basic <encoded-value>' \ --header 'Content-Type: application/json' \ --data ' { "name": "<string>", "email": "<string>", "role": "student", "preferredLanguage": "<string>", "heroConfig": { "thangType": "<string>" }, "birthday": "<string>" } '
{ "_id": "<string>", "email": "<string>", "name": "<string>", "slug": "<string>", "role": "<string>", "stats": { "gamesCompleted": 123, "concepts": {}, "playTime": 123 }, "oAuthIdentities": [ { "provider": "<string>", "id": "<string>" } ], "subscription": { "ends": "<string>", "active": true }, "license": { "ends": "<string>", "active": true } }
Creates a User.
url = 'https://codecombat.com/api/users' json = { email: 'an@email.com', name: 'Some Username', role: 'student' } request.post({ url, json, auth })
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Basic <encoded-value>
<encoded-value>
username:password
"student" or "teacher". If unset, a home user will be created, unable to join classrooms.
"student"
"teacher"
student
teacher
Show child attributes
The created user
Subset of properties listed here
Usually either 'teacher' or 'student'
Included only when specifically requested on the endpoint