Users API Guide
Learn how to manage users using the Wacht Rust SDK.Prerequisites
Before using any API methods, you must initialize the SDK:List Users
Retrieve a paginated list of users from your deployment.Basic List
With Pagination and Filters
Builder Methods
limit(i32)- Number of results to return (max 100)offset(i32)- Number of results to skipsearch(&str)- Search query to filter resultssort_key(&str)- Field to sort bysort_order(&str)- Sort order (“asc” or “desc”)
Get User Details
Retrieve complete information about a user including all emails, phones, and social connections.Create User
Create a new user in your deployment.Basic User Creation
With Optional Fields
Required Fields
first_name(String) - User’s first namelast_name(String) - User’s last name
Optional Fields
email_address(Option<String>) - Email addressphone_number(Option<String>) - Phone numberusername(Option<String>) - Usernamepassword(Option<String>) - Passwordskip_password_check(bool) - Skip password validation (default: false)
Update User
Update an existing user’s information. Only provided fields will be updated.Available Update Fields
All fields are optional - only include what you want to change:first_name(Option<String>)last_name(Option<String>)username(Option<String>)public_metadata(Option<serde_json::Value>)private_metadata(Option<serde_json::Value>)disabled(Option<bool>)
Update Password
Update a user’s password.Delete User
Permanently delete a user. This action cannot be undone.Manage Emails
Add Email Address
Update Email
Delete Email
Manage Phone Numbers
Add Phone
Update Phone
Delete Phone
Social Connections
Delete a social connection (OAuth provider) from a user’s account.Error Handling
All SDK methods return aResult<T, Error>:
Related
- Installation - SDK setup
- Organizations Guide - Managing organizations
- Workspaces Guide - Managing workspaces
- API Reference - Backend API - Full API docs
