Manage Users
Aero2 provides admin endpoints for user lifecycle management: viewing, updating, disabling, and managing user sessions.
List Users
# List all users
curl https://aero2.dev/api/users \
-H "Authorization: Bearer <admin_token>"
# Search by email or name
curl "https://aero2.dev/api/users?search=jane" \
-H "Authorization: Bearer <admin_token>"
# Paginate
curl "https://aero2.dev/api/users?page=2&limit=25" \
-H "Authorization: Bearer <admin_token>"View User Details
curl https://aero2.dev/api/users/<user_id> \
-H "Authorization: Bearer <admin_token>"Returns the user's profile, roles, and linked identities.
Update User Profile
curl -X PUT https://aero2.dev/api/users/<user_id> \
-H "Authorization: Bearer <admin_token>" \
-H "Content-Type: application/json" \
-d '{"name": "Jane Smith"}'Manage User Sessions
# List all sessions for a user
curl https://aero2.dev/api/users/<user_id>/sessions \
-H "Authorization: Bearer <admin_token>"
# Revoke all sessions (force logout)
curl -X DELETE https://aero2.dev/api/users/<user_id>/sessions \
-H "Authorization: Bearer <admin_token>"Unlink an Identity Provider
Remove a linked identity (e.g., disconnect a user's GitHub login):
curl -X DELETE https://aero2.dev/api/users/<user_id>/identities/<link_id> \
-H "Authorization: Bearer <admin_token>"Delete a User
curl -X DELETE https://aero2.dev/api/users/<user_id> \
-H "Authorization: Bearer <admin_token>"View User Audit History
curl https://aero2.dev/api/users/<user_id>/audit \
-H "Authorization: Bearer <admin_token>"