Delete User
This endpoint allows you to permanently remove a user from the system. This operation cannot be undone and should be used with caution.
🔹 Endpoint Details
DELETE /api/v1/users/{id}
🔒 Authentication
Header | Required | Description |
---|---|---|
Authorization | Yes | Format: ONLIVESITE Credential:ONLIVEAccessKeyId, Signature=CalculatedSignature |
📝 Request Structure
Path Parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
id | string (UUID) | Yes | Unique identifier of the user to delete | 550e8400-e29b-41d4-a716-446655440000 |
🧩 Request Example
curl -X DELETE "https://openapi.onlive.site/api/v1/users/550e8400-e29b-41d4-a716-446655440000" \
-H "Content-Type: application/json" \
-H "Authorization: ONLIVESITE Credential:ONLIVEAccessKeyId, Signature=CalculatedSignature"
📤 Response Format
Successful Response (200 OK)
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"firstName": "Johnny",
"lastName": "Doe",
"email": "[email protected]",
"role": "editor",
"avatar": "https://example.com/avatars/johnny.jpg",
"organizationId": "123e4567-e89b-12d3-a456-426614174000",
"userGroupId": "123e4567-e89b-12d3-a456-426614174000",
"fullName": "Johnny Doe",
"createdAt": "2025-05-22T10:30:00Z",
"updatedAt": "2025-05-22T11:15:00Z",
"deletedAt": "2025-05-22T12:00:00Z"
}
❌ Error Responses
401 Unauthorized
{
"statusCode": 401,
"message": "Invalid or missing authorization credentials"
}
403 Forbidden
{
"statusCode": 403,
"message": "Cannot delete the organization's last admin user"
}
404 Not Found
{
"statusCode": 404,
"message": "User not found"
}
📘 Notes
- This operation permanently removes the user
- All user data will be deleted
- Associated content may be affected
- The deletion cannot be undone
- System tracks deletion time (
deletedAt
) - Only users in your organization can be deleted
- Cannot delete the last admin user
⚠️ Pre-deletion Checklist
-
Data Backup
- Export user's important data
- Archive relevant content
- Save necessary records
-
Access Review
- Check user's owned resources
- Review group memberships
- Document permissions
-
System Impact
- Evaluate content ownership
- Check scheduled tasks
- Review active projects
🔄 Post-deletion Actions
-
System Updates
- Remove from groups
- Update access records
- Clean up references
-
Content Management
- Reassign owned content
- Update team documents
- Modify shared resources
-
Security Measures
- Revoke access tokens
- Update security logs
- Clear cached data
✅ Best Practices
- 🔍 Verify Identity: Double-check user ID before deletion
- 📊 Document Reason: Keep records of deletion reasons
- 🔐 Access Control: Ensure proper authorization
- 📱 Notification: Inform relevant team members
- 🔄 Cleanup: Remove associated data and references
🚫 Limitations
- Cannot Delete If
- Try to delete your own user