Skip to main content
All user endpoints require JWT authentication and are protected by the token blacklist middleware.

Get User Profile

curl -X GET "https://api.archive.com/api/user/profile" \
  -H "Authorization: Bearer {accessToken}"
Retrieve the authenticated user’s profile information. Authentication Required: Yes Rate Limit: API rate limiter applied

Headers

Authorization
string
required
Bearer token: Bearer {accessToken}

Response

user
object
User profile object

Error Responses

  • 401 Unauthorized - Missing or invalid authentication token
  • 500 Internal Server Error - Server error

Update User Profile

curl -X PUT "https://api.archive.com/api/user/profile" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer {accessToken}" \
  -d '{
    "firstName": "Jane",
    "lastName": "Smith"
  }'
Update the authenticated user’s profile information. All fields are optional for partial updates. Authentication Required: Yes Rate Limit: API rate limiter applied

Headers

Authorization
string
required
Bearer token: Bearer {accessToken}

Request Body

All fields are optional. Only provide the fields you want to update.
firstName
string
User’s first name (1-50 characters, trimmed)
lastName
string
User’s last name (1-50 characters, trimmed)
profilePictureUrl
string
Valid URL for profile picture (trimmed, must be valid URL format)

Response

message
string
Success message: “Profile updated successfully”
user
object
Updated user profile object with all current fields

Error Responses

  • 400 Bad Request - Validation errors (invalid name length, invalid URL)
  • 401 Unauthorized - Missing or invalid authentication token
  • 500 Internal Server Error - Server error

Update Profile Picture

curl -X PUT "https://api.archive.com/api/user/profile-picture" \
  -H "Authorization: Bearer {accessToken}" \
  -F "profilePicture=@/path/to/image.jpg"
Upload and update the authenticated user’s profile picture. Accepts multipart form data with an image file. Authentication Required: Yes Rate Limit: API rate limiter applied

Headers

Authorization
string
required
Bearer token: Bearer {accessToken}
Content-Type
string
required
Must be multipart/form-data

Form Data

profilePicture
file
required
Image file for the profile picture. Supported formats depend on server configuration (typically JPEG, PNG, GIF).

Response

message
string
Success message: “Profile picture updated successfully”
user
object
Updated user profile object including the new profilePictureUrl

Error Responses

  • 400 Bad Request - No file uploaded or invalid file format
  • 401 Unauthorized - Missing or invalid authentication token
  • 413 Payload Too Large - File size exceeds limit
  • 500 Internal Server Error - Server error or file upload failure

Get User Statistics

curl -X GET "https://api.archive.com/api/user/stats" \
  -H "Authorization: Bearer {accessToken}"
Retrieve usage statistics for the authenticated user’s account. Authentication Required: Yes Rate Limit: API rate limiter applied

Headers

Authorization
string
required
Bearer token: Bearer {accessToken}

Response

stats
object
User statistics object

Error Responses

  • 401 Unauthorized - Missing or invalid authentication token
  • 500 Internal Server Error - Server error

Build docs developers (and LLMs) love