Homepage

User

Last edit: Nov 10, 2026

User account of the instance, with its properties and profiles

type User implements HasModelsInterface, HasRecordsInterface, LegacyCustomAttributeInterface, PropertiesInterface, RemoteRecordsInterface, RemoteUsersInterface {
  address(name: String!): CustomAddrress
  addresses(name: String): [CustomAddrress!]
  attachment(name: String!): PrivateFile
  attachments(name: String): [PrivateFile!]
  authenticate: Authenticate!
  authentications: [Authentication!]
  communication: Communication
  created_at: JSONDate
  custom_address(name: String!): CustomAddrress
  custom_addresses(name: String): [CustomAddrress!]
  custom_attachment(name: String!): PrivateFile
  custom_attachments(name: String): [PrivateFile!]
  custom_image(name: String!): Image
  custom_images(name: String): [Image!]
  customizations(name: String, user_id: ID): [Customization!]
  deleted_at: JSONDate
  email: String!
  encrypted_password: String
  external_id: String
  first_name: String
  id: ID
  image(name: String!): Image
  images(name: String): [Image!]
  jwt_token(algorithm: JwtAlgorithm = HS256, expires_in: Int): String
  language: String
  last_name: String
  middle_name: String
  model(
    filter: ModelsFilterInput
    foreign_property: String = "id"
    join_on_property: String!
    model_name: [String]!
    sort: [ModelsSortInput!]
  ): Model
  models(
    foreign_property: String!
    join_on_property: String!
    limit: Int
    model_name: [String]!
    sort: [ModelsSortInput!]
  ): [Model!]
  name: String
  otp(otp_name: String): Otp!
  otp_tokens: [String!]!
  profile(profile_type: String!): Profile
  profiles(profile_type: String): [Profile!]!
  properties(select: [PropertiesFieldInput!]): HashObject
  property(name: String!): String
  property_array(name: String!): [String!]
  property_boolean(name: String!): Boolean
  property_float(name: String!): Float
  property_int(name: String!): Int
  property_json(name: String!): JSONPayload
  property_object(name: String!): HashObject
  property_upload(expires_in: Int, name: String!): PropertyUpload
  related_model(
    filter: ModelsFilterInput
    foreign_property: String = "id"
    join_on_property: String!
    model_schema_name: [String]!
    sort: [ModelsSortInput!]
  ): Model
  related_models(
    filter: ModelsFilterInput
    foreign_property: String!
    join_on_property: String!
    limit: Int
    model_schema_name: [String]!
    sort: [ModelsSortInput!]
  ): [Model!]
  related_record(
    filter: RecordsFilterInput
    foreign_property: String = "id"
    join_on_property: String!
    sort: [RecordsSortInput!]
    table: [String]!
  ): Record
  related_records(
    filter: RecordsFilterInput
    foreign_property: String!
    join_on_property: String!
    limit: Int
    sort: [RecordsSortInput!]
    table: [String]!
  ): [Record!]
  related_user(
    filter: ModelsFilterInput
    foreign_property: String = "id"
    join_on_property: String = "user_id"
    sort: [UsersSortInput!]
  ): User
  related_users(
    filter: ModelsFilterInput
    foreign_property: String!
    join_on_property: String!
    limit: Int
    sort: [UsersSortInput!]
  ): [User!]
  remote_records(endpoint: Endpoint!, join_on_property: String!): [Record!]
  remote_users(endpoint: Endpoint!, join_on_property: String!): [User!]
  slug: String!
  social_friends(page: Int = 1, per_page: Int = 20): UserCollection
  temporary_token(expires_in: Float = 48, valid_for: Int): String
  transactables: [Transactable!]
  updated_at: JSONDate
  user(
    foreign_property: String = "id"
    join_on_property: String = "user_id"
    sort: [UsersSortInput!]
  ): User
  users(
    foreign_property: String!
    join_on_property: String!
    limit: Int
    sort: [UsersSortInput!]
  ): [User!]
}

Fields

address (CustomAddrress)

Returns the legacy address property with the given name. Deprecated, store addresses in your own table

Name of the address property

addresses (CustomAddrress)

Returns legacy address properties, optionally only those with the given name.
Deprecated, store addresses in your own table

Name of the address property; all when omitted

attachment (PrivateFile)

Returns the legacy attachment property with the given name. Deprecated, use property_upload

Name of the attachment property

attachments (PrivateFile)

Returns legacy attachment properties, optionally only those with the given name. Deprecated, use property_upload

Name of the attachment property; all when omitted

authenticate (Authenticate)

Checks credentials of the user, such as a password or a token

authentications (Authentication)

Accounts of the user at external identity providers such as auth0, facebook or
google. Deprecated, use the pos-module-oauth modules instead

communication (Communication)

Deprecated, phone verification data of a click-to-call integration; use records

created_at (JSONDate)

Timestamp of when the object was created, set automatically by the system

custom_address (CustomAddrress)

Returns the legacy address property with the given name. Deprecated, store addresses in your own table

Name of the property

custom_addresses (CustomAddrress)

Returns legacy address properties. Deprecated, store addresses in your own table

Name of the property; all when omitted

