identity58 ops

Identity API

Accounts, authentication (OTP, passkey, password), sessions, roles, and saved locations.

Queries

QUERY

account

#

Get account by ID Requires permission: Platform admin, tenant admin, or querying own account

Arguments

  • id!
Returns
QUERY

listAccountAddresses

#

List saved addresses for a specific account as admin.

Arguments

  • input!
Returns!
QUERY

listAccountRoles

#

List all roles for a specific account

Arguments

  • input!
Returns[!]!
QUERY

listAccounts

#

List accounts for tenant admin panel. Supports filtering by role (customer, driver, vendor, operator), account status, and search term. Results are paginated. # Authorization Requires TenantAdmin or PlatformAdmin role.

Arguments

  • input!
Returns!
QUERY

listSessionsAdmin

#

List sessions with optional filters (admin only). Requires TenantAdmin or PlatformAdmin role.

Arguments

  • input!
Returns!
QUERY

me

#
Returns!
QUERY

myPartnerships

#

List all partnerships the current user has access to. Returns partnerships where the user has been granted a role with entity_kind = Partnership. This is used by the client to show a partnership switcher UI.

Returns!
QUERY

myPasskeys

#

List the authenticated account's registered passkeys.

Returns[!]!
QUERY

mySavedLocations

#
Returns!
QUERY

mySessions

#

Arguments

  • pagination!
Returns!
QUERY

partnerStaff

#

List staff members of a partnership. Returns all accounts that have been granted roles scoped to the specified partnership. Useful for viewing and managing partnership staff. Requires: TenantAdmin, PlatformAdmin, or operating in the partnership context.

Arguments

  • input!
Returns!
QUERY

passkeyRelyingParty

#

Resolve the RP for the caller. Preferred path: the SDK sends x-app / x-role headers from init (they describe the client binary, available regardless of auth state). The resolver reads RequestContext.app / .role. The app / role_kind args are a fallback for clients that haven't migrated to header-based identity yet — they override the context values when present. Once every client sends the headers the args can be dropped.

Arguments

  • app
  • roleKind
Returns!
QUERY

permissionSet

#

Get a permission set by ID

Arguments

  • idID!
Returns
QUERY

permissionSetByCode

#

Get a permission set by code. Uses the tenant from the request context.

Arguments

  • roleKind!
  • app
  • codeString!
Returns
QUERY

permissionSets

#

List permission sets by context. Uses the tenant from the request context.

Arguments

  • roleKind
  • app
Returns[!]!
QUERY

savedLocation

#

Arguments

  • input!
Returns!

Mutations

MUTATION

adminResetPassword

#

Reset an account's password as admin. If the account has an existing password credential, the hash is updated. If no password credential exists, one is created. Requires TenantAdmin or PlatformAdmin role.

Arguments

  • input!
Returns!
MUTATION

cancelAccountDeletion

#

Cancel a pending account deletion request

Arguments

  • input!
Returns!
MUTATION

completePasskeyAuthentication

#

Arguments

  • input!
Returns!
MUTATION

completePasskeyRegistration

#

Arguments

  • input!
Returns!
MUTATION

confirmPasswordReset

#

Confirm a password reset by submitting either the 6-digit code or the opaque URL token, plus the new password. Revokes all active sessions for the account on success.

Arguments

  • input!
Returns!
MUTATION

createAccount

#

Create a new account as admin.

Arguments

  • input!
Returns!
MUTATION

createPermissionSet

#

Create a new permission set.

Arguments

  • input!
Returns!
MUTATION

createSavedLocation

#

Arguments

  • input!
Returns!
MUTATION

deleteAccount

#

Delete the current user's account based on their account type policy

Arguments

  • input!
Returns!
MUTATION

deletePasskey

#

Arguments

  • idID!
ReturnsBoolean!
MUTATION

deletePermissionSet

#

Delete a permission set by ID.

Arguments

  • idString!
ReturnsBoolean!
MUTATION

deleteSavedLocation

#

Arguments

  • input!
Returns!
MUTATION

grantPartnerStaff

#

Grant staff access to a partnership. This allows adding staff members to a partnership. The staff member will be able to switch to this partnership context and perform operations based on their assigned role. Requires: TenantAdmin, PlatformAdmin, PartnershipOwner, or PartnershipManager role.

Arguments

  • input!
Returns!
MUTATION

grantRole

#

Grant a role to an account

