Skip to main content
Some operations in this guide have Discovery handlers but no public gateway route yet: POST /users/reset-password/{id}. Check the availability notice on each API reference page before using them.
Manage user accounts, profiles, and access control. The Users API handles user creation, updates, password management, and team associations.

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

Retrieve a paginated list of users. Query Parameters:
  • limit (integer, 1-100) - Number of results per page (default: 10)
  • next (string) - Pagination cursor for next page
  • team (string) - gigstack Connect: Target team ID
Example Request:
Example Response:

Create User

Create a new user account. Creation does not send an invitation email and does not return the generated password. Choose the documented login-link or password-reset flow separately; check availability before relying on a reset route. Current phone limitation: omit 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:
Body Parameters:
  • 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 through PUT /users/{id}.
  • first_name (string, optional) - User first name
  • last_name (string, optional) - User last name
  • phone (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 company
  • address (object, optional) - User address information
    • country (string, optional) - Country name
    • street (string, optional) - Street address
    • zip (string, optional) - Postal code
    • city (string, optional) - City name
    • state (string, optional) - State/province
    • exterior (string, optional) - Exterior number
    • municipality (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 when auto_join is true. Can be "editor", "admin", or "viewer". Defaults to "viewer" if not specified. It applies whenever creation joins the user to a team, either through auto_join or a Connect target.
Notes:
  • The municipality field 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 role parameter works in conjunction with auto_join. When both are used, the user is added to the team with the specified role (editor, admin, or viewer). If role is not specified, the user defaults to “viewer” role.
Example Request:
Example Response:

Get User

Retrieve a specific user by ID. Example Request:
Example Response:

Update User

Update an existing user’s information. Request Body: The profile fields are optional. 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.
Example Request:

Reset Password

Sends a password-reset email to the user. The user is identified by the path parameter — there is no request body, and passing an 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:
Example Response:
Generate a login link for a user. The link contains a custom Firebase token that allows the user to authenticate directly without a password. Requirements:
  • 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
gigstack Connect: Generate login links for other teams’ users using the team query parameter. Request Body:
Parameters:
  • user_id (required, string) - The Firebase UID of the user
Example Request:
Example Response:
Response Fields:
  • login_link (string) - The login URL with embedded token
  • valid_until (number) - Unix timestamp in milliseconds when the token expires (1 hour from generation)
  • method (string) - The authentication method used (always ‘token’)
Error Responses: 404 - User Not Found or Not Accessible:

User Structure

User Fields

Address Structure

The address object supports the following fields:
Note:
  • The municipality field 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 global role 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)
Option B: Manual team addition

2. Update User Profile

3. Bulk User Creation with Different Roles

4. Password Reset Flow

Use Cases:
  • 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

  1. Use strong passwords - Enforce password complexity requirements
  2. Regular access reviews - Audit user permissions periodically
  3. Minimize admin users - Only essential personnel should have admin access
  4. Complete profiles - Ensure all user information is up-to-date
  5. Use appropriate roles - Follow principle of least privilege
  6. Monitor user activity - Track login and action patterns
  7. 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 returned valid_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.

Error Handling

User Already Exists

Invalid Email Format

User Not Found

Insufficient Permissions

Password Reset Failed

User Not Created via API:
User Not in Billing Account:

For additional assistance, contact support@gigstack.io