Users
Manage user profiles, avatars, and account data.
GET /users/profile
Retrieve the authenticated user's profile.
Auth: Bearer token
Terminal
curl https://api.texer.org/users/profile \
-H "Authorization: Bearer YOUR_TOKEN"JSON
{
"id": 1,
"email": "user@university.edu",
"name": "Jane Doe",
"bio": "PhD student in Mathematics",
"affiliation": "MIT",
"avatarUrl": "https://cdn.texer.org/avatars/usr_a1b2c3d4.png",
"subscriptionType": "pro",
"createdAt": "2025-01-15T10:00:00Z"
}PUT /users/profile
Update the authenticated user's profile fields.
Auth: Bearer token
Terminal
curl -X PUT https://api.texer.org/users/profile \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "Jane Doe", "bio": "Postdoc at MIT", "affiliation": "MIT"}'JSON
{
"id": 1,
"name": "Jane Doe",
"bio": "Postdoc at MIT",
"affiliation": "MIT",
"updatedAt": "2025-06-15T12:00:00Z"
}POST /users/profile/avatar
Upload a profile avatar. Accepts PNG, JPEG, or WebP (max 2 MB).
Auth: Bearer token
Terminal
curl -X POST https://api.texer.org/users/profile/avatar \
-H "Authorization: Bearer YOUR_TOKEN" \
-F "avatar=@photo.jpg"JSON
{
"avatarUrl": "https://cdn.texer.org/avatars/usr_a1b2c3d4.png"
}GET /users/profile/export
Export all user data as JSON (GDPR compliance).
Auth: Bearer token
Terminal
curl https://api.texer.org/users/profile/export \
-H "Authorization: Bearer YOUR_TOKEN" \
-o my-data.jsonJSON
{
"user": { "id": 1, "email": "user@university.edu", "name": "Jane Doe" },
"projects": [],
"snips": [],
"pdfs": [],
"settings": {}
}DELETE /users/profile
Permanently delete the authenticated user's account and all associated data.
Auth: Bearer token
Terminal
curl -X DELETE https://api.texer.org/users/profile \
-H "Authorization: Bearer YOUR_TOKEN"JSON
{ "message": "Account deleted" }