Control your own account
Use/users/me with a verified Firebase ID token or a personal MCP token to act
as the authenticated person. Team API keys and OAuth client credentials cannot
impersonate their creator. Firebase users may access their own profile before
joining a team. A personal MCP token still requires its current team authority.
Read the profile, update a field, and verify the returned state:
data. API_BASE_URL includes /v2.
Keep the token in your local environment. Profile patches accept first_name,
last_name, phone, country and company_role. Omitted fields remain unchanged;
null clears a supplied field. Email and verification status come from Firebase
Auth and are read-only. Country uses three uppercase letters, such as MEX or
COL; phone accepts an optional plus and one to thirty digits.
Preference patches affect only the named team and require current membership.
null resets a preference. search_collection accepts payments, invoices or
receipts; invoices_order_by accepts timestamp or folio_number. Changing
the UI testmode preference does not change a credential’s mode. Active context
selection takes team_id, billing_account_id, or both and checks actual
membership/account authority before saving it.
For notifications, notificationId is the recipient record’s id returned by
the list. Follow next_cursor using the cursor query parameter until has_more
is false. The default page size is 50; limit accepts 1–100. Lists and unread
counts exclude dismissed records. Mark-all-read also marks dismissed unread
records, matching the existing account action. These endpoints never read or
change another person’s recipient records.
MCP token issuance uses credential approvals.
Prepare action mcp_tokens.create with a saved UUIDv4, team_id and
payload:{name,livemode}. The person reviews user-wide access, signs in again if
required, and explicitly accepts terms in the authenticated browser. Preparation
cannot accept terms or issue a token. At most ten personal MCP tokens can be active.
Only the first committing browser execution receives the new secret. All approval
GETs return safe state and metadata receipts; execution replays return no secret.
After an uncertain preparation, reuse the original UUID and exact payload. After a
lost execution response, read the receipt before considering a separately reviewed
replacement. Direct POST /users/me/mcp-tokens returns HTTP 403
account_approval_required; it no longer creates a token. Existing token list and
revoke routes remain metadata-only, and revoking the calling token can end access.
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
- Managed session preparation - Request owner-reviewed delegated access without receiving a credential
- 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.
Remove a user from administered teams
removed_from_teams lists confirmed removals;
an empty list does not prove that all memberships were removed. The destruction
requirement can be retained_membership, private_custody, current_identity or
authoritative_scope_and_approval. Profile labels alone do not prove managed
custody, and absence from a partial membership query does not prove complete removal.
Full identity destruction requires complete access evidence and a separate reviewed
workflow; this endpoint does not perform it. Do not treat HTTP 200 as account deletion.
Reset password email delivery
DirectPOST /users/reset-password/{id} is retired and returns
410 reset_delivery_operation_required, without generating a code or sending email.
Use the durable workflow instead:
- Save a lowercase UUIDv4 before preparing. Keep the exact user, team and credential mode.
- Prepare
POST /users/{id}/password-reset-operationswithoperation_id,expected_livemode, andconfirm_reset_email:true. Preparation sends no email. - Explicitly execute
POST /users/{id}/password-reset-operations/{operationId}/executewith{}. Current authority and the recipient are checked again before effects. - After an uncertain response, read
GET /users/{id}/password-reset-operations/{operationId}. Do not automatically retry or invent another UUID. DELETE cancels only an untouched preparation. - If a consumed outcome needs recovery, prepare a different UUID through
POST /users/{id}/password-reset-recoveries, addingsupersedes_operation_id. Open its safebrowser_handoff.url. A current person must freshly authenticate, review the recipient and acknowledge the applicable risks. Agents cannot receive the reviewer challenge or execute the private recovery.
provider_accepted confirms only provider acceptance,
not delivery or a changed password. Receipts never contain a recipient or reset URL.
The email template’s duration does not define the authentication provider’s expiration
policy. Source verification does not establish deployment or live email verification.
Generate Login Link
POST /users/login-link is retired and returns 403 account_approval_required.
It does not create or return a login credential. Prepare managed_users.issue_session
through POST /users/me/account-approvals, then have the current owner open the
returned review_url. See managed session actions
for authority, exact input and safe readback.
Preparation requires a verified personal identity. The API response contains safe
metadata only. A custom-token exchange deadline never guarantees that an already
redeemed Firebase session has ended. Revocation is a separately reviewed action.
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 preparing managed-session access.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
Use the durable prepare/execute/readback steps above. HTTP success never proves email delivery or a changed password. Do not repeat an uncertain send; read the saved UUID and use separately reviewed recovery when required.5. Prepare managed access
For an existing managed user, preparemanaged_users.issue_session with payload
{"user_id":"managed_example"}, an authorized team_id, and a saved UUIDv4
operation_id. Open review_url for the current owner’s private review. The
account approval guide includes
an executable synthetic request and the readback/recovery workflow.
Do not send a raw login credential through an agent, email automation or this API.
A lost or unknown issuance requires safe status readback and a separate explicit
review before any new intent; neither retry nor token expiry is authorization.
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 private browser handoff carries a credential. Only its intended person should use it; do not log or expose it in analytics. The safecustom_token_expires_at field is an exchange deadline only. 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
The direct route returns403 account_approval_required. Prepare the reviewed
managed session action instead. 503 managed_session_scope_unavailable means the
session strategy is disabled or unavailable in that environment; do not retry with
another operation ID. 503 managed_session_scope_limit means a complete scope
exceeds the staging prototype limit, and no session was issued.
For additional assistance, contact support@gigstack.io
Create a managed administrator with two browser reviews
Use the current canonical team and billing-account owner’s personal Firebase/MCP credential. Save a UUIDv4 before the first request, then prepare the identity:review_url.
Preparation creates no Auth identity. In the browser, review the disabled identity
creation and the disclosed profile, membership-usage and support-identity bootstrap
effects. The first execution creates the disabled identity; it does not grant team
membership. activation_required means return to the browser for a fresh second
review before granting administrator membership and enabling that identity.
For an uncertain result, read the exact approval or reconcile its evidence:
unknown; do not start another operation to bypass that
uncertainty. completed confirms the recorded membership grant and enabled Auth,
not password setup or a successful login. A failed or unresolved operation may
need operator recovery; disabled identities are not automatically deleted when
ownership changes prevent activation.
Direct administrator creation through POST /users returns
403 account_approval_required. Viewer/editor creation remains available. If the
team and billing owners differ, create a nonadmin identity first and use the
existing owner-reviewed promotion/add-existing flow. Preserve the user reference
after managed_creation_unconfirmed; ordinary creation is not idempotent.
Session issuance, password-reset delivery and identity deletion are separate
operations and are not authorized by this approval.