Skip to main content

autessa.user

The current user’s profile and account settings.

autessa.user.create.companyMUTATE

autessa.user.create.company({ companyName, setAsDefaultScope })

Create a new company owned by the current user, optionally making it the caller's default scope.

Creates a brand-new company with the current user as its owner. companyName is required — an empty name is rejected. Set setAsDefaultScope true to also switch the caller's current scope to the new company (the session's active company changes); leave it false to create the company without leaving the current scope. Fails if the user already owns the maximum number of companies for their plan.

Request fields

  • Name
    companyName
    Type
    string
    Description
  • Name
    setAsDefaultScope
    Type
    boolean
    Description

Response fields

  • Name
    errors
    Type
    string[]
    Description
  • Name
    deprecationWarnings
    Type
    string[]
    Description
  • Name
    sessionToken
    Type
    string
    Description
  • Name
    company
    Type
    CompanyDto
    Description

autessa.user.roleREAD

autessa.user.role()

Read the current user: their identity, effective permissions in the active company, the active company, and every company they can access.

Returns the caller's own user record, the permissions they hold in the current company scope, the active company (currentScope), and every company they belong to (availableCompanies). Always scoped to the caller — it cannot read another user. Read-only.

Request fields

No fields.

Response fields

  • Name
    errors
    Type
    string[]
    Description
  • Name
    deprecationWarnings
    Type
    string[]
    Description
  • Name
    sessionToken
    Type
    string
    Description
  • Name
    permissions
    Type
    PermissionDto[]
    Description
  • Name
    user
    Type
    UserDto
    Description
  • Name
    currentScope
    Type
    CompanyDto
    Description
  • Name
    availableCompanies
    Type
    CompanyDto[]
    Description