---
id: user.json
"$schema": "http://json-schema.org/draft-04/schema"
title: User
description: "User profile"
type:
- object
properties:
  id:
    "$ref": "base.json#/definitions/uuid"
  email:
    type: string
    example: user@domain.com
  name:
    type: string
    example: "Example User"
  avatar:
    $ref": "base.json#/definitions/url"
  founder:
    example: 6
    description: Founding member number
    oneOf:
    - { type: 'null' }
    - { type: 'integer' }
  scope:
    description: Usage scopes granted to the user
    type: array
    uniqueItems: true
    items:
      type: string
      example: content_management
  app:
    "$ref": "base.json#/definitions/uuid"
  plan:
    "$ref": "base.json#/definitions/uuid"
  quotaSites:
    example: 1
    description: How many sites the user is allowed to create
    type: integer
  canUse:
    description: Feature flagging based on user plan
    type: object
    properties:
      siteMediaCta:
        description: If user can create CTA in the site header
        type: boolean
      edCta:
        description: If user can create CTA in Ed
        type: boolean
      edEmbed:
        description: If user can create embedded block in Ed
        type: boolean
  activatedAt:
    description: When the user plan was activated
    type: string
    format: 'date-time'
required: [id, name]
