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
| Field | Type | Description |
|---|
displayName | string | Public display name |
settings.notifications | boolean | Push notifications |
settings.emailAlerts | boolean | Email notifications |
settings.language | string | Preferred 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
| Type | Description |
|---|
loan_created | Created a loan request |
loan_repaid | Repaid a loan |
vault_deposit | Deposited to Trust Vault |
vault_withdraw | Withdrew from Trust Vault |
guardian_added | Added a guardian |
level_up | Leveled 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
| Code | Error | Description |
|---|
| 401 | UNAUTHORIZED | Invalid or missing token |
| 403 | FORBIDDEN | Access denied to resource |
| 404 | USER_NOT_FOUND | User does not exist |
| 422 | VALIDATION_ERROR | Invalid request data |