{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/swift/json-schema/swift-inter-act-message-emission-schema.json",
  "title": "InterActMessageEmission",
  "description": "InterAct Message upload",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/swift-messaging-api-openapi.yml#/components/schemas/InterActMessageEmission",
  "required": [
    "message_type",
    "payload",
    "requestor",
    "responder",
    "sender_reference",
    "service_code"
  ],
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "sender_reference": {
      "description": "The reference from the back office.",
      "maxLength": 70,
      "type": "string"
    },
    "service_code": {
      "description": "The SWIFTNet service code.",
      "maxLength": 30,
      "type": "string"
    },
    "message_type": {
      "description": "The type of the message. For an MX message, the format is: <bus. area>.<msg type>.<variant>.<version>. For example, ifds.001.001.01",
      "maxLength": 30,
      "type": "string"
    },
    "requestor": {
      "description": "The distinguished name (DN) of the sender of the message.",
      "maxLength": 100,
      "type": "string"
    },
    "responder": {
      "description": "The distinguished name (DN) of the receiver of the message.",
      "maxLength": 100,
      "type": "string"
    },
    "interface_info": {
      "$ref": "#/$defs/InterActMessageInterfaceInfoEmission"
    },
    "network_info": {
      "$ref": "#/$defs/InterActMessageNetworkInfoEmission"
    },
    "security_info": {
      "$ref": "#/$defs/InterActMessageSecurityInfoEmission"
    },
    "format": {
      "description": "The message format: \n- For an MX message: MX\n- For any InterAct message in an XML format not included in a deployment package installed on Alliance Cloud: ANY_XML",
      "type": "string",
      "enum": [
        "MX",
        "ANY_XML"
      ]
    },
    "payload": {
      "description": "The business message contents. As this is an InterAct message, this usually contains the Application Header (if present) and the Business Document.\nThat business contents must be wrapped within an 'envelope' top-level XML element so that it forms a valid XML document.\nExample (before being Base64-encoded for API sending):\n```\n   <envelope:Envelope xmlns:envelope=\"urn:swift:xsd:envelope\">\n       <AppHdr xmlns=\"urn:swift:xsd:$ahV10\">\n           [Omitted for brevity]\n       </AppHdr>\n       <mx:Document xmlns:mx=\"urn:swift:xsd:acmt.004.001.06\">\n           [Omitted for brevity]\n       </mx:Document>\n   </envelope:Envelope>\n```",
      "type": "string",
      "format": "byte",
      "maxLength": 140000
    }
  },
  "$defs": {
    "InterActMessageInterfaceInfoEmission": {
      "title": "InterActMessageInterfaceInfoEmission",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "product_info": {
          "$ref": "#/$defs/ProductInfoEmission"
        }
      },
      "description": "The interface information elements for a sent InterAct message."
    },
    "InterActMessageNetworkInfoEmission": {
      "title": "InterActMessageNetworkInfoEmission",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "user_reference": {
          "description": "The Message User Reference set by the back-office application for messages processed by the BO or by the user for messages manually created or by the sender for received messages.",
          "maxLength": 30,
          "type": "string"
        },
        "network_priority": {
          "description": "The Network priority.",
          "type": [
            "string",
            "null"
          ],
          "default": "Normal",
          "enum": [
            "Normal",
            "Urgent"
          ]
        },
        "possible_duplicate": {
          "description": "If set to true, the BO indicates that the message is a PDE (Possible Duplicate Emission).",
          "type": "boolean"
        },
        "delivery_notification_requested": {
          "description": "Indicates whether a non-delivery warning and/or a positive delivery notification is requested.",
          "type": "boolean"
        },
        "non_delivery_warning_requested": {
          "description": "Indicates whether non-delivery warning time or non-delivery warning delay is set up.",
          "type": "boolean"
        },
        "non_delivery_warning_time": {
          "description": "Time and date in UTC after which the SWIFT central system has to generate an overdue warning if the message/file remains undelivered.\nIf present, non_delivery_warning_delay cannot be specified.",
          "type": "string",
          "format": "date-time"
        },
        "non_delivery_warning_delay": {
          "description": "Number of minutes after which SWIFT central system has to generate an overdue warning if the message/file remains undelivered.\nIf present, non_delivery_warning_time cannot be specified.",
          "maximum": 1440,
          "minimum": 5,
          "type": "integer",
          "format": "int32"
        },
        "copy_requested": {
          "description": "True when the SWIFTNet copy feature is optional for that service and a copy must be made. \nWhen absent, a copy is only made when the copy feature is defined as mandatory for the service.\nIf the copy service is defined as mandatory, then this value cannot be false.",
          "type": "boolean"
        },
        "copy_destinations": {
          "description": "The list of third party recipients to which the message or file must be copied in case of dynamic T- or Y-Copy.",
          "maxItems": 10,
          "type": "array",
          "items": {
            "description": "A single third party recipient DN.",
            "maxLength": 100,
            "type": "string"
          }
        },
        "copy_authorisation_notification_requested": {
          "description": "Request a positive Authorisation Notification for Y-Copy service.",
          "type": "boolean"
        },
        "recipients": {
          "description": "The list of recipients to whom the message must be distributed.",
          "maxItems": 1000,
          "type": "array",
          "items": {
            "description": "A single recipient DN",
            "maxLength": 100,
            "type": "string"
          }
        },
        "recipients_public": {
          "description": "This element, when absent or true, indicates that the RecipientList is public and has to be forwarded to all Recipients.",
          "type": "boolean"
        },
        "request_subtype": {
          "description": "The request subtype is an optional field located in the SWIFTNet header. It identifies the usage guideline rules to be validated centrally by SWIFT.\nIt carries the usage identifier that identifies which usage guideline validation is expected to be performed by sender, receiver, and SWIFT in case central message validation (MVal) applies.\nIt complements the request type, which already carries the Business Document's message identifier.\nIt enables the support of multiple flavours of a given ISO 20022 message definition within the service.\nSWIFT allows the presence of a request subtype only when the central messagevalidation feature (MVal) is set at the level of the service.\nOtherwise, SWIFT rejects the message.\nThe maximmum length is 35 lower-case alphanumeric characters (a to z and 0 to 9).\nThis maximum length  includes the periods [.] that must be used to separate the segments, for example 'swift.cbprplus.01'.\nIt must not contain $ (Dollar sign, ASCII 36, 0x24), : (Colon, ASCII 58, 0x3A), %, and _ characters.",
          "maxLength": 35,
          "type": "string"
        },
        "request_type": {
          "description": "Contains the request type of the message. If the request type is not present, then for AnyXML messages, the request type is assumed to be the same as the message identifier. \nFor MX messages, it corresponds to the namespace URI of the XML document in the body of the message.",
          "maxLength": 30,
          "type": "string"
        },
        "end_to_end_sender_info": {
          "maxLength": 256,
          "type": "string",
          "description": "This field provides additional information regarding the exchanged messages between the Requestor and the Responder."
        }
      },
      "description": "The network information elements for an InterAct message sent to Alliance Cloud."
    },
    "InterActMessageSecurityInfoEmission": {
      "title": "InterActSecurityInfoEmission",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "signing_requested": {
          "description": "Indicates whether signing of the message is requested upon emission.",
          "type": "boolean"
        },
        "non_repudiation_requested": {
          "description": "Indicates whether non-repudiation is requested.",
          "type": "boolean"
        },
        "digest_list": {
          "description": "A list of digest information.",
          "maxItems": 8,
          "type": "array",
          "items": {
            "$ref": "#/$defs/SwiftNetSecurityDigestEmission"
          }
        }
      },
      "description": "The security information elements for an InterAct message sent to Alliance Cloud."
    },
    "ProductEmission": {
      "title": "ProductEmission",
      "required": [
        "product_name",
        "vendor_name",
        "version"
      ],
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "vendor_name": {
          "description": "Name of the vendor of the product application.",
          "maxLength": 8,
          "type": "string"
        },
        "product_name": {
          "description": "Name of the product application.",
          "maxLength": 8,
          "type": "string"
        },
        "version": {
          "description": "Version of the product application.",
          "maxLength": 8,
          "type": "string"
        }
      },
      "description": "Single information about a product that processed the sent message."
    },
    "ProductInfoEmission": {
      "title": "ProductInfoEmission",
      "maxItems": 3,
      "type": "array",
      "items": {
        "$ref": "#/$defs/ProductEmission"
      },
      "description": "Information about products (back-office, interface...) that processed the sent message."
    },
    "SwiftNetSecurityDigestEmission": {
      "description": "Combination of a reference to data subject to a digest and the digest value for that data",
      "title": "SwiftNetSecurityDigestEmission",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "digest_reference": {
          "description": "Reference identifying the data subject to a digest. Used for MX and File messages.",
          "maxLength": 128,
          "type": "string"
        },
        "digest_value": {
          "description": "Value of the digest for the data identified by the reference.",
          "maxLength": 50,
          "type": "string"
        }
      }
    }
  }
}