{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/zoho-desk/json-schema/zoho-desk-email-thread-response-json-schema.json",
  "title": "emailThreadResponseJson",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/zoho-desk-openapi.yml#/components/schemas/emailThreadResponseJson",
  "type": [
    "object",
    "null"
  ],
  "additionalProperties": false,
  "properties": {
    "isDescriptionThread": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "bcc": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 13000,
      "minLength": 0,
      "pattern": "(^((.*?)((<)*?[\\p{L}\\p{M}\\p{N}\\_]([\\p{L}\\p{M}\\p{N}\\_\\-.+\\'\\/\\&]*)@([\\p{L}\\p{M}\\p{N}\\_\\-_.]*)(.[\\p{L}\\p{M}\\p{N}\\_]{2,22}(.[\\p{L}\\p{M}\\p{N}\\_]{2}){0,2})(>)*?(\\s)*((,|;)\\s*)?))+|^$)"
    },
    "attachments": {
      "$ref": "#/$defs/Thread_attachments"
    },
    "isContentTruncated": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "canReply": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "channel": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "EMAIL"
      ],
      "maxLength": 100,
      "minLength": 0
    },
    "source": {
      "$ref": "#/$defs/Thread_channelSource"
    },
    "content": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 16000000,
      "minLength": 0
    },
    "impersonatedUser": {
      "$ref": "#/$defs/Thread_author"
    },
    "channelRelatedInfo": {
      "$ref": "#/$defs/Thread_channelRelatedInfo"
    },
    "createdTime": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 100,
      "minLength": 0,
      "pattern": "(((19|20)\\d\\d)[-/.]{1}(0?[1-9]|1[012])[-/.]{1}(0?[1-9]|[12][0-9]|3[01])(T)([01]?[0-9]|2[0-3]):[0-5]?[0-9]:[0-5]?[0-9]([/.][\\d]{0,3})?(Z))"
    },
    "id": {
      "type": [
        "string",
        "integer",
        "null"
      ],
      "format": "int64",
      "pattern": "([0-9]+)"
    },
    "contentType": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "text/plain",
        "text/html"
      ],
      "maxLength": 100,
      "minLength": 0
    },
    "direction": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "in",
        "out"
      ],
      "maxLength": 100,
      "minLength": 0
    },
    "cc": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 13000,
      "minLength": 0,
      "pattern": "(^((.*?)((<)*?[\\p{L}\\p{M}\\p{N}\\_]([\\p{L}\\p{M}\\p{N}\\_\\-.+\\'\\/\\&]*)@([\\p{L}\\p{M}\\p{N}\\_\\-_.]*)(.[\\p{L}\\p{M}\\p{N}\\_]{2,22}(.[\\p{L}\\p{M}\\p{N}\\_]{2}){0,2})(>)*?(\\s)*((,|;)\\s*)?))+|^$)"
    },
    "summary": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 100,
      "minLength": 0,
      "pattern": "(^([a-zA-Z0-9\\s\\.\\?\\_\\-\\,])*$|null|undefined)"
    },
    "visibility": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "public",
        "private"
      ],
      "maxLength": 100,
      "minLength": 0
    },
    "author": {
      "$ref": "#/$defs/Thread_author"
    },
    "fullContentURL": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 100,
      "minLength": 0,
      "pattern": "(^(ht|f)tp(s?)\\://[-.\\w]*(/?)([a-zA-Z0-9\\-\\.\\?\\,\\:\\'/\\\\+=&amp;%\\$#_@]*)?$)"
    },
    "isForward": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "hasAttach": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "responderId": {
      "type": [
        "string",
        "integer",
        "null"
      ],
      "format": "int64",
      "pattern": "([0-9]+)"
    },
    "replyTo": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 13000,
      "minLength": 0,
      "pattern": "(^((.*?)((<)*?[\\p{L}\\p{M}\\p{N}\\_]([\\p{L}\\p{M}\\p{N}\\_\\-.+\\'\\/\\&]*)@([\\p{L}\\p{M}\\p{N}\\_\\-_.]*)(.[\\p{L}\\p{M}\\p{N}\\_]{2,22}(.[\\p{L}\\p{M}\\p{N}\\_]{2}){0,2})(>)*?(\\s)*((,|;)\\s*)?))+|^$)"
    },
    "attachmentCount": {
      "type": [
        "string",
        "integer",
        "null"
      ],
      "format": "int64",
      "pattern": "([0-9]+)"
    },
    "readReceipts": {
      "$ref": "#/$defs/readReceipts"
    },
    "to": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 13000,
      "minLength": 0,
      "pattern": "(^((.*?)((<)*?[\\p{L}\\p{M}\\p{N}\\_]([\\p{L}\\p{M}\\p{N}\\_\\-.+\\'\\/\\&]*)@([\\p{L}\\p{M}\\p{N}\\_\\-_.]*)(.[\\p{L}\\p{M}\\p{N}\\_]{2,22}(.[\\p{L}\\p{M}\\p{N}\\_]{2}){0,2})(>)*?(\\s)*((,|;)\\s*)?))+|^$)"
    },
    "fromEmailAddress": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 300,
      "minLength": 0,
      "pattern": "^((.*?)((<)*?[a-zA-Z0-9]([\\w\\-.+\\'\\/]*)@([\\w\\-.]*)(\\.[a-zA-Z]{2,22}(.[a-zA-Z]{2}){0,2})(>)*?(\\s)*((,|;)\\s*)?))+"
    },
    "actions": {
      "$ref": "#/$defs/actionsList"
    },
    "status": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "SUCCESS",
        "PENDING",
        "FAILED",
        "DRAFT"
      ],
      "maxLength": 100,
      "minLength": 0
    },
    "respondedIn": {
      "type": [
        "string",
        "null"
      ],
      "description": "Time taken by the agent to respond to the customer",
      "maxLength": 100,
      "minLength": 0
    },
    "aspects": {
      "type": [
        "string",
        "null"
      ]
    },
    "keyWords": {
      "type": [
        "string",
        "null"
      ]
    },
    "sentiment": {
      "type": [
        "string",
        "null"
      ],
      "description": "Indicates whether the customer's overall tone in the thread is positive, negative, or neutral. Possible values: Positive - The customer expresses a positive or satisfied tone. Negative - The customer expresses a negative, dissatisfied, or frustrated tone. Neutral - The customer expresses neither a clearly positive nor negative tone. null - Returned when the ticket sentiment feature is disabled for the organization or the specific department."
    }
  },
  "required": [
    "actions",
    "attachmentCount",
    "attachments",
    "author",
    "bcc",
    "canReply",
    "cc",
    "channel",
    "channelRelatedInfo",
    "content",
    "contentType",
    "createdTime",
    "direction",
    "fromEmailAddress",
    "fullContentURL",
    "hasAttach",
    "id",
    "impersonatedUser",
    "isContentTruncated",
    "isDescriptionThread",
    "isForward",
    "readReceipts",
    "replyTo",
    "responderId",
    "source",
    "status",
    "summary",
    "to",
    "visibility"
  ],
  "$defs": {
    "Thread_actions": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": false,
      "properties": {
        "method": {
          "type": [
            "string",
            "null"
          ],
          "maxLength": 16000000,
          "minLength": 0
        },
        "rel": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "send",
            "update",
            "delete"
          ],
          "maxLength": 100,
          "minLength": 0
        },
        "href": {
          "type": [
            "string",
            "null"
          ],
          "maxLength": 16000000,
          "minLength": 0,
          "pattern": "(^(ht|f)tp(s?)\\://[-.\\w]*(/?)([a-zA-Z0-9\\-\\.\\?\\,\\:\\'/\\\\+=&amp;%\\$#_@]*)?$)"
        }
      },
      "required": [
        "href",
        "method",
        "rel"
      ]
    },
    "Thread_attachments": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/Thread_attachmentsJson"
      }
    },
    "Thread_attachmentsJson": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": false,
      "properties": {
        "status": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "VALID",
            "INVALID",
            null
          ],
          "maxLength": 100,
          "minLength": 0,
          "description": "Status of the thread attachment. Possible values: VALID, INVALID. When the status is INVALID, href and previewurl are returned as null."
        },
        "previewurl": {
          "type": [
            "string",
            "null"
          ],
          "maxLength": 16000000,
          "minLength": 0,
          "pattern": "(^(ht|f)tp(s?)\\://[-.\\w]*(/?)([a-zA-Z0-9\\-\\.\\?\\,\\:\\'/\\\\+=&amp;%\\$#_@]*)?$)"
        },
        "size": {
          "type": [
            "string",
            "integer",
            "null"
          ],
          "format": "int64",
          "pattern": "([0-9]+)"
        },
        "name": {
          "type": [
            "string",
            "null"
          ],
          "maxLength": 100,
          "minLength": 0
        },
        "id": {
          "type": [
            "string",
            "integer",
            "null"
          ],
          "format": "int64",
          "pattern": "([0-9]+)"
        },
        "href": {
          "type": [
            "string",
            "null"
          ],
          "maxLength": 500,
          "minLength": 0,
          "pattern": "(^(ht|f)tp(s?)\\://[-.\\w]*(/?)([a-zA-Z0-9\\-\\.\\?\\,\\:\\'/\\\\+=&amp;%\\$#_@]*)?$)"
        }
      },
      "required": [
        "href",
        "id",
        "name",
        "previewurl",
        "size"
      ]
    },
    "Thread_author": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": false,
      "properties": {
        "photoURL": {
          "type": [
            "string",
            "null"
          ],
          "maxLength": 200,
          "minLength": 0,
          "description": "URL of the author's profile photo",
          "pattern": "(^(ht|f)tp(s?)\\://[-.\\w]*(/?)([a-zA-Z0-9\\-\\.\\?\\,\\:\\'/\\\\+=&amp;%\\$#_@]*)?$)"
        },
        "firstName": {
          "type": [
            "string",
            "null"
          ],
          "maxLength": 50,
          "minLength": 0,
          "description": "First name of the author"
        },
        "lastName": {
          "type": [
            "string",
            "null"
          ],
          "maxLength": 50,
          "minLength": 0,
          "description": "Last name of the author"
        },
        "name": {
          "type": [
            "string",
            "null"
          ],
          "maxLength": 100,
          "minLength": 0,
          "description": "Full name of the author"
        },
        "id": {
          "type": [
            "string",
            "integer",
            "null"
          ],
          "format": "int64",
          "pattern": "([0-9]+)"
        },
        "type": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "END_USER",
            "AGENT",
            "TEAM",
            "TICKET",
            "ACTIVITY"
          ],
          "maxLength": 100,
          "minLength": 0,
          "description": "Type of the author. Accepted values: END_USER, AGENT, TEAM, TICKET, ACTIVITY"
        },
        "email": {
          "type": [
            "string",
            "null"
          ],
          "maxLength": 100,
          "minLength": 0,
          "description": "Email address of the author",
          "pattern": "^[a-zA-Z0-9\\_]([a-zA-Z0-9\\_\\+\\-\\.\\'&~]*)@(?=.{4,256}$)(([a-zA-Z0-9]+)(([\\-\\_]*[a-zA-Z0-9])*)[\\.])+[a-zA-Z]{2,22}$"
        }
      },
      "required": [
        "email",
        "firstName",
        "id",
        "lastName",
        "name",
        "photoURL",
        "type"
      ]
    },
    "Thread_channelRelatedInfo": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": false,
      "properties": {
        "isDeleted": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "isBestSolution": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "externalLink": {
          "type": [
            "string",
            "null"
          ],
          "maxLength": 100,
          "minLength": 0,
          "pattern": "(^(ht|f)tp(s?)\\://[-.\\w]*(/?)([a-zA-Z0-9\\-\\.\\?\\,\\:\\'/\\\\+=&amp;%\\$#_@]*)?$)"
        }
      },
      "required": [
        "externalLink",
        "isBestSolution",
        "isDeleted"
      ]
    },
    "Thread_channelSource": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": false,
      "properties": {
        "appName": {
          "type": [
            "string",
            "null"
          ],
          "maxLength": 100,
          "minLength": 0
        },
        "extId": {
          "type": [
            "string",
            "null"
          ],
          "maxLength": 100,
          "minLength": 0
        },
        "permalink": {
          "type": [
            "string",
            "null"
          ],
          "maxLength": 65535,
          "minLength": 0,
          "pattern": "(^(ht|f)tp(s?)\\://[-.\\w]*(/?)([a-zA-Z0-9\\-\\.\\?\\,\\:\\'/\\\\+=&amp;%\\$#_@]*)?$)"
        },
        "type": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "SYSTEM",
            "INTEGRATION",
            "INSTANT_MESSAGE"
          ],
          "maxLength": 100,
          "minLength": 0
        },
        "appPhotoURL": {
          "type": [
            "string",
            "null"
          ],
          "maxLength": 65535,
          "minLength": 0,
          "pattern": "(^(ht|f)tp(s?)\\://[-.\\w]*(/?)([a-zA-Z0-9\\-\\.\\?\\,\\:\\'/\\\\+=&amp;%\\$#_@]*)?$)"
        }
      },
      "required": [
        "appName",
        "appPhotoURL",
        "extId",
        "permalink",
        "type"
      ]
    },
    "actionsList": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/Thread_actions"
      }
    },
    "readReceiptObj": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": false,
      "properties": {
        "senderName": {
          "type": [
            "string",
            "null"
          ],
          "maxLength": 100,
          "minLength": 0
        },
        "recipientType": {
          "type": [
            "string",
            "null"
          ],
          "maxLength": 100,
          "minLength": 0
        },
        "from": {
          "type": [
            "string",
            "null"
          ],
          "maxLength": 100,
          "minLength": 0,
          "pattern": "^[a-zA-Z0-9\\_]([a-zA-Z0-9\\_\\+\\-\\.\\'&]*)@(?=.{4,256}$)(([a-zA-Z0-9]+)(([\\-\\_]*[a-zA-Z0-9])*)[\\.])+[a-zA-Z]{2,22}$"
        },
        "statusVsTime": {
          "$ref": "#/$defs/statusVsTimeArray"
        }
      },
      "required": [
        "from",
        "recipientType",
        "senderName",
        "statusVsTime"
      ]
    },
    "readReceipts": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/readReceiptObj"
      }
    },
    "statusVsTimeArray": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/statusVsTimeObj"
      }
    },
    "statusVsTimeObj": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": false,
      "properties": {
        "Status": {
          "type": [
            "string",
            "null"
          ],
          "maxLength": 100,
          "minLength": 0
        },
        "Time": {
          "type": [
            "string",
            "null"
          ],
          "maxLength": 100,
          "minLength": 0
        }
      },
      "required": [
        "Status",
        "Time"
      ]
    }
  }
}