Tiny Rebrand DocsHome

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:
EndpointMethodPurposeRequired Scope
/api/user/meGETGet current user informationuser:read
/api/user/me/emailPUTUpdate user email addressuser:write
/api/user/me/passwordPUTUpdate user passworduser:write
/api/user/me/enable-twofactorPOSTEnable/disable 2FAuser:write
/api/user/me/limitsGETGet account usage limitsuser:read
/api/user/meDELETEDelete user accountuser:write

GET /api/user/me

GET /api/user/me
Get current user information.

Required Scope: user:read

Request:

curl -X GET https://api.tinyrebrand.com/api/user/me \
  -H "Authorization: Bearer at_1234567890abcdef"

Response:

{
  "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/email

PUT /api/user/me/email
Update user email address.

Required Scope: user:write

Request:

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]"
  }'

Parameters:

ParameterTypeRequiredDescription
emailstringNew email address

Response:

{
  "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/password

PUT /api/user/me/password
Update user password and security settings.

Required Scope: user:write

Request:

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"
  }'

Parameters:

ParameterTypeRequiredDescription
currentPasswordstringCurrent password
newPasswordstringNew password

Response:

{
  "status": 200,
  "code": "OK",
  "message": "Password updated successfully",
  "data": {
    "id": "507f1f77bcf86cd799439011",
    "updatedAt": "2024-07-02T15:00:00.000Z"
  }
}

POST /api/user/me/enable-twofactor

POST /api/user/me/enable-twofactor
Enable or disable 2FA for account security.

Required Scope: user:write

Request:

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
  }'

Parameters:

ParameterTypeRequiredDescription
enablebooleanEnable or disable 2FA

Response:

{
  "status": 200,
  "code": "OK",
  "message": "2FA enabled successfully",
  "data": {
    "qrCode": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...",
    "secret": "JBSWY3DPEHPK3PXP",
    "backupCodes": ["12345678", "87654321"]
  }
}

GET /api/user/me/limits

GET /api/user/me/limits
Get current account usage and limits.

Required Scope: user:read

Request:

curl -X GET https://api.tinyrebrand.com/api/user/me/limits \
  -H "Authorization: Bearer at_1234567890abcdef"

Response:

{
  "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/me

DELETE /api/user/me
Permanently delete user account.

Required Scope: user:write

Request:

curl -X DELETE https://api.tinyrebrand.com/api/user/me \
  -H "Authorization: Bearer at_1234567890abcdef"

Response:

{
  "status": 200,
  "code": "OK",
  "message": "Account deleted successfully",
  "data": {
    "deletedAt": "2024-07-02T15:00:00.000Z"
  }
}