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