{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/bynn-com/json-schema/bynn-com-post-documents-schema.json",
  "title": "postDocuments",
  "description": "Create a submission",
  "x-generated": "2026-11-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/bynn-com-openapi.json#/components/schemas/postDocuments",
  "type": "object",
  "properties": {
    "reference_id": {
      "type": "string",
      "description": "User-defined ID for the analyzed file, typically corresponding to the internal document ID used in your CMS or system. Please make sure the reference_id does not contain any personally identifiable information (PII) before submission. This identifier is used to reference and index the output from the document forensic analysis."
    },
    "configuration": {
      "type": "string",
      "description": ""
    },
    "document_base64_strict": {
      "type": "string",
      "description": "Base64 Strict Encoded media (jpg, jpeg, png, pdf) - Use [file]  or [document_base64_strict] to send the document."
    },
    "file": {
      "type": "string",
      "format": "binary",
      "description": "File media sent as form-data (jpg, jpeg, png, pdf) - Use [file]  or [document_base64_strict] to send the document."
    },
    "characteristics": {
      "type": "object",
      "description": "Optional customer information and metadata",
      "properties": {
        "document": {
          "type": "object",
          "description": "Document characteristics",
          "properties": {
            "submission_time": {
              "type": "string",
              "description": "Document submission time"
            },
            "customer_tenant_id": {
              "type": "string",
              "description": "Customer-assigned identifier of tenant"
            },
            "customer_case_id": {
              "type": "string",
              "description": "Customer-assigned identifier of the case"
            },
            "document_type_string": {
              "type": "string",
              "description": "Unconstrained value for type of document"
            },
            "issuing_country_code": {
              "type": "string",
              "description": "ISO 3166-1 alpha-3 code of the country"
            },
            "document_id": {
              "type": "string",
              "description": "Document ID assigned by customer"
            },
            "document_filename": {
              "type": "string",
              "description": "Document filename"
            },
            "document_score": {
              "type": "string",
              "description": "Internal document score or classification"
            },
            "status": {
              "type": "string",
              "description": "Document submission status"
            },
            "document_position_on_image": {
              "type": "object",
              "description": "Position of document on image"
            },
            "source_channel": {
              "type": "string",
              "description": "Channel that the document originated from",
              "enum": [
                "api",
                "web",
                "mobile"
              ]
            },
            "document_side": {
              "type": "string",
              "description": "Side of the document",
              "enum": [
                "front",
                "back"
              ]
            }
          }
        },
        "device": {
          "type": "object",
          "description": "Device characteristics",
          "properties": {
            "device_ip_address": {
              "type": "string",
              "description": "Public IP address of device"
            },
            "server_ip_address": {
              "type": "string",
              "description": "IP address of the server"
            },
            "country_code": {
              "type": "string",
              "description": "ISO 3166-1 alpha-3 code"
            },
            "country_name": {
              "type": "string",
              "description": "Country name"
            },
            "city": {
              "type": "string",
              "description": "City"
            },
            "postal_code": {
              "type": "string",
              "description": "Postal code"
            },
            "gcs_latitude": {
              "type": "string",
              "description": "Latitude in decimal degrees"
            },
            "gcs_longitude": {
              "type": "string",
              "description": "Longitude in decimal degrees"
            },
            "isp": {
              "type": "string",
              "description": "Internet service provider"
            },
            "referer": {
              "type": "string",
              "description": "Browser referer url"
            },
            "user_agent": {
              "type": "string",
              "description": "User agent of the browser"
            },
            "browser_description": {
              "type": "string",
              "description": "Browser description"
            },
            "device_platform": {
              "type": "string",
              "description": "Device platform"
            },
            "device_language": {
              "type": "string",
              "description": "Device language (ISO 639-1)"
            },
            "screen_height": {
              "type": "integer",
              "format": "int32",
              "description": "Screen height in pixels"
            },
            "screen_width": {
              "type": "integer",
              "format": "int32",
              "description": "Screen width in pixels"
            },
            "device_fingerprint": {
              "type": "string",
              "description": "Unique identifier of the device"
            }
          }
        },
        "identity": {
          "type": "object",
          "description": "User identity characteristics",
          "properties": {
            "first_name": {
              "type": "string",
              "description": "First name"
            },
            "last_name": {
              "type": "string",
              "description": "Last name"
            },
            "email": {
              "type": "string",
              "description": "Email address"
            },
            "user_id": {
              "type": "string",
              "description": "User ID assigned by customer"
            },
            "user_group_id": {
              "type": "string",
              "description": "User grouping ID"
            },
            "phone_number": {
              "type": "string",
              "description": "Phone number"
            },
            "date_of_birth": {
              "type": "string",
              "description": "Date of birth (YYYY-MM-DD)"
            }
          }
        },
        "transaction": {
          "type": "object",
          "description": "Transaction characteristics",
          "properties": {
            "amount_usd": {
              "type": "number",
              "format": "float",
              "description": "Amount converted to USD"
            },
            "maturity_days": {
              "type": "integer",
              "format": "int32",
              "description": "Number of days until maturity"
            }
          }
        },
        "email": {
          "type": "object",
          "description": "Email interaction characteristics",
          "properties": {
            "originator_address_hashes": {
              "type": "array",
              "description": "SHA256 hashes of originator email addresses",
              "items": {
                "type": "string"
              }
            },
            "originator_domain_hashes": {
              "type": "array",
              "description": "SHA256 hashes of originator domains",
              "items": {
                "type": "string"
              }
            },
            "subject_hash": {
              "type": "string",
              "description": "SHA256 hash of email subject"
            },
            "number_of_recipients": {
              "type": "integer",
              "format": "int32",
              "description": "Number of email recipients"
            },
            "recipient_hashes": {
              "type": "array",
              "description": "Hashes of email recipients",
              "items": {
                "type": "string"
              }
            },
            "body_embedding": {
              "type": "string",
              "description": "Embedding of email body"
            },
            "subject_embedding": {
              "type": "string",
              "description": "Embedding of email subject"
            }
          }
        },
        "claims": {
          "type": "object",
          "description": "Insurance claims characteristics",
          "properties": {
            "claim_number": {
              "type": "string",
              "description": "Claim number"
            },
            "policy_number": {
              "type": "string",
              "description": "Policy number"
            },
            "insurance_type": {
              "type": "string",
              "description": "Insurance type"
            },
            "incident_date": {
              "type": "string",
              "description": "Incident date (YYYY-MM-DD)"
            },
            "reported_date": {
              "type": "string",
              "description": "Reported date (YYYY-MM-DD)"
            },
            "incident_description": {
              "type": "string",
              "description": "Incident description"
            },
            "incident_location": {
              "type": "string",
              "description": "Incident location"
            },
            "claim_value": {
              "type": "number",
              "format": "float",
              "description": "Claim value"
            }
          }
        }
      }
    }
  }
}