Docs

Get current user

GET/api/auth/user

Returns the profile of the user whose token is being used. Useful as a ping endpoint to confirm a key is valid and to discover the user's subscription tier before calling Pro-only endpoints.

Headers

Authorization header required. See Authentication.

Response

Returns the user object.

200 OK

json
{
  "id": "9e8d7c6b-5a4f-3e2d-1c0b-a9f8e7d6c5b4",
  "email": "ada@example.com",
  "name": "Ada Lovelace",
  "company_name": "Analytical Engines",
  "subscription_status": "pro",
  "subscription_plan": "pro_monthly",
  "created_at": "2026-03-14T18:22:09.412Z",
  "updated_at": "2026-05-21T11:04:51.038Z"
}

subscription_status is one of free or pro. Pro-only endpoints (analytics, compare, export) return 403 with "Pro subscription required" for free-tier users.

Example request

curl
curl https://api.prelim.chat/api/auth/user \
  -H "Authorization: Bearer prelim_8s4kZxQv3p2nLw1HfYBgRmTcEsK9aJdN0iUyXoVbPeWzCqA"