{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/auphonic/main/json-schema/auphonic-user-schema.json",
  "title": "User",
  "x-generated": "2026-10-14",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/auphonic-openapi.yaml#/components/schemas/User",
  "type": "object",
  "required": [
    "username",
    "email",
    "user_id",
    "date_joined",
    "credits",
    "onetime_credits",
    "recurring_credits",
    "is_paying_user"
  ],
  "properties": {
    "username": {
      "type": "string"
    },
    "email": {
      "type": "string",
      "format": "email"
    },
    "user_id": {
      "type": "string",
      "description": "Unique user identifier (stable even when username changes)"
    },
    "date_joined": {
      "type": "string",
      "format": "date-time"
    },
    "credits": {
      "type": "number",
      "description": "Total available credits in hours"
    },
    "onetime_credits": {
      "type": "number",
      "description": "Available one-time credits in hours"
    },
    "recurring_credits": {
      "type": "number",
      "description": "Available recurring credits in hours"
    },
    "recharge_date": {
      "type": "string",
      "format": "date-time",
      "description": "Date when recurring credits are recharged"
    },
    "recharge_recurring_credits": {
      "type": "number",
      "description": "Amount of recurring credits recharged"
    },
    "notification_email": {
      "type": "boolean"
    },
    "error_email": {
      "type": "boolean"
    },
    "warning_email": {
      "type": "boolean"
    },
    "low_credits_email": {
      "type": "boolean"
    },
    "low_credits_threshold": {
      "type": "integer",
      "description": "Low credits warning threshold"
    },
    "is_paying_user": {
      "type": "boolean",
      "description": "True if the user (or their team account owner) has paid for recurring or one-time credits."
    }
  }
}