{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/mailbox-bot/json-schema/mailbox-bot-inbound-sandbox-item-detail-response-schema.json",
  "title": "InboundSandboxItemDetailResponse",
  "x-generated": "2026-11-17",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/mailbox-bot-api-openapi.json#/components/schemas/InboundSandboxItemDetailResponse",
  "type": "object",
  "properties": {
    "item": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "reference": {
          "type": "string"
        },
        "kind": {
          "type": "string",
          "enum": [
            "letter",
            "package"
          ]
        },
        "status": {
          "type": "string",
          "enum": [
            "draft",
            "received",
            "action_requested",
            "in_progress",
            "scanned",
            "forwarded",
            "discarded",
            "exception"
          ]
        },
        "sample": {
          "type": "boolean"
        },
        "environment": {
          "type": "string",
          "enum": [
            "live",
            "test"
          ]
        },
        "sender": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "received_at": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        "version": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "mailbox": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "pmb_number": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "public_mailbox_id": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "pmb_number",
                "public_mailbox_id"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ]
        },
        "agent": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "name": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "name"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ]
        },
        "exterior": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "exterior",
                    "interior",
                    "evidence"
                  ]
                },
                "page_number": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 100
                },
                "sha256": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{64}$"
                },
                "ocr_status": {
                  "type": "string",
                  "enum": [
                    "none",
                    "queued",
                    "processing",
                    "ready",
                    "needs_review",
                    "failed"
                  ]
                },
                "text": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "is_blank": {
                  "anyOf": [
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "uncertain_spans": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "start": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "end": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "start",
                      "end"
                    ],
                    "additionalProperties": false
                  }
                },
                "url": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uri"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "url_expires_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "content_trust": {
                  "type": "string",
                  "const": "untrusted_document"
                }
              },
              "required": [
                "id",
                "kind",
                "page_number",
                "sha256",
                "ocr_status",
                "text",
                "is_blank",
                "uncertain_spans",
                "url",
                "url_expires_at",
                "content_trust"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ]
        },
        "open_action": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "scan",
                    "forward",
                    "discard"
                  ]
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "proposed",
                    "approved",
                    "in_progress",
                    "done",
                    "rejected",
                    "failed",
                    "cancelled"
                  ]
                },
                "requested_by": {
                  "type": "string",
                  "enum": [
                    "member",
                    "agent",
                    "staff",
                    "rule"
                  ]
                },
                "price_cents": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "billable": {
                  "anyOf": [
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "destination": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 100
                        },
                        "company": {
                          "default": null,
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 100
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "line1": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "line2": {
                          "default": null,
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 120
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "city": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80
                        },
                        "state": {
                          "type": "string",
                          "pattern": "^[A-Z]{2}$"
                        },
                        "postal_code": {
                          "type": "string",
                          "pattern": "^\\d{5}(-\\d{4})?$"
                        },
                        "country": {
                          "default": "US",
                          "type": "string",
                          "const": "US"
                        }
                      },
                      "required": [
                        "name",
                        "line1",
                        "city",
                        "state",
                        "postal_code"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "mail_class": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "first_class",
                        "priority",
                        "certified",
                        "certified_return_receipt",
                        "fedex_ground",
                        "fedex_express",
                        "fedex_2day",
                        "fedex_overnight"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "tracking_number": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "failure_reason": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "damaged",
                        "wrong_renter",
                        "missing",
                        "other"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "evidence_page_ids": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  }
                },
                "version": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "approved_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "started_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "completed_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "type",
                "state",
                "requested_by",
                "price_cents",
                "billable",
                "destination",
                "mail_class",
                "tracking_number",
                "failure_reason",
                "evidence_page_ids",
                "version",
                "created_at",
                "approved_at",
                "started_at",
                "completed_at"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ]
        },
        "pages": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "kind": {
                "type": "string",
                "enum": [
                  "exterior",
                  "interior",
                  "evidence"
                ]
              },
              "page_number": {
                "type": "integer",
                "minimum": 1,
                "maximum": 100
              },
              "sha256": {
                "type": "string",
                "pattern": "^[0-9a-f]{64}$"
              },
              "ocr_status": {
                "type": "string",
                "enum": [
                  "none",
                  "queued",
                  "processing",
                  "ready",
                  "needs_review",
                  "failed"
                ]
              },
              "text": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "is_blank": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "uncertain_spans": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "start": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "end": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "start",
                    "end"
                  ],
                  "additionalProperties": false
                }
              },
              "url": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uri"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "url_expires_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "content_trust": {
                "type": "string",
                "const": "untrusted_document"
              }
            },
            "required": [
              "id",
              "kind",
              "page_number",
              "sha256",
              "ocr_status",
              "text",
              "is_blank",
              "uncertain_spans",
              "url",
              "url_expires_at",
              "content_trust"
            ],
            "additionalProperties": false
          }
        },
        "actions": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "type": {
                "type": "string",
                "enum": [
                  "scan",
                  "forward",
                  "discard"
                ]
              },
              "state": {
                "type": "string",
                "enum": [
                  "proposed",
                  "approved",
                  "in_progress",
                  "done",
                  "rejected",
                  "failed",
                  "cancelled"
                ]
              },
              "requested_by": {
                "type": "string",
                "enum": [
                  "member",
                  "agent",
                  "staff",
                  "rule"
                ]
              },
              "price_cents": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "billable": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "destination": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 100
                      },
                      "company": {
                        "default": null,
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 100
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "line1": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120
                      },
                      "line2": {
                        "default": null,
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 120
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "city": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 80
                      },
                      "state": {
                        "type": "string",
                        "pattern": "^[A-Z]{2}$"
                      },
                      "postal_code": {
                        "type": "string",
                        "pattern": "^\\d{5}(-\\d{4})?$"
                      },
                      "country": {
                        "default": "US",
                        "type": "string",
                        "const": "US"
                      }
                    },
                    "required": [
                      "name",
                      "line1",
                      "city",
                      "state",
                      "postal_code"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "mail_class": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "first_class",
                      "priority",
                      "certified",
                      "certified_return_receipt",
                      "fedex_ground",
                      "fedex_express",
                      "fedex_2day",
                      "fedex_overnight"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "tracking_number": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "failure_reason": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "damaged",
                      "wrong_renter",
                      "missing",
                      "other"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "evidence_page_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                }
              },
              "version": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "approved_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "started_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "completed_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "type",
              "state",
              "requested_by",
              "price_cents",
              "billable",
              "destination",
              "mail_class",
              "tracking_number",
              "failure_reason",
              "evidence_page_ids",
              "version",
              "created_at",
              "approved_at",
              "started_at",
              "completed_at"
            ],
            "additionalProperties": false
          }
        },
        "quotes": {
          "type": "object",
          "properties": {
            "scan": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "cost_cents": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "billable": {
                      "type": "boolean"
                    },
                    "max_cents": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "included": {
                      "type": "boolean"
                    },
                    "settlement": {
                      "type": "string",
                      "enum": [
                        "next_invoice",
                        "charge_now",
                        "waived"
                      ]
                    },
                    "billing_mode": {
                      "type": "string",
                      "enum": [
                        "off",
                        "live",
                        "exempt",
                        "sample"
                      ]
                    },
                    "live_cost_cents": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "allowance": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "used": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "included": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "period_end": {
                              "type": "string",
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                            }
                          },
                          "required": [
                            "used",
                            "included",
                            "period_end"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "period_end": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "pages": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "included": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "extra_page_cents": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "included",
                            "extra_page_cents"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "fingerprint": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "cost_cents",
                    "billable",
                    "max_cents",
                    "included",
                    "settlement",
                    "billing_mode",
                    "live_cost_cents",
                    "allowance",
                    "period_end",
                    "pages",
                    "fingerprint"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "forward": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "cost_cents": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "billable": {
                      "type": "boolean"
                    },
                    "max_cents": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "included": {
                      "type": "boolean"
                    },
                    "settlement": {
                      "type": "string",
                      "enum": [
                        "next_invoice",
                        "charge_now",
                        "waived"
                      ]
                    },
                    "billing_mode": {
                      "type": "string",
                      "enum": [
                        "off",
                        "live",
                        "exempt",
                        "sample"
                      ]
                    },
                    "live_cost_cents": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "allowance": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "used": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "included": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "period_end": {
                              "type": "string",
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                            }
                          },
                          "required": [
                            "used",
                            "included",
                            "period_end"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "period_end": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    "pages": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "included": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "extra_page_cents": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "included",
                            "extra_page_cents"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "fingerprint": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "cost_cents",
                    "billable",
                    "max_cents",
                    "included",
                    "settlement",
                    "billing_mode",
                    "live_cost_cents",
                    "allowance",
                    "period_end",
                    "pages",
                    "fingerprint"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "scan",
            "forward"
          ],
          "additionalProperties": false
        },
        "forward_defaults": {
          "type": "object",
          "properties": {
            "destination": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100
                    },
                    "company": {
                      "default": null,
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 100
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "line1": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 120
                    },
                    "line2": {
                      "default": null,
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 120
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "city": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "state": {
                      "type": "string",
                      "pattern": "^[A-Z]{2}$"
                    },
                    "postal_code": {
                      "type": "string",
                      "pattern": "^\\d{5}(-\\d{4})?$"
                    },
                    "country": {
                      "default": "US",
                      "type": "string",
                      "const": "US"
                    }
                  },
                  "required": [
                    "name",
                    "line1",
                    "city",
                    "state",
                    "postal_code"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "weight_oz": {
              "type": "number",
              "minimum": 0
            },
            "on_file": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "company": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 100
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "line1": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "line2": {
                    "default": null,
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 120
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "city": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "state": {
                    "type": "string",
                    "pattern": "^[A-Z]{2}$"
                  },
                  "postal_code": {
                    "type": "string",
                    "pattern": "^\\d{5}(-\\d{4})?$"
                  },
                  "country": {
                    "default": "US",
                    "type": "string",
                    "const": "US"
                  }
                },
                "required": [
                  "name",
                  "line1",
                  "city",
                  "state",
                  "postal_code"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "destination",
            "weight_oz"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "id",
        "reference",
        "kind",
        "status",
        "sample",
        "environment",
        "sender",
        "received_at",
        "version",
        "mailbox",
        "agent",
        "exterior",
        "open_action",
        "pages",
        "actions",
        "quotes"
      ],
      "additionalProperties": false
    },
    "access": {
      "type": "object",
      "properties": {
        "read_only": {
          "type": "boolean"
        },
        "reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "read_only",
        "reason"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "item",
    "access"
  ],
  "additionalProperties": false
}