1## User
2```json
3{
4 "id": 2,
5 "username": "peppy",
6 "profile_colour": "#3366FF",
7 "avatar_url": "https://a.ppy.sh/2?1519081077.png",
8 "country_code": "AU",
9 "is_active": true,
10 "is_bot": false,
11 "is_deleted": false,
12 "is_online": true,
13 "is_supporter": true
14}
15```
16
17Represents a user.
18
19Field | Type | Description
20--------------- | ------------------------- | ----------------------------------------------------------------------
21avatar_url | string | url of user's avatar
22country_code | string | two-letter code representing user's country
23default_group | string? | Identifier of the default [Group](#group) the user belongs to.
24id | integer | unique identifier for user
25is_active | boolean | has this account been active in the last x months?
26is_bot | boolean | is this a bot account?
27is_deleted | boolean | |
28is_online | boolean | is the user currently online? (either on lazer or the new website)
29is_supporter | boolean | does this user have supporter?
30last_visit | [Timestamp](#timestamp)? | last access time. `null` if the user hides online presence
31pm_friends_only | boolean | whether or not the user allows PM from other than friends
32profile_colour | string? | colour of username/profile highlight, hex code (e.g. `#333333`)
33username | string | user's display name
34
35<div id="user-optionalattributes" data-unique="user-optionalattributes"></div>
36
37### Optional attributes
38
39Following are attributes which may be additionally included in the response. Relevant endpoints should list them if applicable.
40
41Field | Type | Notes
42---------------------------|----- | -----
43account_history | [User.UserAccountHistory](#user-useraccounthistory)[] | |
44active_tournament_banner | [User.ProfileBanner](#user-profilebanner)? | Deprecated, use `active_tournament_banners` instead.
45active_tournament_banners | [User.ProfileBanner](#user-profilebanner)[] | |
46badges | [User.UserBadge](#user-userbadge)[] | |
47beatmap_playcounts_count | integer | |
48blocks | | |
49country | | |
50cover | | |
51favourite_beatmapset_count | integer | |
52follow_user_mapping | integer[] | |
53follower_count | integer | |
54friends | | |
55graveyard_beatmapset_count | integer | |
56groups | [UserGroup](#usergroup)[] | |
57guest_beatmapset_count | integer | |
58is_restricted | boolean? | |
59kudosu | [User.Kudosu](#user-kudosu) | |
60loved_beatmapset_count | integer | |
61mapping_follower_count | integer | |
62monthly_playcounts | [UserMonthlyPlaycount](#usermonthlyplaycount)[] | |
63page | | |
64pending_beatmapset_count | | |
65previous_usernames | | |
66rank_highest | [User.RankHighest](#user-rankhighest)? | |
67rank_history | | |
68ranked_beatmapset_count | | |
69replays_watched_counts | | |
70scores_best_count | integer | |
71scores_first_count | integer | |
72scores_recent_count | integer | |
73session_verified | boolean | |
74statistics | [UserStatistics](#userstatistics) | |
75statistics_rulesets | UserStatisticsRulesets | |
76support_level | | |
77unread_pm_count | | |
78user_achievements | | |
79user_preferences | | |
80
81<div id="user-kudosu" data-unique="user-kudosu"></div>
82
83### Kudosu
84
85Field | Type
86----------|-----
87available | integer
88total | integer
89
90<div id="user-profilebanner" data-unique="user-profilebanner"></div>
91
92### ProfileBanner
93
94Field | Type | Description
95--------------|-------------|------------
96id | integer | |
97tournament_id | integer | |
98image | string? | |
99image@2x | string? | |
100
101<div id="user-profilepage" data-unique="user-profilepage"></div>
102
103### ProfilePage
104
105| Section |
106|-----------------|
107| me |
108| recent_activity |
109| beatmaps |
110| historical |
111| kudosu |
112| top_ranks |
113| medals |
114
115<div id="user-rankhighest" data-unique="user-rankhighest"></div>
116
117### RankHighest
118
119Field | Type
120-----------|-----
121rank | integer
122updated_at | [Timestamp](#timestamp)
123
124<div id="user-useraccounthistory" data-unique="user-useraccounthistory"></div>
125
126### UserAccountHistory
127
128Field | Type | Description
129------------|-------------------------|------------
130description | string? | |
131id | integer | |
132length | integer | In seconds.
133permanent | boolean | |
134timestamp | [Timestamp](#timestamp) | |
135type | string | `note`, `restriction`, or `silence`.
136
137<div id="user-userbadge" data-unique="user-userbadge"></div>
138
139### UserBadge
140
141Field | Type | Description
142-------------|-------------------------|------------
143awarded_at | [Timestamp](#timestamp) | |
144description | string | |
145image@2x_url | string | |
146image_url | string | |
147url | string | |