{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/phone-com/json-schema/phone-com-fax-schema.json",
  "title": "Fax",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/phone-com-fax-api-openapi.yml#/components/schemas/Fax",
  "type": "object",
  "properties": {
    "to": {
      "type": "string",
      "pattern": "^\\+?([0-9\\-\\(\\)\\s]*)$",
      "description": "Phone number to where the Fax was sent"
    },
    "cover_text": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 16384,
      "description": "Fax cover text"
    },
    "extension": {
      "type": "integer",
      "minimum": 1,
      "description": "ID of extension where the Fax is saved into."
    },
    "quality": {
      "enum": [
        "low",
        "medium",
        "high"
      ],
      "description": "Fax quality must be one of: low, medium, high"
    },
    "from": {
      "type": [
        "string",
        "null"
      ],
      "pattern": "^\\+?([0-9\\-\\(\\)\\s]*)$",
      "description": "Phone number from where the Fax was sent"
    },
    "from_name": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 70,
      "description": "The name / caller ID of the person who sent the Fax"
    },
    "media": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "filename": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 48,
            "description": "Name of file to be uploaded"
          },
          "data": {
            "type": "string",
            "description": "BASE64 encoded PDF data"
          }
        },
        "required": [
          "data"
        ]
      },
      "description": "Required if cover_text is not provided. Media contains array of objects: BASE64 encoded PDF data and filename. PDF data is required while filename is optional"
    }
  },
  "required": [
    "to",
    "extension",
    "media"
  ]
}