CourseLit logoCourseLit Docs
Api reference

Update a user

PATCH
/api/user

Authorization

ApiKeyAuth
x-api-key<token>

API key created in CourseLit dashboard settings. The legacy apikey request-body field is still accepted but deprecated.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://school.courselit.app/api/user" \  -H "Content-Type: application/json" \  -d '{    "email": "student@example.com",    "name": "Updated Student",    "subscribedToUpdates": false  }'
{
  "email": "5d41402abc4b2a76b9719d911017c592"
}
{
  "message": "Bad request"
}
{
  "message": "Unauthorized"
}
{
  "error": "User not found"
}
{
  "error": "Internal server error"
}