users

Documentation for discourse JSON objects

License: MIT

users.UserActionType

Discourse User Action Type Enum

Kind: static enum property of users
Read only: true
Properties

Name Default Description
like 1 User liked a post
was_liked 2 User's post was liked
bookmark 3 User bookmarked a post
new_topic 4 User started a topic
reply 5 User replied to a post
response 6 User's post was replied to
mention 7 User was mentioned
quote 9 User was quoted
edit 11 User edited a post
new_private_message 12 User sent a new private message
got_private_message 13 User received a new private message
pending 14 User's post was put onto approvals queue (anti-spam measure)

users.UserSummary : object

Discourse User Summary

Kind: static typedef of users

Param Type Description
[id] number User id
username string Username of the summarized user
avatar_template string URL template for summarized users avatar
uploaded_avatar_id number ID of the summarized users avatar

users.UserActionSummary : object

User Action Summary

Kind: static typedef of users

Param Type Description
action_type external.posts.UserActionType UserActionType being summarized
count number Number of times user has performed action
id * Unknown, appears to always be null

users.UserGroup : object

User Group

Kind: static typedef of users

Param Type Description
id number User Group Id
automatic boolean Is the group automatically applied?
name string Group Name
user_count number Number of users in group
alias_level * Unknown
visible boolean Is group Visible?
automatic_membership_email_domains Array.<string> Email domains that automatically give membership
automatic_membership_retroactive boolean Does the automatic membership apply retroactively?
primary_group boolean Is this a primary group?
title * Unsure. Group title? can be used as user title?

users.User : object

Discourse User

Kind: static typedef of users

Param Type Description
id number User Id
username string Username
uploaded_avatar_id number ID of the users avatar
avatar_template string URL template for users avatar
name string Users long name
[email] string User Email
last_posted_at string ISO formatted datetime of last post by user
last_seen_at string ISO formatted datetime of last user interaction
bio_raw string Uncooked user bio
bio_cooked string Cooked user bio
created_at string ISO formatted datetime of account creation
website string User website
profile_background string File path of profile background
card_background string File path of user background
can_edit boolean Can logged in user edit this user?
can_edit_username boolean Can logged in user edit this users username?
can_edit_email boolean Can logged in user edit this users email?
can_edit_name boolean Can logged in user edit this users name?
stats Array.<UserActionSummary> User post action summary
can_send_private_messages boolean Can this user send private messages?
can_send_private_message_to_user boolean Can the current user send a private message to this user?
bio_excerpt string Short exerpt from user bio
trust_level number This user's trust level
moderator boolean Is this user a moderator?
admin boolean Is this user an admin?
title string User's title
badge_count number Number of unique badge types this user has
notification_count number Number of notifications this user has
has_title_badges boolean Does user have badges that can be set as title?
edit_history_public boolean Does user have public edit history?
custom_fields object Unsure, needs explanation
(Object.) ´user_fields´ Custom site specific user fields
pending_count number Number of posts pending moderator approval?
locale string User set locale
email_digests boolean User receives email digests?
email_private_messages boolean User receives email notifications for private messages?
email_direct boolean Unsure. User can be emailded direct?
email_always boolean Does the user wish to be emailed regardless of activity?
digest_after_days number Frequency to sent email digest out after
mailing_list_mode boolean Unknown purpose. what is this field for?
auto_track_topics_after_msecs number Time user must spend reading topic before topic is tracked
new_topic_duration_minutes number Time topics are considered new for
external_links_in_new_tab boolean User opens external links in new tab?
dynamic_favicon boolean User uses the dynamic favicon?
enable_quoting boolean User has enabled quote reply on highlighted text?
muted_category_ids Array.<number> Ids of categories use auto-mutes topics in
tracked_category_ids Array.<number> Ids of categories user auto-tracks topics in
watched_category_ids Array.<number> Ids of categories user auto-watches topics in
private_messages_stats object Counts of private messages
private_messages_stats.all number Count of all private messages for user
private_messages_stats.mine number Count of all private messages created by user
private_messages_stats.unread number Count of unread private messages for user
disable_jump_reply boolean User has disabled jump to new post on reply.
gravatar_avatar_upload_id number Id of uploaded gravatar. Why is this a thing?
custom_avatar_uplaod_id number Id of uploaded custom avatar
muted_usernames Array.<string> List of username that user has vlocked from sending notifications
invited_by string User that invited this user to the forum
custom_groups Array.<UserGroup> Custom groups user belongs to
featured_user_badge_ids Array.<number> Badge Ids that are featured on the usercard
card_badge external.badges.Badge User selected badge to be displayed on user card

users.UserProfile : object

User Profile Data

Kind: static typedef of users

Param Type Description
user_badges Array.<external.badges.UserBadge> User Badge info for fatured badges
badges Array.<external.badges.Badge> Badge info for featured badges
badge_types Array.<external.badges.BadgeType> Badge type info for featured badges
users Array.<UserSummary> User summary information for referenced users
user User User Data