Rest API

User

GET
/user/me

Get current signed in user

Get the current signed in user

/user/me

The Authorization access token

Authorization

Authorization
Required
Bearer <token>

In: header

curl -X GET "https://quiztr-m3sbz3l72-0x53.vercel.app/api/user/me" \
  -H "Authorization: Bearer <token>"

Successful response

{
  "id": "string",
  "email": "string",
  "firstName": "string",
  "lastName": "string",
  "emailVerified": false,
  "acceptedTerms": false,
  "avatarUrl": "string",
  "subscriptionId": "string",
  "tokenBalance": 0
}

PUT
/user

Update current signed in user

Get the current signed in user

/user

The Authorization access token

Authorization

Authorization
Required
Bearer <token>

In: header

Request Body

application/jsonRequired

firstName
Required
string

lastName
Required
string

acceptedTermsboolean

curl -X PUT "https://quiztr-m3sbz3l72-0x53.vercel.app/api/user" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "firstName": "string",
    "lastName": "string",
    "acceptedTerms": true
  }'

Successful response

{
  "id": "string",
  "email": "string",
  "firstName": "string",
  "lastName": "string",
  "emailVerified": false,
  "acceptedTerms": false,
  "avatarUrl": "string",
  "subscriptionId": "string",
  "tokenBalance": 0
}