curl -X GET "https://api.trusec.io/v1/users?limit=20" \ -H "Authorization: Bearer trusec_sk_your_api_key"
{ "data": [ { "id": "user_123", "email": "[email protected]", "name": "Jane Smith", "createdAt": "2024-01-15T10:00:00Z", "roles": ["role_admin"] } ], "pagination": { "hasMore": true, "nextCursor": "cur_abc123" } }
Manage user accounts and profiles
curl -X GET "https://api.trusec.io/v1/users/user_123" \ -H "Authorization: Bearer trusec_sk_your_api_key"
{ "data": { "id": "user_123", "email": "[email protected]", "name": "Jane Smith", "emailVerified": true, "createdAt": "2024-01-15T10:00:00Z", "updatedAt": "2024-01-20T15:30:00Z", "roles": ["role_admin"], "metadata": { "department": "Engineering" } } }
curl -X POST "https://api.trusec.io/v1/users" \ -H "Authorization: Bearer trusec_sk_your_api_key" \ -H "Content-Type: application/json" \ -d '{ "email": "[email protected]", "name": "Jane Smith", "roles": ["role_user"] }'
{ "data": { "id": "user_456", "email": "[email protected]", "name": "Jane Smith", "emailVerified": false, "createdAt": "2024-01-20T10:00:00Z", "roles": ["role_user"] } }
curl -X PATCH "https://api.trusec.io/v1/users/user_123" \ -H "Authorization: Bearer trusec_sk_your_api_key" \ -H "Content-Type: application/json" \ -d '{ "name": "Jane Doe", "metadata": { "department": "Product" } }'
{ "data": { "id": "user_123", "email": "[email protected]", "name": "Jane Doe", "updatedAt": "2024-01-20T16:00:00Z", "metadata": { "department": "Product" } } }
curl -X DELETE "https://api.trusec.io/v1/users/user_123" \ -H "Authorization: Bearer trusec_sk_your_api_key"