User-related REST APIs

Users include any person who interacts with your AnswerHub site — from you, the site administrator or owner, down to those who only belong to the default users group. This section guides you in creating API requests that involve users.

Documentation Related to Users

📘

Note on userIds:

User Sorting Criteria and Data Model

User Sorting Criteria

We support the following sorting criteria in operations returning a paged list of users:

Criteria NameFieldOrderDescription
reputationreputationdescendingThis parameter sorts users from most reputable (highest amount of reputation points) to least reputable (least amount of reputation points).
usernameusernameascendingThis parameter sorts users by username in ascending alphabetical order (Aa, Bb, Cc, etc).
recentcreationDatedescendingThis parameter sorts users from the most recent to the earliest created (registered).
oldestcreationDateascendingThis parameter sorts users from the earliest to the most recently created (registered).
defaultBy default (if you do not select other sort options) the AnswerHub API will sort returned users in a request by reputation, from most to least.

User Data Model: Field Summary

Field NameTypeExample(s)Description
avatarURLhttp://www.gravatar.com/avatar/50This is the URL connected to the avatar image for a user.
bronzeInteger3This is a count of a user's Bronze-level awards.
creationDateTimestamp1328817889000This is the timestamp formatted creation date of a given user.
creationDateFormattedString40948.62778This is the string formatted creation date of a given user.
goldInteger0This is a count of a user's Gold-level awards.
idInteger23This is the unique integer (digit) identifier for a given user.
moderatorBooleanFALSEThis is the boolean flag that specifies whether a given user has been granted moderator permissions.
modificationDateTimestamp1328817889000This is the timestamp formatted date when last updating or modifying a given user's information.
realnameStringJames BondThis is the human readable real name of a user. The value will only return if the Site Admin has chosen to show Real Names rather than User Names. If the Site Admin has chosen to show User Names, the value will be empty. (Accessed via Users & Groups > Settings > General.)
reputationInteger1This is the integer (digit) representation of the number of reputation points a user has.
silverInteger1This is a count of a user's Silver-level awards.
superuserBooleanTRUEThis is the boolean flag that specifies whether a given user has been granted administrator permissions.
typeString(always/constant) "user"This is the type discriminator.
usernameStringjames007This is the assigned username for a given user.
slugString"james-bond"This is a slug representation of a user's real name.