Arguments

  • input!
Returns!
MUTATION

loginWithPassword

#

Arguments

  • input!
Returns!
MUTATION

logout

#

Arguments

  • input!
Returns!
MUTATION

refreshToken

#

Arguments

  • input!
Returns!
MUTATION

renamePasskey

#

Arguments

  • input!
Returns!
MUTATION

requestPasswordReset

#

Start a self-service password reset by email. Always returns success regardless of whether the email matches an account — clients should always proceed to the confirm screen and rely on confirmPasswordReset to validate the code or token.

Arguments

  • input!
Returns!
MUTATION

requestStepUp

#

Mint a single-shot elevation token after re-verifying the caller's password. Attach the returned token to the danger-zone mutation as X-Elevation: <token>. The token expires after 5 minutes or on first successful use, whichever comes sooner.

Arguments

  • input!
Returns!
MUTATION

revokePartnerStaff

#

Revoke staff access from a partnership. This removes a staff member's role for the partnership. They will no longer be able to switch to this partnership context. Requires: TenantAdmin, PlatformAdmin, PartnershipOwner, or PartnershipManager role.

Arguments

  • input!
ReturnsBoolean!
MUTATION

revokeRole

#

Revoke a role from an account

Arguments

  • input!
ReturnsBoolean!
MUTATION

revokeSession

#

Arguments

  • input!
Returns!
MUTATION

schemaV15

#
ReturnsString!
MUTATION

setPassword

#

Arguments

  • input!
Returns!
MUTATION

startEmailLogin

#

Begin a passwordless email-OTP login. The supplied email must belong to an existing, phone-registered, email-verified account in the resolved tenant — anything else returns a typed error (EMAIL_NOT_REGISTERED / EMAIL_NOT_VERIFIED) and the client should route the user back to phone-based registration.

Arguments

  • input!
Returns!
MUTATION

startEmailVerification

#

Start email verification by sending an OTP code to the provided email. Requires authentication.

Arguments

  • input!
Returns!
MUTATION

startPasskeyAuthentication

#

Arguments

  • input!
Returns!
MUTATION

startPasskeyRegistration

#

Begin enrolling a passkey for the authenticated account.

Arguments

  • input!
Returns!
MUTATION

startPhoneVerification

#

Arguments

  • input!
Returns!
MUTATION

switchPartnership

#

Switch to a different partnership context or clear partnership context. When switching to a partnership, the system verifies the user has a role with entity_kind=Partnership and entity_id=partnershipId. If authorized, new tokens are issued with the partnership context embedded. Pass null partnershipId to clear partnership context and return to personal account mode.

Arguments

  • input!
Returns!
MUTATION

transferTenantOwnership

#

Transfer the TenantOwner role from the calling account to another account in the same tenant. Requires a fresh step-up elevation token (Phase 3). The client first calls requestStepUp(password) to mint a 5-minute single-shot JWT, then attaches it as X-Elevation: <token> on this mutation. If the header is missing, malformed, or the token has already been consumed, the mutation returns STEP_UP_REQUIRED so the client can prompt for re-auth.

Arguments

  • input!
Returns!
MUTATION

updateAccountAdmin

#

Update an account's profile fields as admin.

Arguments

  • input!
Returns!
MUTATION

updateAccountStatus

#

Update an account's status (Active/Blocked) as admin.

Arguments

  • input!
Returns!
MUTATION

updateMyPassword

#

Arguments

  • input!
Returns!
MUTATION

updatePassword

#

Arguments

  • input!
Returns!
MUTATION

updatePermissionSet

#

Update an existing permission set.

Arguments

  • input!
Returns!
MUTATION

updateProfile

#

Arguments

  • input!
Returns!
MUTATION

updateSavedLocation

#

Arguments

  • input!
Returns!
MUTATION

verifyEmailLogin

#

Verify the OTP from startEmailLogin and mint a session. Returns the same AuthFlowResponse shape as verifyOtp, so the client can dispatch on AuthSuccess / RestoreAccountRequired without branching on which channel sent the code.

Arguments

  • input!
Returns!
MUTATION

verifyEmailOtp

#

Verify an email OTP code to confirm the email address. Requires authentication.

Arguments

  • input!
Returns!
MUTATION

verifyOtp

#

Arguments

  • input!
Returns!

Build the foundation once. Expand without limits.

BetterSuite is built for teams who see on-demand as a business — not a feature.