Skip to main content

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​

HeaderRequiredDescription
AuthorizationYesFormat: ONLIVESITE Credential:ONLIVEAccessKeyId, Signature=CalculatedSignature

πŸ“ Request Structure​

Path Parameters​

ParameterTypeRequiredDescriptionExample
idstring (UUID)YesUnique identifier of the user to delete550e8400-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​

  1. Data Backup

    • Export user's important data
    • Archive relevant content
    • Save necessary records
  2. Access Review

    • Check user's owned resources
    • Review group memberships
    • Document permissions
  3. System Impact

    • Evaluate content ownership
    • Check scheduled tasks
    • Review active projects

πŸ”„ Post-deletion Actions​

  1. System Updates

    • Remove from groups
    • Update access records
    • Clean up references
  2. Content Management

    • Reassign owned content
    • Update team documents
    • Modify shared resources
  3. 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​

  1. Cannot Delete If
    • Try to delete your own user