User Endpoints
User profile and account management endpoints
The User API allows you to manage user profile information and account settings. All endpoints require authentication and appropriate scopes. For token management (Personal Access Tokens and OAuth clients), see the Token Management section.
Available Endpoints
Complete list of user management endpoints and their purposes:
| Endpoint | Method | Purpose | Required Scope |
|---|---|---|---|
/api/user/me | GET | Get current user information | user:read |
/api/user/me/email | PUT | Update user email address | user:write |
/api/user/me/password | PUT | Update user password | user:write |
/api/user/me/enable-twofactor | POST | Enable/disable 2FA | user:write |
/api/user/me/limits | GET | Get account usage limits | user:read |
/api/user/me | DELETE | Delete user account | user:write |
GET
/api/user/meGet current user information
Get current user information.
Bearer Token•Scopes:
user:readRequest
curl -X GET https://api.tinyrebrand.com/api/user/me \
-H "Authorization: Bearer at_1234567890abcdef"Response 200
{
"status": 200,
"code": "OK",
"message": "User fetched successfully",
"data": {
"id": "507f1f77bcf86cd799439011",
"email": "[email protected]",
"name": "John Doe",
"isVerified": true,
"isActive": true,
"createdAt": "2024-01-15T10:30:00.000Z"
}
}PUT
/api/user/me/emailUpdate user email address
Update user email address.
Bearer Token•Scopes:
user:writeRequest
curl -X PUT https://api.tinyrebrand.com/api/user/me/email \
-H "Authorization: Bearer at_1234567890abcdef" \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]"
}'Request Body
Response 200
{
"status": 200,
"code": "OK",
"message": "User email updated successfully",
"data": {
"id": "507f1f77bcf86cd799439011",
"email": "[email protected]",
"isVerified": false,
"updatedAt": "2024-07-02T15:00:00.000Z"
}
}PUT
/api/user/me/passwordUpdate user password
Update user password and security settings.
Bearer Token•Scopes:
user:writeRequest
curl -X PUT https://api.tinyrebrand.com/api/user/me/password \
-H "Authorization: Bearer at_1234567890abcdef" \
-H "Content-Type: application/json" \
-d '{
"currentPassword": "old_password",
"newPassword": "new_password"
}'Request Body
Response 200
{
"status": 200,
"code": "OK",
"message": "Password updated successfully",
"data": {
"id": "507f1f77bcf86cd799439011",
"updatedAt": "2024-07-02T15:00:00.000Z"
}
}POST
/api/user/me/enable-twofactorEnable or disable 2FA
Enable or disable 2FA for account security.
Bearer Token•Scopes:
user:writeRequest
curl -X POST https://api.tinyrebrand.com/api/user/me/enable-twofactor \
-H "Authorization: Bearer at_1234567890abcdef" \
-H "Content-Type: application/json" \
-d '{
"enable": true
}'Request Body
Response 200
{
"status": 200,
"code": "OK",
"message": "2FA enabled successfully",
"data": {
"qrCode": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...",
"secret": "JBSWY3DPEHPK3PXP",
"backupCodes": ["12345678", "87654321"]
}
}GET
/api/user/me/limitsGet account usage and limits
Get current account usage and limits.
Bearer Token•Scopes:
user:readRequest
curl -X GET https://api.tinyrebrand.com/api/user/me/limits \
-H "Authorization: Bearer at_1234567890abcdef"Response 200
{
"status": 200,
"code": "OK",
"message": "Limits fetched successfully",
"data": {
"domains": { "used": 2, "limit": 3 },
"links": { "used": 150, "limit": 500 },
"tags": { "used": 25, "limit": 100 }
}
}DELETE
/api/user/meDelete user account
Permanently delete user account.
Bearer Token•Scopes:
user:writeRequest
curl -X DELETE https://api.tinyrebrand.com/api/user/me \
-H "Authorization: Bearer at_1234567890abcdef"Response 200
{
"status": 200,
"code": "OK",
"message": "Account deleted successfully",
"data": {
"deletedAt": "2024-07-02T15:00:00.000Z"
}
}