# User

Type: User

Schema: [User](https://sourcey-peertube.pages.dev/api-rest-reference/models/user.md)

- `id` (optional)
  Reference: [id](https://sourcey-peertube.pages.dev/api-rest-reference/models/id.md); Type: id
  
  minimum: 1
  
  Example:
  
  ```json
  42
  ```

- `username` (optional)
  Reference: [username](https://sourcey-peertube.pages.dev/api-rest-reference/models/username.md); Type: username
  
  immutable name of the user, used to find or mention its actor
  
  minLength: 1
  
  maxLength: 50
  
  pattern: "/^[a-z0-9._]+$/"
  
  Example:
  
  ```json
  "chocobozzz"
  ```

- `email` (optional)
  Type: email, email
  
  The user email

- `emailVerified` (optional)
  Type: boolean
  
  Has the user confirmed their email address?

- `nsfwPolicy` (optional)
  Reference: [NSFWPolicy](https://sourcey-peertube.pages.dev/api-rest-reference/models/nsfwpolicy.md); Type: NSFWPolicy
  
  enum: ["display","warn","do_not_list"]

- `nsfwFlagsDisplayed` (optional)
  Reference: [NSFWFlag](https://sourcey-peertube.pages.dev/api-rest-reference/models/nsfwflag.md); Type: NSFWFlag
  
  
  NSFW flags (can be combined using bitwise or operator)
  - `0` NONE
  - `1` VIOLENT
  - `2` EXPLICIT_SEX
  
  
  enum: [0,1,2,4]

- `nsfwFlagsHidden` (optional)
  Reference: [NSFWFlag](https://sourcey-peertube.pages.dev/api-rest-reference/models/nsfwflag.md); Type: NSFWFlag
  
  
  NSFW flags (can be combined using bitwise or operator)
  - `0` NONE
  - `1` VIOLENT
  - `2` EXPLICIT_SEX
  
  
  enum: [0,1,2,4]

- `nsfwFlagsWarned` (optional)
  Reference: [NSFWFlag](https://sourcey-peertube.pages.dev/api-rest-reference/models/nsfwflag.md); Type: NSFWFlag
  
  
  NSFW flags (can be combined using bitwise or operator)
  - `0` NONE
  - `1` VIOLENT
  - `2` EXPLICIT_SEX
  
  
  enum: [0,1,2,4]

- `nsfwFlagsBlurred` (optional)
  Reference: [NSFWFlag](https://sourcey-peertube.pages.dev/api-rest-reference/models/nsfwflag.md); Type: NSFWFlag
  
  
  NSFW flags (can be combined using bitwise or operator)
  - `0` NONE
  - `1` VIOLENT
  - `2` EXPLICIT_SEX
  
  
  enum: [0,1,2,4]

- `aiUsagesHidden` (optional)
  Type: Array<VideoAIUsageSet>
  
  **PeerTube >= 9.0** Videos with these AI usages are hidden from video lists
  
  Items:
    Reference: [VideoAIUsageSet](https://sourcey-peertube.pages.dev/api-rest-reference/models/videoaiusageset.md); Type: VideoAIUsageSet
    
    **PeerTube >= 9.0** Use of AI in the video, declared by the video creator:
      - `1` Not specified
      - `2` No AI-generated content: nothing seen or heard in the video has been generated by AI
      - `3` Contains AI-generated content: some parts of the video have been generated by AI
      - `4` AI-generated: the whole video, or most of it, has been generated by AI
    
    
    enum: [1,2,3,4]

- `adminFlags` (optional)
  Reference: [UserAdminFlags](https://sourcey-peertube.pages.dev/api-rest-reference/models/useradminflags.md); Type: UserAdminFlags
  
  Admin flags for the user (None = `0`, Bypass video blocklist = `1`)
  
  enum: [0,1]
  
  Example:
  
  ```json
  1
  ```

- `autoPlayNextVideo` (optional)
  Type: boolean
  
  Automatically start playing the upcoming video after the currently playing video

- `autoPlayNextVideoPlaylist` (optional)
  Type: boolean
  
  Automatically start playing the video on the playlist after the currently playing video

- `autoPlayVideo` (optional)
  Type: boolean
  
  Automatically start playing the video on the watch page

- `p2pEnabled` (optional)
  Type: boolean
  
  whether to enable P2P in the player or not

- `videosHistoryEnabled` (optional)
  Type: boolean
  
  whether to keep track of watched history or not

- `videoLanguages` (optional)
  Type: Array<string>
  
  list of languages to filter videos down to
  
  Items:
    Type: string

- `videoCategories` (optional)
  Type: Array<integer>; nullable
  
  list of categories to filter videos down to (`null` means all categories)
  
  Items:
    Type: integer

- `videoLive` (optional)
  Type: string
  
  filter videos down to lives (`true`), VODs (`false`) or display both
  
  enum: ["true","false","both"]

- `language` (optional)
  Type: string
  
  default language for this user

- `videoQuota` (optional)
  Type: integer
  
  The user video quota in bytes
  
  Example:
  
  ```json
  -1
  ```

- `videoQuotaDaily` (optional)
  Type: integer
  
  The user daily video quota in bytes
  
  Example:
  
  ```json
  -1
  ```

- `role` (optional)
  Type: object
  
  - `id` (optional)
    Reference: [UserRole](https://sourcey-peertube.pages.dev/api-rest-reference/models/userrole.md); Type: UserRole
    
    The user role (Admin = `0`, Moderator = `1`, User = `2`)
    
    enum: [0,1,2]
    
    Example:
    
    ```json
    2
    ```
  
  - `label` (optional)
    Type: string
    
    enum: ["User","Moderator","Administrator"]

- `theme` (optional)
  Type: string
  
  Theme enabled by this user

- `account` (optional)
  Reference: [Account](https://sourcey-peertube.pages.dev/api-rest-reference/models/account.md); Type: Actor & any

- `notificationSettings` (optional)
  Reference: [UserNotificationSettings](https://sourcey-peertube.pages.dev/api-rest-reference/models/usernotificationsettings.md); Type: UserNotificationSettings

- `videoChannels` (optional)
  Type: Array<VideoChannel>
  
  Items:
    Reference: [VideoChannel](https://sourcey-peertube.pages.dev/api-rest-reference/models/videochannel.md); Type: Actor & object

- `blocked` (optional)
  Type: boolean

- `blockedReason` (optional)
  Type: string

- `noInstanceConfigWarningModal` (optional)
  Type: boolean

- `noAccountSetupWarningModal` (optional)
  Type: boolean

- `noWelcomeModal` (optional)
  Type: boolean

- `createdAt` (optional)
  Type: string

- `pluginAuth` (optional)
  Type: string
  
  Auth plugin to use to authenticate the user

- `lastLoginDate` (optional)
  Type: string, date-time

- `twoFactorEnabled` (optional)
  Type: boolean
  
  Whether the user has enabled two-factor authentication or not

- `newFeaturesInfoRead` (optional)
  Type: number
  
  New features information the user has read