custom_attachment (PrivateFile)

Returns the legacy attachment property with the given name. Deprecated, use property_upload

Name of the property

custom_attachments (PrivateFile)

Returns legacy attachment properties. Deprecated, use property_upload

Name of the property; all when omitted

custom_image (Image)

Returns the legacy image property with the given name. Deprecated, use property_upload

Name of the property

custom_images (Image)

Returns legacy image properties. Deprecated, use property_upload

Name of the property; all when omitted

customizations (Customization)

Deprecated, legacy customizations of the user; use related_records

Name of the model schema

  • user_id (ID)

ID of the user who created the customization

deleted_at (JSONDate)

Timestamp of when the object was soft deleted, populated by the delete action.
It is also possible to set it manually via update. To undelete, change it back
to an empty value; note that associated objects need to be undeleted manually as well.

email (String)

Email address of the user, unique within the instance

encrypted_password (String)

One-way hash of the user password; the password itself is never stored

external_id (String)

Identifier of the object in an external system. Used mainly for import/export,
when a third party service is the source of truth

first_name (String)

First name of the user

id (ID)

Unique identifier of the object

image (Image)

Returns the legacy image property with the given name. Deprecated, use property_upload

Name of the image property

images (Image)

Returns legacy image properties, optionally only those with the given name. Deprecated, use property_upload

Name of the image property; all when omitted

jwt_token (String)

JSON Web Token identifying the user, signed with the instance
jwt_encryption_secret constant, which can be used to authenticate the user. It
contains the user_id, iat, exp and iss claims and is rejected once the user
changes the password

Signing algorithm

  • expires_in (Int)

Number of seconds after which the token expires, clamped to a maximum of one
year. When omitted, the token expires after the instance session timeout
(same source as the {% sign_in %} tag). Expired tokens are rejected on decode.

language (String)

Preferred language of the user, used for translations when the user is logged in

last_name (String)

Last name of the user

middle_name (String)

Middle name of the user

model (Model)

Returns one related model. Deprecated, use related_record

Additional conditions the related objects must match

Name of the property (or attribute) of the related object equal to join_on_property

Name of the property (or attribute) of this object matched against foreign_property

Name of the model schema (table) of the related models

Sort order of the results. When several entries are given, they are applied in the given order

models (Model)

Returns related models. Deprecated, use related_records

Name of the property (or attribute) of the related object equal to join_on_property

Name of the property (or attribute) of this object matched against foreign_property

Maximum number of related objects returned for each object

Name of the model schema (table) of the related models

Sort order of the results. When several entries are given, they are applied in the given order

name (String)

Full name of the user

otp (Otp)

Two-factor authentication with TOTP (time-based one-time passwords)

Name of the OTP secret, at most 40 characters; the default secret when omitted

otp_tokens (String)

Names of the custom (named) OTP secrets of the user

profile (Profile)

Deprecated, use profiles

Type of the profile

profiles (Profile)

Profiles of the user, which can serve as roles or group related user
properties. Soft-deleted profiles are included when the user itself is soft-deleted

Return only profiles of this type

properties (HashObject)

All properties of the object as an object keyed by property name

Properties to return, each converted to the given type (as by the matching
property_* field; other types become strings); all properties as stored when omitted

property (String)

Returns the value of the property with the given name as a string; ex: hair_color: property(name: "hair_color")

Name of the property

property_array (String)

Returns the value of the property with the given name as an array of strings;
a single value is wrapped in an array and no value gives an empty array; ex:
todo_list: property_array(name: "todo_list")

Name of the property

property_boolean (Boolean)

Returns the value of the property with the given name as a boolean. Accepts
true/false values and the strings "t"/"T" and "f"/"F"; any other value returns
an error; ex: enabled: property_boolean(name: "enabled")

Name of the property

property_float (Float)

Returns the value of the property with the given name as a float; returns an
error when the value is not a number; ex: price: property_float(name: "price")

Name of the property

property_int (Int)

Returns the value of the property with the given name as an integer; returns
an error when the value cannot be converted, e.g. "abc" or "1.5"; ex: age:
property_int(name: "age")

Name of the property

property_json (JSONPayload)

Returns the value of the property with the given name as stored, without conversion

Name of the property

property_object (HashObject)

Returns the value of the property with the given name parsed from JSON text
into an object; returns an error when the value is not valid JSON

Name of the property

property_upload (PropertyUpload)

Returns the file stored in the given upload property; ex: avatar: property_upload(name: "avatar") { url }

  • expires_in (Int)

Number of seconds for which the returned URLs are valid. When given, signed
URLs are returned; required to access files uploaded with acl private

Name of the upload property

Returns one related model. Deprecated, use related_record

Additional conditions the related objects must match

Name of the property (or attribute) of the related object equal to join_on_property

Name of the property (or attribute) of this object matched against foreign_property

Name of the model schema (table) of the related models

Sort order of the results. When several entries are given, they are applied in the given order

Returns related models. Deprecated, use related_records

Additional conditions the related objects must match

Name of the property (or attribute) of the related object equal to join_on_property

Name of the property (or attribute) of this object matched against foreign_property

