{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/namirial/json-schema/namirial-draft-send-response-schema.json",
  "title": "DraftSendResponse",
  "description": "The response model after sending a draft successfully. Either information about the envelope or bulk envelope is provided.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/namirial-draft-api-openapi.yml#/components/schemas/DraftSendResponse",
  "type": "object",
  "properties": {
    "Envelope": {
      "$ref": "#/$defs/EnvelopeSendResponse",
      "description": "The information about the sent envelope. Populated, when the draft did not contain a bulk action."
    },
    "EnvelopeBulk": {
      "$ref": "#/$defs/EnvelopeBulkSendResponse",
      "description": "The information about the sent bulk envelope. Populated, when the draft contained a bulk action."
    }
  },
  "$defs": {
    "EnvelopeBulkSendChild": {
      "description": "The information about the BulkChild envelope.",
      "type": "object",
      "properties": {
        "EnvelopeId": {
          "description": "The identifier of the BulkChild envelope.",
          "type": "string"
        },
        "BulkRecipientEmail": {
          "description": "The email of the bulk recipient in the BulkChild envelope.",
          "type": "string"
        }
      }
    },
    "EnvelopeBulkSendResponse": {
      "description": "The response model after sending a bulk envelope successfully.",
      "type": "object",
      "properties": {
        "EnvelopeBulkChildren": {
          "description": "The information about the created BulkChild envelopes.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/EnvelopeBulkSendChild"
          }
        },
        "EnvelopeBulkParentId": {
          "description": "The identifier of the BulkParent envelope.",
          "type": "string"
        }
      }
    },
    "EnvelopeSendResponse": {
      "description": "The response model after sending an envelope successfully.",
      "type": "object",
      "properties": {
        "EnvelopeId": {
          "description": "The identifier of the envelope.",
          "type": "string"
        }
      }
    }
  }
}