Users API
The Users API allows you to retrieve and update your profile information, manage preferences, and handle account security.
The user model
The user model represents your account identity within Repurai.
Properties
- Name
id- Type
- string
- Description
Unique identifier for the user.
- Name
name- Type
- string
- Description
The full name of the user.
- Name
email- Type
- string
- Description
The primary email address associated with the account.
- Name
emailVerified- Type
- boolean
- Description
Whether the user has verified their email address.
- Name
image- Type
- string
- Description
URL to the user's profile avatar.
- Name
feedView- Type
- string
- Description
User's preferred layout for viewing feeds (e.g.,
card,list).
- Name
createdAt- Type
- timestamp
- Description
The date and time when the account was created.
Retrieve current user
Fetches the profile information for the authenticated user.
Request
curl https://api.repur.ai/v1/user \
-H "X-API-Key: {your_api_key}"
{
"id": "user_123",
"name": "Alex Rivier",
"email": "alex@example.com",
"image": "https://example.com/avatar.jpg",
"feedView": "card"
}
Update user profile
Update your name or profile image.
Optional attributes
- Name
name- Type
- string
- Description
The new name for the user.
- Name
image- Type
- string
- Description
The new avatar URL.
Request
curl -X PATCH https://api.repur.ai/v1/user \
-H "X-API-Key: {your_api_key}" \
-H "Content-Type: application/json" \
-d '{
"name": "Alex R.",
"image": "https://example.com/new-avatar.jpg"
}'
{
"success": true,
"message": "Profile updated successfully"
}
Change password
Change the account password. This will revoke all other active sessions for security.
Required attributes
- Name
currentPassword- Type
- string
- Description
The current password for verification.
- Name
newPassword- Type
- string
- Description
The desired new password.
Request
curl -X POST https://api.repur.ai/v1/user/password \
-H "X-API-Key: {your_api_key}" \
-H "Content-Type: application/json" \
-d '{
"currentPassword": "old-password",
"newPassword": "new-secure-password"
}'
Update feed view
Update your preferred layout for viewing feed items. This affects how items are presented in the main dashboard.
Required attributes
- Name
view- Type
- string
- Description
The view mode:
card,list, ordefault.
Request
curl -X PATCH https://api.repur.ai/v1/user/view \
-H "X-API-Key: {your_api_key}" \
-H "Content-Type: application/json" \
-d '{"view": "list"}'