Maximum number of related objects returned for each object

Name of the model schema (table) of the related models

Sort order of the results. When several entries are given, they are applied in the given order

Returns one record of the given table whose foreign_property equals the value
of join_on_property of this object (belongs-to or has-one relation). When
several records match, the last one in sort order is returned, by default the
most recently updated; ex: parent: related_record(table: "parent",
join_on_property: "parent_id") { id }

Additional conditions the related record must match

Name of the property (or attribute, e.g. id) of the related object that must equal the value of join_on_property

Name of the property (or attribute, e.g. id or user_id) of this object whose
value is matched against foreign_property. When the value is an array,
records matching any of its elements are returned. Returns an error when
this object has no such property

Sort order used to pick the record; updated_at ascending when omitted

Name of the table (or tables) the related record belongs to

Returns records of the given table whose foreign_property equals the value of
join_on_property of this object (has-many relation). Related records of all
objects in the result are loaded in one batch of at most 10,000 records,
soft-deleted records are skipped; ex: children: related_records(table:
"child", join_on_property: "id", foreign_property: "parent_id") { id }

Additional conditions the related records must match

Name of the property (or attribute, e.g. id) of the related object that must equal the value of join_on_property

Name of the property (or attribute, e.g. id or user_id) of this object whose
value is matched against foreign_property. When the value is an array,
records matching any of its elements are returned. Returns an error when
this object has no such property

Maximum number of related objects returned for each object

Sort order of the related records; updated_at ascending when omitted

Name of the table (or tables) the related records belong to

Returns the user whose foreign_property equals the value of join_on_property
of this object (belongs-to relation); by default the user whose id is in
user_id; ex: invited_by: related_user(join_on_property: "invited_by_id") { id }

Additional conditions the related objects must match

Name of the property (or attribute) of the related object equal to join_on_property

Name of the property (or attribute) of this object matched against foreign_property

Sort order of the results. When several entries are given, they are applied in the given order

Returns users whose foreign_property equals the value of join_on_property of
this object (has-many relation). Related users of all objects in the result
are loaded in one batch of at most 10,000 users, soft-deleted users are
skipped; ex: friends: related_users(join_on_property: "friend_ids",
foreign_property: "id") { id }

Additional conditions the related objects must match

Name of the property (or attribute) of the related object equal to join_on_property

Name of the property (or attribute) of this object matched against foreign_property

Maximum number of related objects returned for each object

Sort order of the results. When several entries are given, they are applied in the given order

remote_records (Record)

Returns records loaded from a remote endpoint: the value of join_on_property
is sent as ids and the records in the JSON response are returned. Requests of
all objects in the result are batched. Not available while serving a request
made by another platformOS remote fetch (returns null)

Remote endpoint returning the resources for the given ids as JSON

Name of the property of this object holding the id (or array of ids) to request

remote_users (User)

Returns users loaded from a remote endpoint: the value of join_on_property is
sent as ids and the users in the JSON response are returned. Requests of all
objects in the result are batched. Not available while serving a request made
by another platformOS remote fetch (returns null)

Remote endpoint returning the resources for the given ids as JSON

Name of the property of this object holding the id (or array of ids) to request

slug (String)

URL-friendly identifier to use in URLs instead of the id, unique within the
instance. Generated from the name (or first name, depending on instance
settings) with a random suffix when taken, and regenerated when the name changes

social_friends (UserCollection)

Deprecated, users of the instance who are friends of this user at a connected identity provider; use api calls

Page number to return, starting at 1. Requesting a page beyond the last one returns an empty results list

  • per_page (Int)

Number of results per page, must be greater than 0

temporary_token (String)

Token valid for a given number of hours that authorizes requests as this user,
e.g. from a third-party application: send it in the UserTemporaryToken request
header. It can also be verified with users { results { authenticate {
temporary_token(...) } } }. The token is invalidated when the password changes

Number of hours after which the token expires

  • valid_for (Int)

Deprecated, use expires_in. Takes precedence over expires_in when given

transactables (Transactable)

Deprecated, transactables created by the user; use records

updated_at (JSONDate)

Timestamp of when the object was last updated, set automatically by the system

user (User)

Returns the related user. Deprecated, use related_user

Name of the property (or attribute) of the related object equal to join_on_property

Name of the property (or attribute) of this object matched against foreign_property

Sort order of the results. When several entries are given, they are applied in the given order

users (User)

Returns related users. Deprecated, use related_users

Name of the property (or attribute) of the related object equal to join_on_property

Name of the property (or attribute) of this object matched against foreign_property

Maximum number of related objects returned for each object

Sort order of the results. When several entries are given, they are applied in the given order

Interfaces

HasModelsInterface

Object that can load related users and (deprecated) related models

HasRecordsInterface

Object that can load related records

LegacyCustomAttributeInterface

Deprecated accessors of legacy attachment, image and address properties

PropertiesInterface

Object with properties, including upload properties

RemoteRecordsInterface

Object that can load related records over HTTP from a remote endpoint

RemoteUsersInterface

Object that can load related users over HTTP from a remote endpoint

Questions?

We are always happy to help with any questions you may have.

contact us