Skip to main content

Users API

Endpoints for managing user profiles, settings, and related data.

Get Current User

Retrieve the authenticated user’s profile.
curl -X GET "https://api.usmewe.com/v1/users/me" \
  -H "Authorization: Bearer YOUR_TOKEN"

Get User by ID

Retrieve a user’s public profile.
curl -X GET "https://api.usmewe.com/v1/users/{userId}"
Private fields like email and settings are only visible to the user themselves.

Update Profile

Update the current user’s profile.
curl -X PATCH "https://api.usmewe.com/v1/users/me" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "displayName": "Alice Smith",
    "settings": {
      "notifications": true,
      "emailAlerts": false
    }
  }'

Updatable Fields

FieldTypeDescription
displayNamestringPublic display name
settings.notificationsbooleanPush notifications
settings.emailAlertsbooleanEmail notifications
settings.languagestringPreferred language

Get User XP & Level

Get detailed XP and level information.
curl -X GET "https://api.usmewe.com/v1/users/{userId}/xp" \
  -H "Authorization: Bearer YOUR_TOKEN"

Get User Activity

Get recent activity history.
curl -X GET "https://api.usmewe.com/v1/users/me/activity?limit=10" \
  -H "Authorization: Bearer YOUR_TOKEN"

Activity Types

TypeDescription
loan_createdCreated a loan request
loan_repaidRepaid a loan
vault_depositDeposited to Trust Vault
vault_withdrawWithdrew from Trust Vault
guardian_addedAdded a guardian
level_upLeveled up

Get User Guardians

List the user’s guardians.
curl -X GET "https://api.usmewe.com/v1/users/me/guardians" \
  -H "Authorization: Bearer YOUR_TOKEN"

Export User Data

Export all user data (GDPR compliance).
curl -X GET "https://api.usmewe.com/v1/users/me/export" \
  -H "Authorization: Bearer YOUR_TOKEN"

Delete Account

Request account deletion.
curl -X DELETE "https://api.usmewe.com/v1/users/me" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "confirmation": "DELETE_MY_ACCOUNT"
  }'
Account deletion is irreversible. On-chain data cannot be deleted.

Error Responses

CodeErrorDescription
401UNAUTHORIZEDInvalid or missing token
403FORBIDDENAccess denied to resource
404USER_NOT_FOUNDUser does not exist
422VALIDATION_ERRORInvalid request data