PUT
/
users
/
{handle}
/
shorten-subscription
url = `https://codecombat.com/api/users/${userID}/shorten-subscription`
json = { ends: new Date().toISOString() }
request.put({ url, json, auth }, (err, res) => {
  console.log(res.body.subscription.active) // false
})

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
ends
string
required

Response

200 - application/json
_id
string | null
email
string | null
name
string | null
slug
string | null
role
string | null

Usually either 'teacher' or 'student'

stats
object | null
oAuthIdentities
object[] | null
subscription
object | null
license
object | null