Overview
Users represent individual accounts that can access teams and resources. Each user has a profile, role assignments, and can belong to multiple teams with different permission levels.Key Features
- User Management - Create and update user accounts
- Profile Information - Manage user details and contact info
- Password Reset - Secure password management
- Login Link Generation - Create direct login links for API-created users
- Role Assignment - Control access levels per team
- Multi-team Support - Users can belong to multiple teams
- Address Management - Store user location information
Endpoints
List Users
limit(integer, 1-100) - Number of results per page (default: 10)next(string) - Pagination cursor for next pageteam(string) - gigstack Connect: Target team ID
Create User
phone when creating an account, even if you
have a correctly formatted international number. The reviewed creation path sends
it to the authentication provider in an unsupported format. Changing the format in
your request does not solve this. The examples below omit it; this limitation is
source-reviewed and has not been exercised against a live account.
Request Body:
email(string, required for creation) - Supply a valid, unique email address. The shared schema marks it optional, but account creation uses it. It is not writable throughPUT /users/{id}.first_name(string, optional) - User first namelast_name(string, optional) - User last namephone(string, optional) - Omit on creation: the current account-creation path rejects populated phone numbers. Profile contact-phone updates are a separate operation; read its membership caveat before using it.company_role(string, optional) - User role in the companyaddress(object, optional) - User address informationcountry(string, optional) - Country namestreet(string, optional) - Street addresszip(string, optional) - Postal codecity(string, optional) - City namestate(string, optional) - State/provinceexterior(string, optional) - Exterior numbermunicipality(string, optional) - Municipality (stored but not returned in responses)neighborhood(string, optional) - Neighborhood/colony
auto_join(boolean, optional) - Adds the new user to the effective team when true. Defaults to false for the credential’s own team. A Connect call targeting another eligible team joins that team automatically, even if this flag is false.role(string, optional) - Role to assign to the user whenauto_joinistrue. Can be"editor","admin", or"viewer". Defaults to"viewer"if not specified. It applies whenever creation joins the user to a team, either throughauto_joinor a Connect target.
- The
municipalityfield can be included in requests and will be stored, but is not returned in response objects. - When creation joins the user, it adds the effective team and billing account to the user record. Connect uses the selected team, not the master team.
- The
roleparameter works in conjunction withauto_join. When both are used, the user is added to the team with the specified role (editor, admin, or viewer). Ifroleis not specified, the user defaults to “viewer” role.
Get User
Update User
email and membership fields are reserved and
removed from updates; this operation cannot change the authentication email or assign
a team role. Use the Teams API for membership changes.
Current implementation caveat: the update mapper defaults the user document’s
teams array to [] and merges it into the record, even when you omit teams.
Sending that reserved field does not preserve it. This is a source-observed limitation,
not a live-tested guarantee about access: team-side membership is separate. Avoid
using this endpoint as a harmless profile-only write until you have checked its effect
on your integration; read the user and team membership back and contact support if
those records disagree.
Reset Password
email in the body has no effect. The address used is the one on the user’s auth record, not anything you supply.
The email template describes a 24-hour expiration, but this handler does not set
the authentication provider’s expiration policy. Follow the link’s actual result and
request a new reset if expired; do not use that template text as a session guarantee.
Example Request:
Generate Login Link
- User must have been created via API (from: ‘api’)
- The API-created user must be managed by, or attached to, the caller’s billing account
- The user must belong to or own at least one team, and every such team must belong to that billing account; membership in an outside tenant is refused
- If requirements are not met, returns a 404 error
team query parameter.
Request Body:
user_id(required, string) - The Firebase UID of the user
login_link(string) - The login URL with embedded tokenvalid_until(number) - Unix timestamp in milliseconds when the token expires (1 hour from generation)method(string) - The authentication method used (always ‘token’)
User Structure
User Fields
Address Structure
The address object supports the following fields:- The
municipalityfield can be included in POST/PUT requests and will be stored in the database, but is not returned in GET responses. - All address fields are optional and nullable.
- Address fields returned in responses:
country,street,zip,city,state,exterior,neighborhood
User Roles and Permissions
System Roles
Roles belong to a team membership, not a globalrole field on the user response.
Use admin, editor or viewer when adding a member. member is not an accepted
role for the Teams API.
Role Hierarchy
admin can administer the team; editor and viewer describe progressively narrower
resource permissions. Individual module permissions can also affect user-scoped access.
Permission Matrix
The required role depends on the operation and credential. User-scoped MCP/dashboard credentials are checked against the relevant team and module permissions. API keys and OAuth access tokens represent the team; they do not inherit the current personal role of whoever originally created them. OAuth tokens cannot switch teams through Connect. See credential scope and the operation’s reference before granting access or generating a user’s login link.Common Scenarios
1. Onboard New Employee
Option A: Using auto_join with role (Recommended)2. Update User Profile
3. Bulk User Creation with Different Roles
4. Password Reset Flow
5. Generate Login Link for API User
- Onboard external users without requiring password setup
- Provide temporary access to contractors or auditors
- Enable single sign-on for integrated applications
- Create magic links for embedded user experiences
User Lifecycle
User Creation Flow
User Deactivation Flow
This is a workflow design, not a single API operation or a promise of immediate session revocation. Verify each supported membership/account action.Best Practices
- Use strong passwords - Enforce password complexity requirements
- Regular access reviews - Audit user permissions periodically
- Minimize admin users - Only essential personnel should have admin access
- Complete profiles - Ensure all user information is up-to-date
- Use appropriate roles - Follow principle of least privilege
- Monitor user activity - Track login and action patterns
- Clean up inactive users - Remove or disable unused accounts
Security Considerations
Password Requirements
This API’s user-creation route generates a password internally and does not accept an application-supplied password. These endpoints do not establish a password-length, complexity or password-history policy for your application. Use the documented reset flow where available rather than transmitting passwords through profile fields.Session Management
A generated login link carries a credential. Deliver it only to its intended user; do not log or expose it in analytics. Use its returnedvalid_until value for the
link’s lifetime. This API guide makes no guarantee about browser-session inactivity
limits or refresh-token lifetimes; those are distinct from link expiration.
Related Resources
- Teams API - Manage team membership
- gigstack Connect - Multi-team user access
- Clients API - Users create and manage clients
- Invoices API - User permissions affect invoice access
Error Handling
User Already Exists
Invalid Email Format
User Not Found
Insufficient Permissions
Password Reset Failed
Login Link Generation Failed
User Not Created via API:For additional assistance, contact support@gigstack.io