PUT
/
classrooms
/
{handle}
/
members
curl --request PUT \
  --url https://codecombat.com/api/classrooms/{handle}/members \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '{
  "code": "<string>",
  "userId": "<string>",
  "retMemberLimit": 123
}'
{
  "_id": "<string>",
  "name": "<string>",
  "members": [
    "<string>"
  ],
  "ownerID": "<string>",
  "description": "<string>",
  "courses": [
    {
      "_id": "<string>",
      "levels": [
        {}
      ],
      "enrolled": [
        "<string>"
      ],
      "instance_id": "<string>"
    }
  ]
}

Authorizations

Authorization
string
headerrequired

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Path Parameters

handle
string
required

The document's _id or slug.

Body

application/json
code
string
required

The code for joining this classroom

userId
string
required

The _id or slug of the user to add to the class.

retMemberLimit
number | null

limit the return number of members for the classroom, the default value is 1000

Response

200 - application/json
_id
string | null
name
string | null
members
string[] | null
ownerID
string | null
description
string | null
courses
object[] | null