{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/arvx-ai/json-schema/arvx-ai-reading-request-schema.json",
  "title": "ReadingRequest",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/arvx-ai-openapi.json#/components/schemas/ReadingRequest",
  "type": "object",
  "required": [
    "user",
    "other",
    "emails"
  ],
  "properties": {
    "user": {
      "$ref": "#/$defs/User"
    },
    "other": {
      "$ref": "#/$defs/Other"
    },
    "emails": {
      "type": "array",
      "minItems": 1,
      "maxItems": 200,
      "description": "Oldest first. At least 3 written by the user, and 3 by the other person unless you send their scores. Each person is read from their own latest 20 emails, the first 3,000 characters of each.",
      "items": {
        "$ref": "#/$defs/Email"
      }
    },
    "record": {
      "type": "string",
      "description": "From the 2nd Reading on: the record from the last Reading on this pair, unchanged. Opens only for the same account and the same two people; anything else starts the pair fresh, and notes says so."
    }
  },
  "$defs": {
    "Email": {
      "type": "object",
      "required": [
        "from",
        "body"
      ],
      "properties": {
        "from": {
          "type": "string",
          "enum": [
            "user",
            "other"
          ]
        },
        "body": {
          "type": "string",
          "maxLength": 20000
        },
        "sentAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "Other": {
      "type": "object",
      "required": [
        "name",
        "email"
      ],
      "description": "The person your user works with.",
      "properties": {
        "name": {
          "type": "string",
          "maxLength": 100,
          "description": "Swapped for a placeholder before anything reaches a model."
        },
        "email": {
          "type": "string",
          "format": "email",
          "description": "Ties the record to this pair. Never stored, never sent to an AI model."
        },
        "title": {
          "type": "string",
          "maxLength": 150
        },
        "company": {
          "type": "string",
          "maxLength": 150,
          "description": "Switches on company news."
        },
        "country": {
          "type": "string",
          "enum": [
            "US"
          ],
          "description": "Two-letter code. US switches on U.S. holidays. ARVX reads people in the United States only; any other country is refused."
        },
        "city": {
          "type": "string",
          "description": "With state, switches on severe weather warnings."
        },
        "state": {
          "type": "string",
          "minLength": 2,
          "maxLength": 2,
          "description": "Two-letter code, such as MI."
        },
        "scores": {
          "$ref": "#/$defs/Scores"
        }
      }
    },
    "Scores": {
      "type": "object",
      "description": "Results from a personality assessment the person agreed to, used as given in place of reading that person from their emails. Each trait 1 to 10, at least 5 of the 9 traits. Leave out traits you don't have. Never results collected for a hiring decision, and never clinical tests.",
      "properties": {
        "ocean": {
          "type": "object",
          "properties": {
            "extraversion": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10
            },
            "agreeableness": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10
            },
            "conscientiousness": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10
            },
            "openness": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10
            },
            "emotional_stability": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10
            }
          }
        },
        "disc": {
          "type": "object",
          "description": "DISC's C goes in calculativeness.",
          "properties": {
            "dominance": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10
            },
            "influence": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10
            },
            "steadiness": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10
            },
            "calculativeness": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10
            }
          }
        }
      }
    },
    "User": {
      "type": "object",
      "required": [
        "name",
        "email"
      ],
      "description": "The person your tool works for.",
      "properties": {
        "name": {
          "type": "string",
          "maxLength": 100,
          "description": "Swapped for a placeholder before anything reaches a model."
        },
        "email": {
          "type": "string",
          "format": "email",
          "description": "Ties the record to this pair. Never stored, never sent to an AI model."
        },
        "title": {
          "type": "string",
          "maxLength": 150
        },
        "teamSize": {
          "type": "integer",
          "minimum": 1,
          "description": "People on the account, counting the user. Without it, a colleague seen in the emails counts as a team."
        },
        "company": {
          "type": "string",
          "maxLength": 150,
          "description": "Lets the Reading tell when the other person is chasing your user's company."
        },
        "scores": {
          "$ref": "#/$defs/Scores"
        }
      }
    }
  }
}