{
  "openapi": "3.0.3",
  "info": {
    "title": "Namirial Notify APIs",
    "version": "1.0",
    "description": "Unified OpenAPI reference for the Namirial Notify service APIs. This specification aggregates EviNotice, EviMail, EviSMS, EviPost, and shared affidavit and attachment download endpoints. EviNotice, EviMail, and EviSMS each group their single-message and batch operations together. In the public Namirial Notify API environments, single-message operations for EviMail, EviSMS, and EviPost use the `/v1` base path. EviMail and EviSMS batch operations use `/v2/EviMail/Batches` and `/v2/EviSms/Batches`, respectively. Some lower-level technical artifacts may show those V1 routes without the prefix. For customer integrations, use the public paths shown in this specification. For the public Namirial Notify API environments, EviNotice routes use the `/v2` base path. The legacy `/api/v2/...` form is still accepted for backward compatibility.\n"
  },
  "servers": [
    {
      "url": "https://api.evicertia.com",
      "description": "Production"
    },
    {
      "url": "https://api.ecertia.com",
      "description": "Pre-production / QA"
    }
  ],
  "tags": [
    {
      "name": "EviNotice",
      "description": "Certified hosted notices with hosted content, attachments, affidavits, and batch delivery via v2."
    },
    {
      "name": "EviMail",
      "description": "Certified email submission, status tracking, and on-demand affidavits via v1, plus batch delivery, recipients, and attachments via v2."
    },
    {
      "name": "EviSMS",
      "description": "Certified SMS and RCS submission, status tracking, and evidence retrieval via v1, plus SMS batch delivery and recipients via v2."
    },
    {
      "name": "EviPost",
      "description": "Certified physical postal delivery with status tracking and on-demand affidavits."
    },
    {
      "name": "Shared Downloads",
      "description": "Shared affidavit and attachment download endpoints."
    }
  ],
  "x-tagGroups": [
    {
      "name": "Service operations",
      "tags": [
        "EviNotice",
        "EviMail",
        "EviSMS",
        "EviPost",
        "Shared Downloads"
      ]
    }
  ],
  "paths": {
    "/v2/EviNotice/Submit": {
      "post": {
        "tags": [
          "EviNotice"
        ],
        "summary": "Submit a new EviNotice",
        "operationId": "eviNoticeSubmit",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "X-Evi-IdempotencyToken",
            "in": "header",
            "required": false,
            "description": "Optional idempotency token (UUID recommended) to prevent duplicate submissions on retry. A replay of a cached `200 OK` submission returns `202 Accepted`. Responses `400`, `401`, `408`, `409`, `429`, and `5xx` are not cached for replay.\n",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EviNoticeSubmitRequest"
              },
              "examples": {
                "standardSimple": {
                  "summary": "Standard certification, email delivery, minimal options",
                  "value": {
                    "Subject": "Subject of the certified communication",
                    "Body": "We inform you that today is a very interesting day.<br>Best Regards,",
                    "LookupKey": "05",
                    "TimeToLive": 10080,
                    "RecipientAddress": "recipient@example.com",
                    "RecipientDisplayName": "Jane Doe",
                    "RecipientLegalName": "Acme Corp",
                    "CertificationLevel": "Standard_EU",
                    "IssuerLegalName": "Sender Co.",
                    "EvidenceAccessControlMethod": "Public",
                    "DeliverySignMethod": "WebClick",
                    "CommitmentChoice": "Disabled",
                    "Language": "en",
                    "AffidavitLanguage": "en",
                    "NotificationLayout": "Certified"
                  }
                },
                "advancedComplete": {
                  "summary": "Advanced certification with MobilePin, commitment, attachments, reminders",
                  "value": {
                    "Subject": "Contract review required",
                    "Body": "<p>Please review and accept the attached contract.</p>",
                    "LookupKey": "CONTRACT-001",
                    "TimeToLive": 10080,
                    "RecipientAddress": "recipient@example.com",
                    "RecipientDisplayName": "Jane Doe",
                    "RecipientLegalName": "Acme Corp",
                    "CertificationLevel": "Advanced_EU",
                    "IssuerLegalName": "Sender Co.",
                    "Attachments": [
                      {
                        "Data": "JVBERi0xLjQgZXhhbXBsZQ==",
                        "Filename": "contract.pdf",
                        "DisplayName": "Contract 2026",
                        "MimeType": "application/pdf",
                        "IncludeOnAffidavits": true
                      }
                    ],
                    "AffidavitKinds": [
                      "SubmittedAdvanced",
                      "TransmissionResult",
                      "DeliveryResult",
                      "Received",
                      "Read",
                      "CommittedAdvanced",
                      "Refused",
                      "Event",
                      "Complete",
                      "Failed"
                    ],
                    "EvidenceAccessControlMethod": "AutoChallenge",
                    "DeliverySignMethod": "MobilePin",
                    "DeliverySignFixedMobile": "+34600000000",
                    "MobilePinChannels": [
                      [
                        "Sms",
                        "Rcs",
                        "WhatsApp"
                      ],
                      [
                        "Sms",
                        "Rcs",
                        "WhatsApp"
                      ],
                      [
                        "Sms",
                        "Rcs",
                        "WhatsApp"
                      ]
                    ],
                    "CommitmentChoice": "AcceptOrReject",
                    "CommitmentCommentsAllowed": true,
                    "RejectReasons": [
                      "I do not agree with the terms",
                      "The information is incorrect"
                    ],
                    "RequireRejectReason": false,
                    "AcceptReasons": [
                      "I accept the terms",
                      "I confirm the information"
                    ],
                    "RequireAcceptReason": false,
                    "PushNotificationFilter": [
                      "Processed",
                      "Sent",
                      "Dispatched",
                      "Delivered",
                      "Read",
                      "Replied"
                    ],
                    "PushNotificationUrl": "https://your-system.example.com/callbacks/notify",
                    "Language": "en",
                    "AffidavitLanguage": "en",
                    "NotificationLayout": "Certified",
                    "Reminders": {
                      "Initial": "P2D",
                      "Repeat": "P1D",
                      "Days": [
                        "Monday",
                        "Tuesday",
                        "Wednesday",
                        "Thursday",
                        "Friday"
                      ],
                      "TimeRange": [
                        "FROM08TO10",
                        "FROM10TO12",
                        "FROM12TO15",
                        "FROM15TO19"
                      ],
                      "Max": 5,
                      "Stop": "P15D",
                      "TimeZone": "Etc/GMT-1"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "EviNotice accepted",
            "headers": {
              "X-Evi-IdempotencyStatus": {
                "description": "Idempotency outcome for the submission request.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "New"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EviNoticeSubmitResponse"
                },
                "example": {
                  "Id": "550e8400-e29b-41d4-a716-446655440000"
                }
              }
            }
          },
          "202": {
            "description": "Idempotent replay. The same X-Evi-IdempotencyToken was used for a cached 200 OK submission. The original response body is returned; the notice is not resubmitted.",
            "headers": {
              "X-Evi-IdempotencyStatus": {
                "description": "Idempotency outcome for the submission request.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "Replay"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EviNoticeSubmitResponse"
                },
                "example": {
                  "Id": "550e8400-e29b-41d4-a716-446655440000"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/EviNoticeProblem"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed"
          },
          "403": {
            "description": "The authenticated account lacks the required API permission for EviNotice, or the account has insufficient credit balance to submit the notice."
          },
          "409": {
            "description": "Another Submit with the same X-Evi-IdempotencyToken is currently in flight.",
            "headers": {
              "X-Evi-IdempotencyStatus": {
                "description": "Idempotency outcome for the submission request.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "Conflict"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v2/EviNotice/{Id}": {
      "get": {
        "tags": [
          "EviNotice"
        ],
        "summary": "Get a single EviNotice",
        "operationId": "eviNoticeGet",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "Id",
            "in": "path",
            "required": true,
            "description": "The UUID of the EviNotice returned at submission.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "IncludeAffidavits",
            "in": "query",
            "description": "Include affidavit metadata in the response.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "IncludeAttachments",
            "in": "query",
            "description": "Include attachment metadata in the response.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "EviNotice retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EviNoticeGetResponse"
                },
                "example": {
                  "Id": "550e8400-e29b-41d4-a716-446655440000",
                  "Subject": "Contract review required",
                  "LookupKey": "CONTRACT-001",
                  "Issuer": "Sender Co.",
                  "IssuerEmail": "sender@example.com",
                  "RecipientAddress": "recipient@example.com",
                  "RecipientDisplayName": "Jane Doe",
                  "RecipientLegalName": "Acme Corp",
                  "State": "Read",
                  "Outcome": "None",
                  "CreationDate": "2026-01-15T09:00:00Z",
                  "LastUpdateDate": "2026-01-16T11:23:00Z",
                  "SubmittedOn": "2026-01-15T09:00:01Z",
                  "ProcessedOn": "2026-01-15T09:00:03Z",
                  "SentOn": "2026-01-15T09:00:10Z",
                  "DispatchedOn": "2026-01-15T09:00:03Z",
                  "DeliveredOn": "2026-01-15T09:15:00Z",
                  "ReceivedOn": "2026-01-16T11:20:00Z",
                  "ReadOn": "2026-01-16T11:23:00Z",
                  "TimeToLive": 10080,
                  "AllowRefusal": false,
                  "NotaryRetention": false,
                  "OnlineRetentionPeriod": 1,
                  "SourceChannel": "Api",
                  "AffidavitKinds": [
                    "TransmissionResult",
                    "DeliveryResult",
                    "Read"
                  ],
                  "SiteName": "acme-corp",
                  "XmissionResult": true,
                  "XmissionSummary": "250 OK"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "401": {
            "description": "Authentication failed"
          },
          "404": {
            "description": "EviNotice not found"
          }
        }
      }
    },
    "/v2/EviNotice/Query": {
      "post": {
        "tags": [
          "EviNotice"
        ],
        "summary": "Query multiple EviNotices",
        "operationId": "eviNoticeQuery",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EviNoticeQueryRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Query executed successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EviNoticeQueryResponse"
                },
                "example": {
                  "Cursor": "AQAAAADFDwwAAAAAABVOhADim0HUo3Jm+wAAAAAAAAA=",
                  "Results": [
                    {
                      "Id": "550e8400-e29b-41d4-a716-446655440000",
                      "Subject": "Contract review required",
                      "LookupKey": "CONTRACT-001",
                      "Issuer": "Sender Co.",
                      "IssuerEmail": "sender@example.com",
                      "RecipientAddress": "recipient@example.com",
                      "RecipientDisplayName": "Jane Doe",
                      "State": "Read",
                      "Outcome": "None",
                      "CreationDate": "2026-01-15T09:00:00Z",
                      "SubmittedOn": "2026-01-15T09:00:01Z",
                      "ReadOn": "2026-01-16T11:23:00Z",
                      "TimeToLive": 10080,
                      "AffidavitKinds": [
                        "TransmissionResult",
                        "DeliveryResult",
                        "Read"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed"
          }
        }
      }
    },
    "/v2/EviNotice/{Id}/Attachments": {
      "get": {
        "tags": [
          "EviNotice"
        ],
        "summary": "Download all attachments of an EviNotice",
        "operationId": "eviNoticeAttachmentsDownload",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "Id",
            "in": "path",
            "required": true,
            "description": "The UUID of the EviNotice.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "ZIP file containing all attachments.",
            "content": {
              "application/zip": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "204": {
            "description": "No attachments available for this EviNotice."
          },
          "401": {
            "description": "Authentication failed"
          },
          "404": {
            "description": "EviNotice not found."
          }
        }
      }
    },
    "/v2/EviNotice/{Id}/Affidavits": {
      "get": {
        "tags": [
          "EviNotice"
        ],
        "summary": "Download all affidavits of an EviNotice",
        "operationId": "eviNoticeAffidavitsDownload",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "Id",
            "in": "path",
            "required": true,
            "description": "The UUID of the EviNotice.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "ZIP file containing all affidavits.",
            "content": {
              "application/zip": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "204": {
            "description": "No affidavits have been generated yet for this EviNotice."
          },
          "401": {
            "description": "Authentication failed"
          },
          "404": {
            "description": "EviNotice not found."
          }
        }
      }
    },
    "/v2/EviNotice/Affidavits/{Id}": {
      "get": {
        "tags": [
          "EviNotice"
        ],
        "summary": "Download one EviNotice affidavit",
        "operationId": "eviNoticeAffidavitDownload",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "Id",
            "in": "path",
            "required": true,
            "description": "The UUID of the affidavit.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "PDF file containing the requested affidavit.",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed"
          },
          "404": {
            "description": "Affidavit not found."
          }
        }
      }
    },
    "/v2/EviNotice/Affidavits/Request": {
      "post": {
        "tags": [
          "EviNotice"
        ],
        "summary": "Request an on-demand affidavit",
        "operationId": "eviNoticeAffidavitRequest",
        "description": "Generates a custom affidavit for a previously submitted EviNotice. The original submit request must have included `AffidavitKinds` with the `OnDemand` value. The notice must still be eligible — not `Draft`, not `Closed`, and within the configured per-notice on-demand limit.\n",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EviNoticeAffidavitRequestBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Affidavit request accepted. Generation is asynchronous; an AffidavitPublished callback fires when the affidavit is ready.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EviNoticeAffidavitRequestResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed"
          },
          "403": {
            "description": "The per-notice on-demand affidavit limit has been reached."
          },
          "405": {
            "description": "OnDemand was not included in AffidavitKinds at submission, or the notice is in a state that does not support on-demand affidavit generation (Draft or Closed).\n"
          }
        }
      }
    },
    "/v2/EviNotice/Batches": {
      "post": {
        "tags": [
          "EviNotice"
        ],
        "summary": "Create a notice batch",
        "operationId": "eviNoticeBatchCreate",
        "description": "Creates a new, empty notice batch. Only a `Description` is required at creation; the body, recipients, attachments, and options are set with the subsequent batch endpoints. Returns the `BatchId` used by all other batch operations.\n",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EviNoticeBatchCreateRequest"
              },
              "example": {
                "Description": "March 2026 customer notices"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Batch created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EviNoticeBatchCreateResponse"
                },
                "example": {
                  "BatchId": "550e8400-e29b-41d4-a716-446655440000"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed"
          },
          "500": {
            "description": "Internal server error"
          }
        }
      },
      "get": {
        "tags": [
          "EviNotice"
        ],
        "summary": "Query notice batches (HTTP QUERY method)",
        "operationId": "eviNoticeBatchesQuery",
        "description": "Lists notice batches owned by the caller (or the caller's site), with cursor pagination.\n\n**This endpoint uses the HTTP `QUERY` method, not GET.** OpenAPI cannot express the `QUERY` method, so it is shown here as a `GET` with the filter fields as query parameters. In practice, send an HTTP `QUERY` request with the fields in a JSON body (`States`, `Cursor`, `Limit`, `SortBy`, `SortOrder`, `Direction`, `TextSearch`).\n",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "States",
            "in": "query",
            "description": "Filter by one or more batch states.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "Draft",
                  "Submitted",
                  "Scheduled",
                  "Processing",
                  "Processed",
                  "Invalid",
                  "Failed"
                ]
              }
            }
          },
          {
            "name": "Cursor",
            "in": "query",
            "description": "Opaque pagination cursor returned by the previous response.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Limit",
            "in": "query",
            "required": true,
            "description": "Maximum number of batches to return (1–100).",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "SortBy",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "None",
                "LastUpdated",
                "ScheduledFor",
                "StartedOn"
              ],
              "default": "LastUpdated"
            }
          },
          {
            "name": "SortOrder",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "None",
                "Ascending",
                "Descending"
              ],
              "default": "Ascending"
            }
          },
          {
            "name": "Direction",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "None",
                "Forward",
                "Backward"
              ],
              "default": "Forward"
            }
          },
          {
            "name": "TextSearch",
            "in": "query",
            "description": "Free-text search over batch descriptions.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Query executed successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EviNoticeBatchesQueryResponse"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request (invalid state, sort, or direction value)."
          },
          "401": {
            "description": "Authentication failed"
          }
        }
      }
    },
    "/v2/EviNotice/Batches/{BatchId}": {
      "parameters": [
        {
          "name": "BatchId",
          "in": "path",
          "required": true,
          "description": "The UUID of the batch, as returned at creation.",
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "get": {
        "tags": [
          "EviNotice"
        ],
        "summary": "Get a notice batch",
        "operationId": "eviNoticeBatchGet",
        "description": "Retrieves the full state of a batch, including its configured notice template and processing progress.",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Batch retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EviNoticeBatchGetResponse"
                }
              }
            }
          },
          "400": {
            "description": "BatchId is missing or a default (empty) UUID."
          },
          "401": {
            "description": "Authentication failed"
          },
          "404": {
            "description": "No batch with the given BatchId was found."
          }
        }
      },
      "patch": {
        "tags": [
          "EviNotice"
        ],
        "summary": "Update a notice batch",
        "operationId": "eviNoticeBatchPatch",
        "description": "Updates batch metadata and the notice template options. All fields are optional; only the fields supplied are changed. Setting `State` transitions the batch (for example, to start processing or schedule it). Setting `ScheduledDate` schedules the batch for later dispatch. Batch scheduling uses UTC. Specify `ScheduledDate` in UTC.\n",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EviNoticeBatchPatchRequest"
              },
              "example": {
                "Subject": "Important notice regarding your account",
                "IssuerName": "Sender Co.",
                "CertificationLevel": "Advanced_EU",
                "Language": "en",
                "State": "Submitted"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Batch updated."
          },
          "400": {
            "description": "Invalid request."
          },
          "401": {
            "description": "Authentication failed"
          },
          "404": {
            "description": "No batch with the given BatchId was found."
          }
        }
      },
      "delete": {
        "tags": [
          "EviNotice"
        ],
        "summary": "Delete a notice batch",
        "operationId": "eviNoticeBatchDelete",
        "description": "Removes a previously created batch.",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Batch deleted."
          },
          "400": {
            "description": "Invalid request."
          },
          "401": {
            "description": "Authentication failed"
          },
          "404": {
            "description": "No batch with the given BatchId was found."
          }
        }
      }
    },
    "/v2/EviNotice/Batches/{BatchId}/Body": {
      "parameters": [
        {
          "name": "BatchId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "put": {
        "tags": [
          "EviNotice"
        ],
        "summary": "Set the batch body",
        "operationId": "eviNoticeBatchBodyPut",
        "description": "Sets the HTML body of the notice for this batch. The body is sent as the raw request payload (HTML), not as a JSON field. Use `PATCH .../{BatchId}` to set the `Subject`.\n",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "text/html": {
              "schema": {
                "type": "string"
              },
              "example": "<p>We inform you that today is a very interesting day.</p>"
            }
          }
        },
        "responses": {
          "202": {
            "description": "Body accepted and queued for update. Poll GET .../{BatchId} to check status."
          },
          "400": {
            "description": "The request has no valid body."
          },
          "401": {
            "description": "Authentication failed"
          },
          "404": {
            "description": "No batch with the given BatchId was found."
          }
        }
      }
    },
    "/v2/EviNotice/Batches/{BatchId}/Recipients": {
      "parameters": [
        {
          "name": "BatchId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "post": {
        "tags": [
          "EviNotice"
        ],
        "summary": "Add batch recipients (CSV)",
        "operationId": "eviNoticeBatchRecipientsPost",
        "description": "Adds recipients to the batch by uploading a `text/csv` file. The CSV uses `;` as the column separator. Mandatory columns: `address`, `legalname`. Optional columns: `lookupkey`, `displayname`, `custodychallenge`, `custodychallengeresponse`, `deliverychallenge`, `deliverychallengeresponse`, `deliveryotpchannel`, `deliveryotpaddress`. Custom per-recipient fields are added as extra columns prefixed with `*` (for example, `*orderid`).\n",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "text/csv": {
              "schema": {
                "type": "string"
              },
              "example": "address;legalname;displayname;*orderid\njane@example.com;Acme Corp;Jane Doe;ORD-001\njohn@example.com;Beta Ltd;John Roe;ORD-002\n"
            }
          }
        },
        "responses": {
          "200": {
            "description": "Recipients accepted. No response body is returned."
          },
          "400": {
            "description": "The recipient payload is empty or the Content-Type is not `text/csv`."
          },
          "401": {
            "description": "Authentication failed"
          },
          "404": {
            "description": "No batch with the given BatchId was found."
          },
          "409": {
            "description": "The recipient list failed validation (for example, missing mandatory columns)."
          }
        }
      },
      "get": {
        "tags": [
          "EviNotice"
        ],
        "summary": "Query batch recipients (HTTP QUERY method)",
        "operationId": "eviNoticeBatchRecipientsQuery",
        "description": "Lists the recipients of a batch, with cursor pagination.\n\n**This endpoint uses the HTTP `QUERY` method, not GET.** OpenAPI cannot express the `QUERY` method, so it is shown here as a `GET` with the filter fields as query parameters. In practice, send an HTTP `QUERY` request with the fields (`Cursor`, `Limit`, `SortDirection`) in a JSON body.\n",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "Cursor",
            "in": "query",
            "description": "Opaque pagination cursor returned by the previous response.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Limit",
            "in": "query",
            "description": "Maximum number of recipients to return (1–1000).",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            }
          },
          {
            "name": "SortDirection",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "None",
                "Ascending",
                "Descending"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Query executed successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EviNoticeBatchRecipientsQueryResponse"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request."
          },
          "401": {
            "description": "Authentication failed"
          },
          "404": {
            "description": "No batch with the given BatchId was found."
          }
        }
      },
      "delete": {
        "tags": [
          "EviNotice"
        ],
        "summary": "Delete all batch recipients",
        "operationId": "eviNoticeBatchRecipientsDelete",
        "description": "Removes all recipients from the batch.",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Recipients removed."
          },
          "401": {
            "description": "Authentication failed"
          },
          "404": {
            "description": "No batch with the given BatchId was found."
          }
        }
      }
    },
    "/v2/EviNotice/Batches/{BatchId}/Attachments": {
      "parameters": [
        {
          "name": "BatchId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "post": {
        "tags": [
          "EviNotice"
        ],
        "summary": "Add a batch attachment",
        "operationId": "eviNoticeBatchAttachmentsPost",
        "description": "Adds a single attachment to the batch by uploading it as `multipart/form-data`. The attachment is included in every notice generated from the batch.\n",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "Content": {
                    "type": "string",
                    "format": "binary",
                    "description": "The attachment file content."
                  },
                  "DisplayName": {
                    "type": "string"
                  },
                  "Filename": {
                    "type": "string"
                  },
                  "ContentId": {
                    "type": "string",
                    "description": "A Content-ID that can be referenced with `cid:` in the body HTML to embed the attachment inline."
                  },
                  "MimeType": {
                    "type": "string"
                  },
                  "ContentDescription": {
                    "type": "string"
                  },
                  "ContentDisposition": {
                    "type": "string"
                  },
                  "ContentLocation": {
                    "type": "string"
                  },
                  "ContentEncoding": {
                    "type": "string"
                  },
                  "IncludeOnAffidavits": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "Content"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Attachment added.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EviNoticeBatchAttachmentPostResponse"
                }
              }
            }
          },
          "400": {
            "description": "No file was supplied, or more than one file was supplied."
          },
          "401": {
            "description": "Authentication failed"
          },
          "404": {
            "description": "No batch with the given BatchId was found."
          }
        }
      },
      "get": {
        "tags": [
          "EviNotice"
        ],
        "summary": "List batch attachments",
        "operationId": "eviNoticeBatchAttachmentsGet",
        "description": "Returns metadata for all attachments configured on the batch.",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Attachment metadata returned.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EviNoticeBatchAttachmentInfo"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed"
          },
          "404": {
            "description": "No batch with the given BatchId was found."
          }
        }
      },
      "delete": {
        "tags": [
          "EviNotice"
        ],
        "summary": "Delete all batch attachments",
        "operationId": "eviNoticeBatchAttachmentsDelete",
        "description": "Removes all attachments from the batch.",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Attachments removed."
          },
          "401": {
            "description": "Authentication failed"
          },
          "404": {
            "description": "No batch with the given BatchId was found."
          }
        }
      }
    },
    "/v2/EviNotice/Batches/{BatchId}/Attachments/{AttachmentId}": {
      "parameters": [
        {
          "name": "BatchId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "AttachmentId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "get": {
        "tags": [
          "EviNotice"
        ],
        "summary": "Download a batch attachment",
        "operationId": "eviNoticeBatchAttachmentGet",
        "description": "Downloads the binary content of a single batch attachment.",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Attachment content.",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed"
          },
          "404": {
            "description": "No attachment or batch with the given IDs was found."
          }
        }
      },
      "delete": {
        "tags": [
          "EviNotice"
        ],
        "summary": "Delete a batch attachment",
        "operationId": "eviNoticeBatchAttachmentDelete",
        "description": "Removes a single attachment from the batch.",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Attachment removed."
          },
          "401": {
            "description": "Authentication failed"
          },
          "404": {
            "description": "No attachment or batch with the given IDs was found."
          }
        }
      }
    },
    "/v1/EviMail/Submit": {
      "post": {
        "tags": [
          "EviMail"
        ],
        "summary": "Submit a certified email",
        "operationId": "eviMailSubmit",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "X-Evi-IdempotencyToken",
            "in": "header",
            "required": false,
            "description": "Optional idempotency token (UUID recommended) to prevent duplicate submissions on retry. A replay of a cached `200 OK` submission returns `202 Accepted`. Responses `400`, `401`, `408`, `409`, `429`, and `5xx` are not cached for replay.\n",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EviMailSubmitRequest"
              },
              "examples": {
                "emailOk": {
                  "value": {
                    "Subject": "Certified email example",
                    "Body": "<p>Hello, this is a certified email.</p>",
                    "LookupKey": "MAIL-001",
                    "IssuerName": "Sender Corp.",
                    "From": "sender@example.com",
                    "ReplyTo": "reply@example.com",
                    "DisableSenderHeader": false,
                    "Recipient": {
                      "LegalName": "Recipient Corp.",
                      "EmailAddress": "recipient@example.com"
                    },
                    "CarbonCopy": [
                      {
                        "Name": "Legal Team",
                        "EmailAddress": "legal@example.com"
                      }
                    ],
                    "Attachments": [
                      {
                        "DisplayName": "Contract",
                        "Filename": "contract.pdf",
                        "MimeType": "application/pdf",
                        "Data": "base64-content",
                        "Attributes": [
                          {
                            "Key": "IncludeOnAffidavits",
                            "Value": "true"
                          }
                        ]
                      }
                    ],
                    "Options": {
                      "CertificationLevel": "Advanced_EU",
                      "TimeToLive": 1440,
                      "Language": "en",
                      "AffidavitLanguage": "en",
                      "AffidavitKinds": [
                        "Submitted",
                        "DeliveryResult",
                        "Read",
                        "Closed"
                      ],
                      "PushNotificationFilter": [
                        "Sent",
                        "Delivered",
                        "Read",
                        "Failed"
                      ],
                      "PushNotificationUrl": "https://example-callback.invalid/",
                      "EvidenceAccessControlMethod": "Public",
                      "OnlineRetentionPeriod": 1
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Email accepted",
            "headers": {
              "X-Evi-IdempotencyStatus": {
                "description": "Idempotency outcome for the submission request.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "New"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EviMailSubmitResponse"
                }
              }
            }
          },
          "202": {
            "description": "Idempotent replay. The same X-Evi-IdempotencyToken was used for a cached 200 OK submission. The original response body is returned; the message is not resubmitted.",
            "headers": {
              "X-Evi-IdempotencyStatus": {
                "description": "Idempotency outcome for the submission request.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "Replay"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EviMailSubmitResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request or business rule failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EviMailError"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed"
          },
          "403": {
            "description": "Access denied. The authenticated account lacks the required API permission, has specified a From address that is not permitted for this account, or has attempted to set a restricted request header.\n"
          },
          "409": {
            "description": "Another Submit with the same X-Evi-IdempotencyToken is currently in flight.",
            "headers": {
              "X-Evi-IdempotencyStatus": {
                "description": "Idempotency outcome for the submission request.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "Conflict"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/EviMail/Query": {
      "get": {
        "tags": [
          "EviMail"
        ],
        "summary": "Query certified emails (GET)",
        "operationId": "eviMailQueryGet",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "WithUniqueIds",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "WithLookupKeys",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "WithLinkedId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "OnState",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "Draft",
                "New",
                "Ready",
                "Sent",
                "Dispatched",
                "Delivered",
                "Read",
                "Replied",
                "Closed",
                "Failed"
              ]
            }
          },
          {
            "name": "WithOutcome",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "None",
                "Certified",
                "Sent",
                "Delivered",
                "Read",
                "Accepted",
                "Rejected",
                "Failed"
              ]
            }
          },
          {
            "name": "OrderResultsBy",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "CreationDate"
              ]
            }
          },
          {
            "name": "Limit",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "Offset",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "IncludeAffidavits",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "IncludeAffidavitBlobs",
            "in": "query",
            "deprecated": true,
            "description": "Deprecated. When true with IncludeAffidavits, includes Base64 affidavit PDFs in affidavits[].bytes and limits the query to one email. Set false for metadata-only results and use /AffidavitsDownload for new integrations.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "IncludeAttachments",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Query executed successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EviMailQueryResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed"
          }
        }
      }
    },
    "/v1/EviMail/AffidavitRequest": {
      "post": {
        "tags": [
          "EviMail"
        ],
        "summary": "Request an on-demand affidavit",
        "operationId": "eviMailAffidavitRequest",
        "description": "Generates a custom affidavit for a previously submitted EviMail. The original Submit request must have included `AffidavitKinds` containing `OnDemand`, and the communication must still be eligible for on-demand affidavits.\n",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EviMailAffidavitRequest"
              },
              "example": {
                "UniqueId": "87ffa214-e773-4bd5-9b8d-a8ef00fd80f8",
                "IncludeBody": true,
                "IncludeAttachments": true,
                "IncludeEvents": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Affidavit request accepted. Generation is asynchronous.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EviMailAffidavitResponse"
                },
                "example": {
                  "requestId": "79726a87000c1f7042aca3ea149f9438"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request or business rule failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EviMailAffidavitError"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed"
          }
        }
      }
    },
    "/v2/EviMail/Batches": {
      "servers": [
        {
          "url": "https://api.evicertia.com"
        },
        {
          "url": "https://api.ecertia.com"
        }
      ],
      "post": {
        "tags": [
          "EviMail"
        ],
        "summary": "Create an email batch",
        "operationId": "eviMailBatchCreate",
        "description": "Creates a new, empty email batch. Only a `Description` is required at creation; the body, recipients, attachments, and options are set with the subsequent batch endpoints. Returns the `BatchId` used by all other batch operations.\n",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EviMailBatchCreateRequest"
              },
              "example": {
                "Description": "March 2026 customer emails"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Batch created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EviMailBatchCreateResponse"
                },
                "example": {
                  "BatchId": "550e8400-e29b-41d4-a716-446655440000"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed"
          },
          "500": {
            "description": "Internal server error"
          }
        }
      },
      "get": {
        "tags": [
          "EviMail"
        ],
        "summary": "Query email batches (HTTP QUERY method)",
        "operationId": "eviMailBatchesQuery",
        "description": "Lists email batches owned by the caller (or the caller's site), with cursor pagination.\n\n**This endpoint uses the HTTP `QUERY` method, not GET.** OpenAPI cannot express the `QUERY` method, so it is shown here as a `GET` with the filter fields as query parameters. In practice, send an HTTP `QUERY` request with the fields in a JSON body (`States`, `Cursor`, `Limit`, `SortBy`, `SortOrder`, `Direction`, `TextSearch`).\n",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "States",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "Draft",
                  "Submitted",
                  "Scheduled",
                  "Processing",
                  "Processed",
                  "Invalid",
                  "Failed"
                ]
              }
            }
          },
          {
            "name": "Cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Limit",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "SortBy",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "None",
                "LastUpdated",
                "ScheduledFor",
                "StartedOn"
              ],
              "default": "LastUpdated"
            }
          },
          {
            "name": "SortOrder",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "None",
                "Ascending",
                "Descending"
              ],
              "default": "Ascending"
            }
          },
          {
            "name": "Direction",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "None",
                "Forward",
                "Backward"
              ],
              "default": "Forward"
            }
          },
          {
            "name": "TextSearch",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Query executed successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EviMailBatchesQueryResponse"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request."
          },
          "401": {
            "description": "Authentication failed"
          }
        }
      }
    },
    "/v2/EviMail/Batches/{BatchId}": {
      "servers": [
        {
          "url": "https://api.evicertia.com"
        },
        {
          "url": "https://api.ecertia.com"
        }
      ],
      "parameters": [
        {
          "name": "BatchId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "get": {
        "tags": [
          "EviMail"
        ],
        "summary": "Get an email batch",
        "operationId": "eviMailBatchGet",
        "description": "Retrieves the full state of a batch, including its configured email template and processing progress.",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Batch retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EviMailBatchGetResponse"
                }
              }
            }
          },
          "400": {
            "description": "BatchId is missing or a default (empty) UUID."
          },
          "401": {
            "description": "Authentication failed"
          },
          "404": {
            "description": "No batch with the given BatchId was found."
          }
        }
      },
      "patch": {
        "tags": [
          "EviMail"
        ],
        "summary": "Update an email batch",
        "operationId": "eviMailBatchPatch",
        "description": "Updates batch metadata and the email template options. All fields are optional; only the fields supplied are changed. Setting `State` transitions the batch (for example, to start processing). Setting `ScheduledDate` schedules the batch. Batch scheduling uses UTC. Specify `ScheduledDate` in UTC.\n",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EviMailBatchPatchRequest"
              },
              "example": {
                "Subject": "Your March statement",
                "IssuerName": "Sender Corp.",
                "CertificationLevel": "Advanced_EU",
                "Language": "en",
                "State": "Submitted"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Batch updated."
          },
          "400": {
            "description": "Invalid request."
          },
          "401": {
            "description": "Authentication failed"
          },
          "404": {
            "description": "No batch with the given BatchId was found."
          }
        }
      },
      "delete": {
        "tags": [
          "EviMail"
        ],
        "summary": "Delete an email batch",
        "operationId": "eviMailBatchDelete",
        "description": "Removes a previously created batch.",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Batch deleted."
          },
          "401": {
            "description": "Authentication failed"
          },
          "404": {
            "description": "No batch with the given BatchId was found."
          }
        }
      }
    },
    "/v2/EviMail/Batches/{BatchId}/Body": {
      "servers": [
        {
          "url": "https://api.evicertia.com"
        },
        {
          "url": "https://api.ecertia.com"
        }
      ],
      "parameters": [
        {
          "name": "BatchId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "put": {
        "tags": [
          "EviMail"
        ],
        "summary": "Set the batch body",
        "operationId": "eviMailBatchBodyPut",
        "description": "Sets the HTML body of the email for this batch. The body is sent as the raw request payload (HTML), not as a JSON field. Use `PATCH .../{BatchId}` to set the `Subject`.\n",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "text/html": {
              "schema": {
                "type": "string"
              },
              "example": "<p>Hello, this is a certified email.</p>"
            }
          }
        },
        "responses": {
          "202": {
            "description": "Body accepted and queued for update. Poll GET .../{BatchId} to check status."
          },
          "400": {
            "description": "The request has no valid body."
          },
          "401": {
            "description": "Authentication failed"
          },
          "404": {
            "description": "No batch with the given BatchId was found."
          }
        }
      }
    },
    "/v2/EviMail/Batches/{BatchId}/Recipients": {
      "servers": [
        {
          "url": "https://api.evicertia.com"
        },
        {
          "url": "https://api.ecertia.com"
        }
      ],
      "parameters": [
        {
          "name": "BatchId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "post": {
        "tags": [
          "EviMail"
        ],
        "summary": "Add batch recipients (CSV)",
        "operationId": "eviMailBatchRecipientsPost",
        "description": "Adds recipients to the batch by uploading a `text/csv` file. The CSV uses `;` as the column separator. Mandatory columns: `emailaddress`, `legalname`. Optional columns: `lookupkey`, `displayname`, `evidenceaccesscontrolchallenge`, `evidenceaccesscontrolchallengeresponse`. Custom per-recipient fields are added as extra columns prefixed with `*` (for example, `*orderid`).\n",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "text/csv": {
              "schema": {
                "type": "string"
              },
              "example": "emailaddress;legalname;displayname;*orderid\njane@example.com;Acme Corp;Jane Doe;ORD-001\njohn@example.com;Beta Ltd;John Roe;ORD-002\n"
            }
          }
        },
        "responses": {
          "200": {
            "description": "Recipients accepted. No response body is returned."
          },
          "400": {
            "description": "The recipient payload is empty or the Content-Type is not `text/csv`."
          },
          "401": {
            "description": "Authentication failed"
          },
          "404": {
            "description": "No batch with the given BatchId was found."
          },
          "409": {
            "description": "The recipient list failed validation (for example, missing mandatory columns)."
          }
        }
      },
      "get": {
        "tags": [
          "EviMail"
        ],
        "summary": "Query batch recipients (HTTP QUERY method)",
        "operationId": "eviMailBatchRecipientsQuery",
        "description": "Lists the recipients of a batch, with cursor pagination.\n\n**This endpoint uses the HTTP `QUERY` method, not GET.** OpenAPI cannot express the `QUERY` method, so it is shown here as a `GET` with the filter fields as query parameters. In practice, send an HTTP `QUERY` request with the fields (`Cursor`, `Limit`, `SortDirection`) in a JSON body.\n",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "Cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            }
          },
          {
            "name": "SortDirection",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "None",
                "Ascending",
                "Descending"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Query executed successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EviMailBatchRecipientsQueryResponse"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request."
          },
          "401": {
            "description": "Authentication failed"
          },
          "404": {
            "description": "No batch with the given BatchId was found."
          }
        }
      },
      "delete": {
        "tags": [
          "EviMail"
        ],
        "summary": "Delete all batch recipients",
        "operationId": "eviMailBatchRecipientsDelete",
        "description": "Removes all recipients from the batch.",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Recipients removed."
          },
          "401": {
            "description": "Authentication failed"
          },
          "404": {
            "description": "No batch with the given BatchId was found."
          }
        }
      }
    },
    "/v2/EviMail/Batches/{BatchId}/Attachments": {
      "servers": [
        {
          "url": "https://api.evicertia.com"
        },
        {
          "url": "https://api.ecertia.com"
        }
      ],
      "parameters": [
        {
          "name": "BatchId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "post": {
        "tags": [
          "EviMail"
        ],
        "summary": "Add a batch attachment",
        "operationId": "eviMailBatchAttachmentsPost",
        "description": "Adds a single attachment to the batch by uploading it as `multipart/form-data`. The attachment is included in every email generated from the batch.\n",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "Content": {
                    "type": "string",
                    "format": "binary",
                    "description": "The attachment file content."
                  },
                  "DisplayName": {
                    "type": "string"
                  },
                  "Filename": {
                    "type": "string"
                  },
                  "ContentId": {
                    "type": "string"
                  },
                  "MimeType": {
                    "type": "string"
                  },
                  "ContentDescription": {
                    "type": "string"
                  },
                  "ContentDisposition": {
                    "type": "string"
                  },
                  "ContentLocation": {
                    "type": "string"
                  },
                  "ContentEncoding": {
                    "type": "string"
                  },
                  "IncludeOnAffidavits": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "Content"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Attachment added.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EviMailBatchAttachmentPostResponse"
                }
              }
            }
          },
          "400": {
            "description": "No file was supplied, or more than one file was supplied."
          },
          "401": {
            "description": "Authentication failed"
          },
          "404": {
            "description": "No batch with the given BatchId was found."
          }
        }
      },
      "get": {
        "tags": [
          "EviMail"
        ],
        "summary": "List batch attachments",
        "operationId": "eviMailBatchAttachmentsGet",
        "description": "Returns metadata for all attachments configured on the batch.",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Attachment metadata returned.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EviMailBatchAttachmentInfo"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed"
          },
          "404": {
            "description": "No batch with the given BatchId was found."
          }
        }
      },
      "delete": {
        "tags": [
          "EviMail"
        ],
        "summary": "Delete all batch attachments",
        "operationId": "eviMailBatchAttachmentsDelete",
        "description": "Removes all attachments from the batch.",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Attachments removed."
          },
          "401": {
            "description": "Authentication failed"
          },
          "404": {
            "description": "No batch with the given BatchId was found."
          }
        }
      }
    },
    "/v2/EviMail/Batches/{BatchId}/Attachments/{AttachmentId}": {
      "servers": [
        {
          "url": "https://api.evicertia.com"
        },
        {
          "url": "https://api.ecertia.com"
        }
      ],
      "parameters": [
        {
          "name": "BatchId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "name": "AttachmentId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "get": {
        "tags": [
          "EviMail"
        ],
        "summary": "Download a batch attachment",
        "operationId": "eviMailBatchAttachmentGet",
        "description": "Downloads the binary content of a single batch attachment.",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Attachment content.",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed"
          },
          "404": {
            "description": "No attachment or batch with the given IDs was found."
          }
        }
      },
      "delete": {
        "tags": [
          "EviMail"
        ],
        "summary": "Delete a batch attachment",
        "operationId": "eviMailBatchAttachmentDelete",
        "description": "Removes a single attachment from the batch.",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Attachment removed."
          },
          "401": {
            "description": "Authentication failed"
          },
          "404": {
            "description": "No attachment or batch with the given IDs was found."
          }
        }
      }
    },
    "/v1/EviSms/Submit": {
      "post": {
        "tags": [
          "EviSMS"
        ],
        "summary": "Submit a certified SMS",
        "operationId": "eviSmsSubmit",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "X-Evi-IdempotencyToken",
            "in": "header",
            "required": false,
            "description": "Optional idempotency token (UUID recommended) to prevent duplicate submissions on retry. A replay of a cached `200 OK` submission returns `202 Accepted`. Responses `400`, `401`, `408`, `409`, `429`, and `5xx` are not cached for replay.\n",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EviSmsSubmitRequest"
              },
              "examples": {
                "smsOk": {
                  "value": {
                    "Text": "We inform you that your request has been processed.",
                    "LookupKey": "SMS-001",
                    "IssuerName": "SendCo",
                    "Recipient": {
                      "LegalName": "Recipient Corp.",
                      "PhoneNumber": "+34600000000"
                    },
                    "Options": {
                      "CertificationLevel": "Advanced_EU",
                      "DeliveryChannels": [
                        "SMS"
                      ],
                      "TimeToLive": 11400,
                      "Language": "es",
                      "AffidavitLanguage": "es",
                      "AffidavitKinds": [
                        "Submitted",
                        "TransmissionResult",
                        "DeliveryResult",
                        "Read",
                        "Closed",
                        "CompleteAdvanced"
                      ],
                      "PushNotificationFilter": [
                        "Ready",
                        "Sent",
                        "Dispatched",
                        "Delivered",
                        "Read",
                        "Failed",
                        "Closed",
                        "AffidavitPublished"
                      ],
                      "PushNotificationUrl": "https://your-system.example.com/callbacks/evisms",
                      "EvidenceAccessControlMethod": "Challenge",
                      "EvidenceAccessControlChallenge": "What is your mother's maiden name?",
                      "EvidenceAccessControlChallengeResponse": "Smith",
                      "OnlineRetentionPeriod": 1
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "SMS accepted",
            "headers": {
              "X-Evi-IdempotencyStatus": {
                "description": "Idempotency outcome for the submission request.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "New"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EviSmsSubmitResponse"
                }
              }
            }
          },
          "202": {
            "description": "Idempotent replay. The same X-Evi-IdempotencyToken was used for a cached 200 OK submission. The original response body is returned; the message is not resubmitted.",
            "headers": {
              "X-Evi-IdempotencyStatus": {
                "description": "Idempotency outcome for the submission request.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "Replay"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EviSmsSubmitResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EviSmsError"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed"
          },
          "403": {
            "description": "The authenticated account lacks the required API permission for EviSMS."
          },
          "409": {
            "description": "Another Submit with the same X-Evi-IdempotencyToken is currently in flight.",
            "headers": {
              "X-Evi-IdempotencyStatus": {
                "description": "Idempotency outcome for the submission request.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "Conflict"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/EviSms/Query": {
      "get": {
        "tags": [
          "EviSMS"
        ],
        "summary": "Query certified SMS messages (GET)",
        "operationId": "eviSmsQueryGet",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "WithUniqueIds",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "WithLookupKeys",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "WithLinkedId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "OnState",
            "in": "query",
            "description": "Filters results by the current EviSMS state. `Replied` is not part of the current public EviSMS lifecycle.",
            "schema": {
              "type": "string",
              "enum": [
                "Draft",
                "New",
                "Ready",
                "Sent",
                "Dispatched",
                "Delivered",
                "Read",
                "Closed",
                "Failed"
              ]
            }
          },
          {
            "name": "WithOutcome",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "None",
                "Certified",
                "Sent",
                "Delivered",
                "Read",
                "Accepted",
                "Rejected",
                "Failed"
              ]
            }
          },
          {
            "name": "OrderResultsBy",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "CreationDate"
              ]
            }
          },
          {
            "name": "Limit",
            "in": "query",
            "description": "Maximum results to return. Defaults to 100; drops to 25 when affidavit metadata is included.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 100
            }
          },
          {
            "name": "Offset",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "IncludeAffidavits",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "IncludeAffidavitBlobs",
            "in": "query",
            "deprecated": true,
            "description": "Deprecated. When true with IncludeAffidavits, includes Base64 affidavit PDFs in affidavits[].bytes and limits the query to one message. Set false for metadata-only results and use /AffidavitsDownload for new integrations.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Query executed successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EviSmsQueryResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed"
          }
        }
      }
    },
    "/v2/EviSms/Batches": {
      "servers": [
        {
          "url": "https://api.evicertia.com"
        },
        {
          "url": "https://api.ecertia.com"
        }
      ],
      "post": {
        "tags": [
          "EviSMS"
        ],
        "summary": "Create an SMS batch",
        "operationId": "eviSmsBatchCreate",
        "description": "Creates a new, empty SMS batch. Only a `Description` is required at creation; the message text, recipients, and options are set with the subsequent batch endpoints. Returns the `BatchId` used by all other batch operations.\n",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EviSmsBatchCreateRequest"
              },
              "example": {
                "Description": "March 2026 customer SMS"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Batch created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EviSmsBatchCreateResponse"
                },
                "example": {
                  "BatchId": "550e8400-e29b-41d4-a716-446655440000"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed"
          },
          "500": {
            "description": "Internal server error"
          }
        }
      },
      "get": {
        "tags": [
          "EviSMS"
        ],
        "summary": "Query SMS batches (HTTP QUERY method)",
        "operationId": "eviSmsBatchesQuery",
        "description": "Lists SMS batches owned by the caller (or the caller's site), with cursor pagination.\n\n**This endpoint uses the HTTP `QUERY` method, not GET.** OpenAPI cannot express the `QUERY` method, so it is shown here as a `GET` with the filter fields as query parameters. In practice, send an HTTP `QUERY` request with the fields in a JSON body (`States`, `Cursor`, `Limit`, `SortBy`, `SortOrder`, `Direction`, `TextSearch`).\n",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "States",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "Draft",
                  "Submitted",
                  "Scheduled",
                  "Processing",
                  "Processed",
                  "Invalid",
                  "Failed"
                ]
              }
            }
          },
          {
            "name": "Cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Limit",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "SortBy",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "None",
                "LastUpdated",
                "ScheduledFor",
                "StartedOn"
              ],
              "default": "LastUpdated"
            }
          },
          {
            "name": "SortOrder",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "None",
                "Ascending",
                "Descending"
              ],
              "default": "Ascending"
            }
          },
          {
            "name": "Direction",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "None",
                "Forward",
                "Backward"
              ],
              "default": "Forward"
            }
          },
          {
            "name": "TextSearch",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Query executed successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EviSmsBatchesQueryResponse"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request."
          },
          "401": {
            "description": "Authentication failed"
          }
        }
      }
    },
    "/v2/EviSms/Batches/{BatchId}": {
      "servers": [
        {
          "url": "https://api.evicertia.com"
        },
        {
          "url": "https://api.ecertia.com"
        }
      ],
      "parameters": [
        {
          "name": "BatchId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "get": {
        "tags": [
          "EviSMS"
        ],
        "summary": "Get an SMS batch",
        "operationId": "eviSmsBatchGet",
        "description": "Retrieves the full state of a batch, including its configured message template and processing progress.",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Batch retrieved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EviSmsBatchGetResponse"
                }
              }
            }
          },
          "400": {
            "description": "BatchId is missing or a default (empty) UUID."
          },
          "401": {
            "description": "Authentication failed"
          },
          "404": {
            "description": "No batch with the given BatchId was found."
          }
        }
      },
      "patch": {
        "tags": [
          "EviSMS"
        ],
        "summary": "Update an SMS batch",
        "operationId": "eviSmsBatchPatch",
        "description": "Updates batch metadata and the message template options, including the SMS `Text`. All fields are optional; only the fields supplied are changed. Setting `State` transitions the batch (for example, to start processing). Setting `ScheduledDate` schedules the batch. Batch scheduling uses UTC. Specify `ScheduledDate` in UTC.\n",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EviSmsBatchPatchRequest"
              },
              "example": {
                "Text": "We inform you that your request has been processed.",
                "IssuerName": "SendCo",
                "CertificationLevel": "Advanced_EU",
                "Language": "es",
                "State": "Submitted"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Batch updated."
          },
          "400": {
            "description": "Invalid request."
          },
          "401": {
            "description": "Authentication failed"
          },
          "404": {
            "description": "No batch with the given BatchId was found."
          }
        }
      },
      "delete": {
        "tags": [
          "EviSMS"
        ],
        "summary": "Delete an SMS batch",
        "operationId": "eviSmsBatchDelete",
        "description": "Removes a previously created batch.",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Batch deleted."
          },
          "401": {
            "description": "Authentication failed"
          },
          "404": {
            "description": "No batch with the given BatchId was found."
          }
        }
      }
    },
    "/v2/EviSms/Batches/{BatchId}/Recipients": {
      "servers": [
        {
          "url": "https://api.evicertia.com"
        },
        {
          "url": "https://api.ecertia.com"
        }
      ],
      "parameters": [
        {
          "name": "BatchId",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ],
      "post": {
        "tags": [
          "EviSMS"
        ],
        "summary": "Add batch recipients (CSV)",
        "operationId": "eviSmsBatchRecipientsPost",
        "description": "Adds recipients to the batch by uploading a `text/csv` file. The CSV uses `;` as the column separator. Mandatory columns: `phonenumber`, `legalname`. Optional columns: `lookupkey`, `evidenceaccesscontrolchallenge`, `evidenceaccesscontrolchallengeresponse`. Custom per-recipient fields are added as extra columns prefixed with `*` (for example, `*orderid`).\n",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "text/csv": {
              "schema": {
                "type": "string"
              },
              "example": "phonenumber;legalname;lookupkey;*orderid\n+34600000000;Acme Corp;SMS-001;ORD-001\n+34600000001;Beta Ltd;SMS-002;ORD-002\n"
            }
          }
        },
        "responses": {
          "200": {
            "description": "Recipients accepted. No response body is returned."
          },
          "400": {
            "description": "The recipient payload is empty or the Content-Type is not `text/csv`."
          },
          "401": {
            "description": "Authentication failed"
          },
          "404": {
            "description": "No batch with the given BatchId was found."
          },
          "409": {
            "description": "The recipient list failed validation (for example, missing mandatory columns)."
          }
        }
      },
      "get": {
        "tags": [
          "EviSMS"
        ],
        "summary": "Query batch recipients (HTTP QUERY method)",
        "operationId": "eviSmsBatchRecipientsQuery",
        "description": "Lists the recipients of a batch, with cursor pagination.\n\n**This endpoint uses the HTTP `QUERY` method, not GET.** OpenAPI cannot express the `QUERY` method, so it is shown here as a `GET` with the filter fields as query parameters. In practice, send an HTTP `QUERY` request with the fields (`Cursor`, `Limit`, `SortDirection`) in a JSON body.\n",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "Cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            }
          },
          {
            "name": "SortDirection",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "None",
                "Ascending",
                "Descending"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Query executed successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EviSmsBatchRecipientsQueryResponse"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request."
          },
          "401": {
            "description": "Authentication failed"
          },
          "404": {
            "description": "No batch with the given BatchId was found."
          }
        }
      },
      "delete": {
        "tags": [
          "EviSMS"
        ],
        "summary": "Delete all batch recipients",
        "operationId": "eviSmsBatchRecipientsDelete",
        "description": "Removes all recipients from the batch.",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "Recipients removed."
          },
          "401": {
            "description": "Authentication failed"
          },
          "404": {
            "description": "No batch with the given BatchId was found."
          }
        }
      }
    },
    "/v1/EviPost/Submit": {
      "post": {
        "tags": [
          "EviPost"
        ],
        "summary": "Submit a certified postal communication",
        "operationId": "eviPostSubmit",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "X-Evi-IdempotencyToken",
            "in": "header",
            "required": false,
            "description": "Optional idempotency token (GUID recommended) to prevent duplicate submissions on retry. A replay of a cached `200 OK` submission returns `202 Accepted`. Responses `400`, `401`, `408`, `409`, `429`, and `5xx` are not cached for replay.\n",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EviPostSubmitRequest"
              },
              "examples": {
                "registeredPost": {
                  "summary": "Registered postal communication",
                  "value": {
                    "LookupKey": "a2R4S25kWiu79fsbubSXkw==",
                    "Document": "<base64-encoded PDF>",
                    "RecipientName": "Juan Valido",
                    "RecipientLegalName": "Juan Valido",
                    "RecipientAddress": {
                      "StreetAddress": "Gran Via 74, 5 A",
                      "PostalCode": "28014",
                      "Locality": "Madrid",
                      "Region": "Madrid",
                      "Country": "ES"
                    },
                    "RecipientPhone": "+34677000111",
                    "RecipientEmail": "recipient@example.com",
                    "IssuerName": "Pedro Comprador",
                    "IssuerLegalName": "Pedro Valido",
                    "IssuerAddress": {
                      "StreetAddress": "C/ Gran Via, 1, 1-A",
                      "PostalCode": "28001",
                      "Locality": "Madrid",
                      "Region": "Madrid",
                      "Country": "ES"
                    },
                    "IssuerPhone": "+34677888777",
                    "IssuerEmail": "pedro.comprador@example.com",
                    "IssuerComments": "Sending in March.",
                    "Options": {
                      "PostServiceType": "Registered",
                      "Language": "es",
                      "CertificationLevel": "Advanced_EU",
                      "AffidavitProfile": "AdvancedContentOnSubmit",
                      "AffidavitsOnDemandEnabled": false,
                      "OnlineRetentionPeriod": 1,
                      "NotaryRetentionPeriod": 5,
                      "NotaryProfile": "notary-profile-id",
                      "EvidenceAccessControlMethod": "AutoChallenge",
                      "CostCentre": "dept-legal",
                      "PushNotificationUrl": "https://your-server.example.com/callbacks/evipost",
                      "PushNotificationFilter": [
                        "Processed",
                        "Sent",
                        "Delivered",
                        "Closed"
                      ],
                      "PushNotificationExtraData": "{\"myId\": \"order-12345\"}"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Postal communication accepted",
            "headers": {
              "X-Evi-IdempotencyStatus": {
                "description": "Idempotency outcome for the submission request.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "New"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EviPostSubmitResponse"
                },
                "example": {
                  "uniqueId": "69819c3e-0c0e-42b3-a792-a33b014a13a2"
                }
              }
            }
          },
          "202": {
            "description": "Idempotent replay. The same X-Evi-IdempotencyToken was used for a cached 200 OK submission. The original response body is returned; the postal communication is not resubmitted.",
            "headers": {
              "X-Evi-IdempotencyStatus": {
                "description": "Idempotency outcome for the submission request.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "Replay"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EviPostSubmitResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request or business rule failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EviPostError"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed"
          },
          "403": {
            "description": "Access denied. The authenticated account is not provisioned for EviPost. Contact your Namirial Notify account manager to enable this service.\n"
          },
          "409": {
            "description": "Another Submit with the same X-Evi-IdempotencyToken is currently in flight.",
            "headers": {
              "X-Evi-IdempotencyStatus": {
                "description": "Idempotency outcome for the submission request.",
                "schema": {
                  "type": "string",
                  "enum": [
                    "Conflict"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/EviPost/Query": {
      "get": {
        "tags": [
          "EviPost"
        ],
        "summary": "Query certified postal communications (GET)",
        "operationId": "eviPostQueryGet",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "WithUniqueIds",
            "in": "query",
            "description": "Filter by one or more unique IDs (comma-separated).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "WithLookupKeys",
            "in": "query",
            "description": "Filter by one or more lookup keys (comma-separated).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "OnState",
            "in": "query",
            "description": "Filter by current state. Contact support before using this parameter.",
            "schema": {
              "type": "string",
              "enum": [
                "Draft",
                "Submitted",
                "Processed",
                "Sent",
                "Dispatched",
                "Delivered",
                "Missing",
                "Closed",
                "Issued",
                "Failed",
                "Undelivered",
                "Disposed",
                "Cancelled"
              ]
            }
          },
          {
            "name": "WithOutcome",
            "in": "query",
            "description": "Filter by outcome. Contact support before using this parameter.",
            "schema": {
              "type": "string",
              "enum": [
                "None",
                "Delivered",
                "Dispatched",
                "Acknowledged",
                "Declined",
                "Hindered",
                "Cancelled",
                "Expired",
                "Failed",
                "Sent",
                "Rejected",
                "Undelivered",
                "Disposed"
              ]
            }
          },
          {
            "name": "OrderResultsBy",
            "in": "query",
            "description": "Sort field for results.",
            "schema": {
              "type": "string",
              "enum": [
                "CreationDate"
              ]
            }
          },
          {
            "name": "Offset",
            "in": "query",
            "description": "Number of results to skip for pagination.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "Limit",
            "in": "query",
            "description": "Maximum results to return. Defaults to 100; drops to 25 when IncludeAffidavitsOnResult is true.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 100
            }
          },
          {
            "name": "IncludeDocumentOnResult",
            "in": "query",
            "description": "Include the base64-encoded original document in results.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "IncludeAffidavitsOnResult",
            "in": "query",
            "description": "Include affidavit metadata in results.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "IncludeAffidavitBlobsOnResult",
            "in": "query",
            "deprecated": true,
            "description": "Deprecated. When true with IncludeAffidavitsOnResult, includes Base64 affidavit PDFs in affidavits[].bytes and limits the query to one postal communication. Set false for metadata-only results and use /AffidavitsDownload for new integrations.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Query executed successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EviPostQueryResponse"
                },
                "example": {
                  "results": [
                    {
                      "evidenceId": "3977d143-a6cb-4642-abc6-a33b016cbec2",
                      "lookupKey": "a2R4S25kWiu79fsbubSXkw==",
                      "recipientName": "Juan Valido",
                      "address": {
                        "streetAddress": "Gran Via 74, 5 A",
                        "postalCode": "28014",
                        "locality": "Madrid",
                        "region": "Madrid",
                        "country": "ES"
                      },
                      "state": "Sent",
                      "stateDate": "2026-01-15T10:00:07Z",
                      "lastStateChangeDate": "2026-01-15T10:00:11Z",
                      "outcome": "None",
                      "outcomeDate": "2026-01-15T10:00:00Z",
                      "creationDate": "2026-01-15T10:00:00Z",
                      "submittedOn": "2026-01-15T10:00:00Z",
                      "processedOn": "2026-01-15T10:00:03Z",
                      "sentOn": "2026-01-15T10:00:07Z",
                      "timeToLive": 43200,
                      "costCentre": "dept-legal",
                      "affidavits": [
                        {
                          "uniqueId": "000c1f70-42ac-a3ea-149f-943879726a87",
                          "date": "2026-01-15T10:00:12Z",
                          "evidenceUniqueId": "3977d143-a6cb-4642-abc6-a33b016cbec2",
                          "description": "Certification of postal communication"
                        }
                      ]
                    }
                  ],
                  "totalMatches": 1
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed"
          },
          "403": {
            "description": "Access denied. The authenticated account is not provisioned for EviPost. Contact your Namirial Notify account manager to enable this service.\n"
          }
        }
      }
    },
    "/v1/EviPost/AffidavitRequest": {
      "post": {
        "tags": [
          "EviPost"
        ],
        "summary": "Request an on-demand affidavit",
        "operationId": "eviPostAffidavitRequest",
        "description": "Generates a custom affidavit for a previously submitted EviPost. **Requires** that `AffidavitsOnDemandEnabled: true` was set in the original Submit request, and that `AffidavitProfile` was set to `AdvancedContentOnSubmit`, `AdvancedContentOnClose`, or `AdvancedContentOnSubmitAndOnClose`. The affidavit is generated asynchronously.\n",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EviPostAffidavitRequest"
              },
              "example": {
                "UniqueId": "87ffa214-e773-4bd5-9b8d-a8ef00fd80f8",
                "IncludeDocument": true,
                "IncludeEvents": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Affidavit request accepted. Generation is asynchronous.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EviPostAffidavitResponse"
                },
                "example": {
                  "requestId": "79726a87000c1f7042aca3ea149f9438"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request or business rule failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EviPostError"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed"
          }
        }
      }
    },
    "/v1/EviPost/Cancel": {
      "post": {
        "tags": [
          "EviPost"
        ],
        "summary": "Cancel a postal communication",
        "operationId": "eviPostCancel",
        "description": "Cancels a previously submitted EviPost that has not yet been dispatched to the postal carrier. Only the account that submitted the postal communication can cancel it. Requires the `CanUseCancel` permission in addition to the standard EviPost API permission.\n",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EviPostCancelRequest"
              },
              "example": {
                "UniqueId": "69819c3e-0c0e-42b3-a792-a33b014a13a2"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Cancellation accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EviPostCancelResponse"
                },
                "example": {
                  "uniqueId": "69819c3e-0c0e-42b3-a792-a33b014a13a2"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request. The UniqueId is missing or not a valid UUID."
          },
          "401": {
            "description": "Authentication failed, or the authenticated account is not the owner of the postal communication."
          },
          "403": {
            "description": "The authenticated account lacks the required `CanUseCancel` permission, or EviPost is not enabled for this account.\n"
          },
          "404": {
            "description": "No postal communication with the given UniqueId was found."
          }
        }
      }
    },
    "/AttachmentDownload": {
      "post": {
        "tags": [
          "Shared Downloads"
        ],
        "summary": "Download attachments by ID",
        "operationId": "attachmentDownloadPost",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UniqueIdsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Attachment metadata and base64 content.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AttachmentDownloadResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed."
          }
        }
      },
      "get": {
        "tags": [
          "Shared Downloads"
        ],
        "summary": "Download attachments by ID using query parameters",
        "operationId": "attachmentDownloadGet",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/UniqueIds"
          }
        ],
        "responses": {
          "200": {
            "description": "Attachment metadata and base64 content.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AttachmentDownloadResponse"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed."
          }
        }
      }
    },
    "/AffidavitsDownload": {
      "post": {
        "tags": [
          "Shared Downloads"
        ],
        "summary": "Download affidavit PDFs by ID",
        "description": "Packages the requested affidavit PDFs in a ZIP archive. All requested affidavits must exist and be owned by the authenticated user.",
        "operationId": "affidavitsDownloadPost",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AffidavitUniqueIdsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/AffidavitArchive"
          },
          "400": {
            "description": "The identifier list is missing or exceeds the configured limit."
          },
          "401": {
            "description": "Authentication failed."
          },
          "403": {
            "description": "The account lacks the required API permission, or one or more requested affidavits are not owned by the authenticated user."
          },
          "404": {
            "description": "One or more requested affidavit IDs were not found."
          }
        }
      },
      "get": {
        "tags": [
          "Shared Downloads"
        ],
        "summary": "Download affidavit PDFs by ID using query parameters",
        "description": "Packages the requested affidavit PDFs in a ZIP archive. Repeat the UniqueIds query parameter for multiple IDs.",
        "operationId": "affidavitsDownloadGet",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AffidavitUniqueIds"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/AffidavitArchive"
          },
          "400": {
            "description": "The identifier list is missing or exceeds the configured limit."
          },
          "401": {
            "description": "Authentication failed."
          },
          "403": {
            "description": "The account lacks the required API permission, or one or more requested affidavits are not owned by the authenticated user."
          },
          "404": {
            "description": "One or more requested affidavit IDs were not found."
          }
        }
      },
      "head": {
        "tags": [
          "Shared Downloads"
        ],
        "summary": "Check an affidavit archive request",
        "description": "Accepts the same affidavit identifiers as GET and returns the response headers without transferring the archive body.",
        "operationId": "affidavitsDownloadHead",
        "security": [
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AffidavitUniqueIds"
          }
        ],
        "responses": {
          "200": {
            "description": "The affidavit archive request is valid.",
            "headers": {
              "Content-Disposition": {
                "description": "Suggested archive filename.",
                "schema": {
                  "type": "string",
                  "example": "attachment;filename=\"affidavits.zip\""
                }
              }
            }
          },
          "400": {
            "description": "The identifier list is missing or exceeds the configured limit."
          },
          "401": {
            "description": "Authentication failed."
          },
          "403": {
            "description": "The account lacks the required API permission, or one or more requested affidavits are not owned by the authenticated user."
          },
          "404": {
            "description": "One or more requested affidavit IDs were not found."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    },
    "schemas": {
      "EviNoticeAttachment": {
        "type": "object",
        "required": [
          "Data"
        ],
        "properties": {
          "Data": {
            "type": "string",
            "format": "byte",
            "description": "Base64-encoded content of the file. Maximum 8 MB per attachment (25 MB total across all attachments in the same submission)."
          },
          "Filename": {
            "type": "string",
            "description": "The file name including extension (e.g. `contract.pdf`)."
          },
          "DisplayName": {
            "type": "string",
            "description": "A human-readable label shown to the recipient instead of the raw file name."
          },
          "MimeType": {
            "type": "string",
            "description": "The MIME type of the file (e.g. `application/pdf`, `image/png`)."
          },
          "ContentId": {
            "type": "string",
            "description": "A Content-ID that can be referenced with `cid:` in the Body HTML to embed the attachment inline."
          },
          "ContentEncoding": {
            "type": "string",
            "description": "Encoding of the Data field. Defaults to base64."
          },
          "ContentDescription": {
            "type": "string",
            "description": "Optional human-readable description of the attachment."
          },
          "ContentDisposition": {
            "type": "string",
            "description": "The Content-Disposition of the attachment (e.g. `inline` or `attachment`)."
          },
          "ContentLocation": {
            "type": "string",
            "description": "The Content-Location header value for the attachment."
          },
          "IncludeOnAffidavits": {
            "type": "boolean",
            "description": "Whether this attachment is referenced in generated affidavits."
          }
        }
      },
      "EviNoticeReminders": {
        "type": "object",
        "description": "Configuration for automatic reminder notifications sent to the recipient before the notice expires.",
        "required": [
          "Initial",
          "Repeat",
          "Days",
          "TimeRange",
          "Stop",
          "TimeZone"
        ],
        "properties": {
          "Initial": {
            "type": "string",
            "description": "ISO 8601 duration after submission before the first reminder is sent. For example, `P2D` means the first reminder fires 2 days after submission.\n",
            "example": "P2D"
          },
          "Repeat": {
            "type": "string",
            "description": "ISO 8601 duration between subsequent reminders after the first one. For example, `P1D` means reminders repeat every day.\n",
            "example": "P1D"
          },
          "Days": {
            "type": "array",
            "description": "Days of the week on which reminders may be sent.",
            "items": {
              "type": "string",
              "enum": [
                "Monday",
                "Tuesday",
                "Wednesday",
                "Thursday",
                "Friday",
                "Saturday",
                "Sunday"
              ]
            },
            "example": [
              "Monday",
              "Tuesday",
              "Wednesday",
              "Thursday",
              "Friday"
            ]
          },
          "TimeRange": {
            "type": "array",
            "description": "Time-of-day windows during which reminders may be sent.",
            "items": {
              "type": "string",
              "enum": [
                "FROM08TO10",
                "FROM10TO12",
                "FROM12TO15",
                "FROM15TO19"
              ]
            },
            "example": [
              "FROM08TO10",
              "FROM10TO12",
              "FROM12TO15",
              "FROM15TO19"
            ]
          },
          "Max": {
            "type": "integer",
            "description": "Maximum number of reminders to send in total.",
            "minimum": 1,
            "example": 5
          },
          "Stop": {
            "type": "string",
            "description": "ISO 8601 duration after submission at which point no further reminders are sent, regardless of Max. For example, `P15D` stops reminders after 15 days.\n",
            "example": "P15D"
          },
          "TimeZone": {
            "type": "string",
            "description": "IANA time zone identifier used to interpret the Days and TimeRange windows.",
            "example": "Etc/GMT-1"
          }
        }
      },
      "EviNoticeSubmitRequest": {
        "type": "object",
        "required": [
          "Subject",
          "Body",
          "RecipientAddress"
        ],
        "properties": {
          "Subject": {
            "type": "string",
            "description": "The subject line of the certified notice."
          },
          "Body": {
            "type": "string",
            "description": "The HTML or plain-text body of the hosted notice."
          },
          "RecipientAddress": {
            "type": "string",
            "description": "Recipient's email address or mobile phone number in E.164 format. The delivery notification is sent to this address."
          },
          "RecipientDisplayName": {
            "type": "string",
            "description": "The display name shown to the recipient in the delivery notification."
          },
          "RecipientLegalName": {
            "type": "string",
            "description": "The legal name of the recipient, recorded in the certification evidence."
          },
          "IssuerLegalName": {
            "type": "string",
            "description": "The legal name of the sending organisation, recorded in the certification evidence."
          },
          "From": {
            "type": "string",
            "description": "Override the sender address shown in the delivery notification email."
          },
          "ReplyTo": {
            "type": "string",
            "description": "Reply-to address for the delivery notification email."
          },
          "LookupKey": {
            "type": "string",
            "description": "An arbitrary key assigned by the integrator to correlate this notice with records in your own system."
          },
          "CustomLayoutLogoUrl": {
            "type": "string",
            "format": "uri",
            "description": "URL of a custom logo to display in the hosted notice layout."
          },
          "TimeToLive": {
            "type": "integer",
            "minimum": 60,
            "maximum": 86400,
            "description": "The time in minutes during which the platform will attempt delivery and keep the notice accessible to the recipient. Range: 60–86,400 (1 minute to 60 days). When omitted, the account's configured default applies.\n",
            "example": 10080
          },
          "Attachments": {
            "type": "array",
            "description": "Files to include in the hosted notice. Maximum 15 attachments; maximum 8 MB per attachment; maximum 25 MB total across all attachments.",
            "maxItems": 14,
            "items": {
              "$ref": "#/components/schemas/EviNoticeAttachment"
            }
          },
          "CertificationLevel": {
            "type": "string",
            "description": "The legal framework and geographic variant for certification. Supported values include `Standard`, `Advanced`, `QERDS`, and their regional variants. Availability depends on the account.\n",
            "enum": [
              "Standard",
              "Advanced",
              "QERDS",
              "Standard_CO",
              "Standard_CR",
              "Standard_EC",
              "Standard_EU",
              "Standard_MX",
              "Standard_PE",
              "Advanced_CO",
              "Advanced_CR",
              "Advanced_EC",
              "Advanced_EU",
              "Advanced_MX",
              "Advanced_PE",
              "QERDS_ES",
              "QERDS_IT"
            ],
            "example": "Advanced_EU"
          },
          "QERDSEnrollmentAllowed": {
            "type": "boolean",
            "description": "Allow the recipient to enrol in a QERDS identity during the commitment flow."
          },
          "QERDSEnrollmentProfile": {
            "type": "string",
            "description": "The QERDS enrolment profile to use when QERDSEnrollmentAllowed is true."
          },
          "RecipientLegalIdRequired": {
            "type": "boolean",
            "description": "Require the recipient to provide a government-issued legal ID before accessing the notice."
          },
          "RecipientLegalIdKind": {
            "type": "string",
            "description": "The type of legal ID to request from the recipient.",
            "enum": [
              "IDC:ES",
              "PAS:ES",
              "PAS:IT",
              "TIN:IT"
            ]
          },
          "RecipientLegalIdValue": {
            "type": "string",
            "description": "A pre-filled legal ID value for the recipient (used for verification)."
          },
          "AffidavitKinds": {
            "type": "array",
            "description": "The set of evidence events for which affidavits should be generated.",
            "items": {
              "type": "string",
              "enum": [
                "Submitted",
                "SubmittedAdvanced",
                "Dispatched",
                "TransmissionResult",
                "DeliveryResult",
                "Received",
                "Read",
                "Committed",
                "CommittedAdvanced",
                "Refused",
                "Closed",
                "ClosedAdvanced",
                "Event",
                "Complete",
                "CompleteAdvanced",
                "OnDemand",
                "ContentDownload",
                "Failed"
              ]
            }
          },
          "EvidenceAccessControlMethod": {
            "type": "string",
            "description": "Controls how recipients access the evidence record after the notice lifecycle ends. Supported values: `Public`, `Challenge`, `AutoChallenge`. Unlike EviMail and EviSMS, `Default` is not supported for EviNotice.\n",
            "enum": [
              "AutoChallenge",
              "Public",
              "Challenge"
            ]
          },
          "EvidenceAccessControlChallenge": {
            "type": "string",
            "description": "The challenge question shown to the recipient when EvidenceAccessControlMethod is Challenge."
          },
          "EvidenceAccessControlChallengeResponse": {
            "type": "string",
            "description": "The expected answer to the challenge question."
          },
          "NotificationChannels": {
            "type": "array",
            "description": "The delivery channels used to send the notification to the recipient.",
            "items": {
              "type": "string",
              "enum": [
                "SMS",
                "WhatsApp",
                "RCS",
                "Email"
              ]
            }
          },
          "DeliverySignMethod": {
            "type": "string",
            "description": "Controls how the recipient authenticates to access the hosted notice.",
            "enum": [
              "WebClick",
              "Challenge",
              "MobilePin",
              "EmailPin"
            ]
          },
          "DeliverySignChallenge": {
            "type": "string",
            "description": "The challenge question shown to the recipient when DeliverySignMethod is Challenge."
          },
          "DeliverySignChallengeResponse": {
            "type": "string",
            "description": "The expected answer to the challenge question."
          },
          "DeliverySignFixedMobile": {
            "type": "string",
            "description": "The fixed mobile number used to send the PIN when DeliverySignMethod is MobilePin.",
            "example": "+34600000000"
          },
          "DeliverySignFixedEmail": {
            "type": "string",
            "description": "The fixed email address used to send the PIN when DeliverySignMethod is EmailPin."
          },
          "MobilePinChannels": {
            "type": "array",
            "description": "Ordered list of channel groups for PIN delivery attempts. Each element is an array of channel names tried in parallel for that attempt. Supported channels: Sms, Rcs, WhatsApp.\n",
            "items": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "example": [
              [
                "Sms",
                "Rcs",
                "WhatsApp"
              ],
              [
                "Sms",
                "Rcs",
                "WhatsApp"
              ],
              [
                "Sms",
                "Rcs",
                "WhatsApp"
              ]
            ]
          },
          "CommitmentChoice": {
            "type": "string",
            "description": "Controls whether the recipient can accept or reject the notice. EviMail exposes the same behaviour through a field named `CommitmentOptions`.",
            "enum": [
              "Disabled",
              "Accept",
              "Reject",
              "AcceptOrReject"
            ]
          },
          "CommitmentCommentsAllowed": {
            "type": "boolean",
            "description": "Allow the recipient to add a free-text comment when committing."
          },
          "RejectReasons": {
            "type": "array",
            "description": "Predefined rejection reasons the recipient can select from.",
            "items": {
              "type": "string"
            }
          },
          "RequireRejectReason": {
            "type": "boolean",
            "description": "Require the recipient to select or enter a rejection reason before rejecting."
          },
          "AcceptReasons": {
            "type": "array",
            "description": "Predefined acceptance reasons the recipient can select from.",
            "items": {
              "type": "string"
            }
          },
          "RequireAcceptReason": {
            "type": "boolean",
            "description": "Require the recipient to select or enter an acceptance reason before accepting."
          },
          "PushNotificationFilter": {
            "type": "array",
            "description": "State transitions that trigger a push notification callback to PushNotificationUrl. `AffidavitPublished` is a platform meta-event that fires when affidavit generation completes — it is not a lifecycle state.\n",
            "items": {
              "type": "string",
              "enum": [
                "Processed",
                "Sent",
                "Dispatched",
                "Delivered",
                "Received",
                "Read",
                "Replied",
                "Failed",
                "Closed",
                "AffidavitPublished"
              ]
            }
          },
          "PushNotificationUrl": {
            "type": "string",
            "format": "uri",
            "description": "The URL that receives push notification callbacks when a state in PushNotificationFilter is reached."
          },
          "PushNotificationExtraData": {
            "type": "string",
            "description": "Arbitrary string passed back verbatim in each push notification payload."
          },
          "Language": {
            "type": "string",
            "description": "BCP 47 language tag controlling the language of the hosted notice UI (e.g. `en`, `es`, `it`).",
            "example": "en"
          },
          "AffidavitLanguage": {
            "type": "string",
            "description": "BCP 47 language tag controlling the language of generated affidavit documents.",
            "example": "en"
          },
          "NotificationLayout": {
            "type": "string",
            "description": "Visual layout of the hosted notice page. EviMail exposes the same concept through a field named `DeliveryAppearance`.",
            "enum": [
              "Certified",
              "AsIs"
            ]
          },
          "LandingPageInfoText": {
            "type": "string",
            "description": "Custom informational text shown to the recipient on the hosted notice landing page."
          },
          "NotificationTemplate": {
            "type": "string",
            "description": "Identifier of an enabled custom communication template used for the recipient's notification email, replacing the default system template. See [Using communication templates from the API](../../dev/templates.md).\n"
          },
          "NotificationTemplateValues": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Key-value pairs supplying values for the user variables declared in NotificationTemplate."
          },
          "OwnerNotificationTemplate": {
            "type": "string",
            "description": "Identifier of an enabled custom template used for the issuer's status notification email. See [Using communication templates from the API](../../dev/templates.md).\n"
          },
          "OwnerNotificationTemplateValues": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Key-value pairs supplying values for the user variables declared in OwnerNotificationTemplate."
          },
          "CommitmentChoiceButtonText": {
            "type": "string",
            "description": "Custom label for the accept/reject commitment button shown to the recipient."
          },
          "CommitmentChoiceButtonOnly": {
            "type": "boolean",
            "description": "When true, the hosted notice shows only the commitment buttons and hides the free-text input."
          },
          "QERDSIdentityTenant": {
            "type": "string",
            "description": "Tenant identifier used when resolving the recipient's QERDS identity."
          },
          "CostCentre": {
            "type": "string",
            "description": "An arbitrary cost-centre label recorded with the transaction for internal billing allocation."
          },
          "EnforceTrackingUntilTimeToLive": {
            "type": "boolean",
            "description": "When true, the platform keeps tracking content/attachment downloads until the TimeToLive elapses. This must be enabled together with the `ContentDownload` affidavit kind — enabling one without the other returns a validation error.\n"
          },
          "DisableSenderHeader": {
            "type": "boolean",
            "description": "When true, the Sender header is removed from the recipient notification email."
          },
          "DisablePlatformReferences": {
            "type": "boolean",
            "description": "When true, internal platform references are suppressed in the generated affidavits."
          },
          "LtaStorage": {
            "type": "boolean",
            "description": "When true, the evidence for this transaction is stored in Namirial Archive during post-close processing after tracking reaches `Closed`. Requires LTA to be enabled for the site. `OnlineRetentionPeriod` separately controls online accessibility.\n"
          },
          "AllowRefusal": {
            "type": "boolean",
            "description": "When true, the recipient can explicitly refuse the notice before reading it (records a Refused outcome)."
          },
          "OnlineRetentionPeriod": {
            "type": "integer",
            "description": "Online custody period in years during which the evidence remains accessible online before archiving or removal."
          },
          "NotaryRetention": {
            "type": "boolean",
            "description": "When true, the evidence is placed under notarial deposit. Requires NotaryProfile to be set."
          },
          "NotaryProfile": {
            "type": "string",
            "description": "The notary profile identifier to use for notarial deposit. Required when NotaryRetention is true."
          },
          "Reminders": {
            "$ref": "#/components/schemas/EviNoticeReminders"
          }
        }
      },
      "EviNoticeSubmitResponse": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "format": "uuid",
            "description": "The unique identifier of the submitted EviNotice. Use this to retrieve status and download evidence."
          }
        }
      },
      "EviNoticeProblem": {
        "type": "object",
        "description": "RFC 7807 Problem+JSON error response.",
        "properties": {
          "Status": {
            "type": "integer",
            "description": "HTTP status code."
          },
          "Type": {
            "type": "string",
            "format": "uri",
            "description": "URI identifying the problem type."
          },
          "Title": {
            "type": "string",
            "description": "Short, human-readable summary of the problem type."
          },
          "Detail": {
            "type": "string",
            "description": "Human-readable explanation specific to this occurrence."
          },
          "Instance": {
            "type": "string",
            "description": "URI reference identifying the specific occurrence of the problem. May be absent."
          },
          "RequestId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier for this request, useful for support and diagnostics."
          },
          "InvalidValues": {
            "type": "array",
            "description": "Field-level validation errors. Present on 400 validation failures.",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          }
        }
      },
      "EviNoticeSummary": {
        "type": "object",
        "description": "Summary of an EviNotice, returned in Query results and as the base of the Get response.",
        "properties": {
          "Id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier of the EviNotice."
          },
          "LinkedId": {
            "type": "string",
            "description": "ID of a related EviNotice, if applicable."
          },
          "Subject": {
            "type": "string",
            "description": "Subject of the certified notice."
          },
          "LookupKey": {
            "type": "string",
            "description": "The integrator-assigned lookup key."
          },
          "Issuer": {
            "type": "string",
            "description": "Legal name of the issuing organisation."
          },
          "IssuerEmail": {
            "type": "string",
            "description": "Email address of the issuer account."
          },
          "IssuerPhone": {
            "type": "string",
            "description": "Phone number of the issuer account, if set."
          },
          "RecipientAddress": {
            "type": "string",
            "description": "Email address where the delivery notification was sent."
          },
          "RecipientDisplayName": {
            "type": "string",
            "description": "Display name of the recipient."
          },
          "RecipientLegalName": {
            "type": "string",
            "description": "Legal name of the recipient."
          },
          "State": {
            "type": "string",
            "description": "Current step in the notice lifecycle.",
            "enum": [
              "Draft",
              "Submitted",
              "Processed",
              "Sent",
              "Dispatched",
              "Delivered",
              "Received",
              "Read",
              "Replied",
              "Closed",
              "Failed"
            ]
          },
          "Outcome": {
            "type": "string",
            "description": "Overall result of the certification process. When a notice is refused, the lifecycle completes with state `Closed` and outcome `Refused` — `Refused` does not appear as a lifecycle state. `Cancelled` may appear on legacy records; its trigger is not part of the standard integration flow.\n",
            "enum": [
              "None",
              "Certified",
              "Sent",
              "Delivered",
              "Received",
              "Read",
              "Accepted",
              "Rejected",
              "Failed",
              "Cancelled",
              "Refused"
            ]
          },
          "CreationDate": {
            "type": "string",
            "format": "date-time"
          },
          "LastUpdateDate": {
            "type": "string",
            "format": "date-time"
          },
          "SubmittedOn": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the submission was accepted by the platform."
          },
          "ProcessedOn": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the submission was validated and processing started."
          },
          "SentOn": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when transmission of the notification was confirmed — accepted by the recipient's mail system (email) or by the messaging operator (mobile channels). Always equal to or later than `DispatchedOn`."
          },
          "DispatchedOn": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the platform completed its checks and accepted responsibility for the communication. The notification is not yet sent, so `DispatchedOn` precedes `SentOn` and typically matches `ProcessedOn`."
          },
          "DeliveredOn": {
            "type": "string",
            "format": "date-time",
            "description": "Email: timestamp when delivery to the recipient's mail system was confirmed — best-effort, may be absent even when the message was delivered. Mobile channels: operator delivery confirmation."
          },
          "ReadOn": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the recipient accessed the protected content on the platform."
          },
          "RepliedOn": {
            "type": "string",
            "format": "date-time"
          },
          "ExpiredOn": {
            "type": "string",
            "format": "date-time"
          },
          "AcceptedOn": {
            "type": "string",
            "format": "date-time"
          },
          "RejectedOn": {
            "type": "string",
            "format": "date-time"
          },
          "FailedOn": {
            "type": "string",
            "format": "date-time"
          },
          "RefusedOn": {
            "type": "string",
            "format": "date-time"
          },
          "ArchivedOn": {
            "type": "string",
            "format": "date-time"
          },
          "TimeToLive": {
            "type": "integer",
            "description": "The TimeToLive value (in minutes) that was set at submission."
          },
          "AllowRefusal": {
            "type": "boolean",
            "description": "Whether the recipient was allowed to refuse the notice without opening it."
          },
          "NotaryProfile": {
            "type": "string",
            "description": "The notary certification profile applied."
          },
          "SourceChannel": {
            "type": "string",
            "description": "The channel through which the notice was submitted (e.g. API, portal)."
          },
          "OnlineRetentionPeriod": {
            "type": "integer",
            "description": "Number of years the notice and its evidence remain accessible online."
          },
          "NotaryRetention": {
            "type": "boolean",
            "description": "Whether the evidence is retained by a notary for long-term legal storage."
          },
          "ReceivedOn": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the recipient opened the access link and reached the delivery page on the platform."
          },
          "From": {
            "type": "string",
            "description": "From address used in the delivery notification email."
          },
          "CostCentre": {
            "type": "string",
            "description": "Cost-centre label recorded with the transaction for internal billing allocation."
          },
          "CommitmentComments": {
            "type": "string",
            "description": "Free-text comment provided by the recipient when accepting or rejecting the notice."
          },
          "AffidavitKinds": {
            "type": "array",
            "description": "The affidavit event types configured at submission.",
            "items": {
              "type": "string"
            }
          },
          "Reminders": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EviNoticeReminders"
              }
            ],
            "description": "Reminder configuration as set at submission. Absent when no reminders were configured."
          },
          "NotificationChannels": {
            "type": "array",
            "description": "Channels used to deliver the notification to the recipient.",
            "items": {
              "type": "string",
              "enum": [
                "SMS",
                "WhatsApp",
                "RCS",
                "Email"
              ]
            }
          },
          "MobilePinChannels": {
            "type": "array",
            "description": "PIN delivery channel groups as configured at submission. Each element is an array of channels tried in parallel for that attempt.\n",
            "items": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "SMS",
                  "WhatsApp",
                  "RCS"
                ]
              }
            }
          }
        }
      },
      "EviNoticeAffidavitInfo": {
        "type": "object",
        "description": "Metadata for a single generated affidavit.",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Unique identifier of the affidavit."
          },
          "Kind": {
            "type": "string",
            "description": "The evidence event this affidavit certifies (e.g. `Submitted`, `DeliveryResult`)."
          },
          "Description": {
            "type": "string",
            "description": "Human-readable description of the affidavit."
          },
          "CreationDate": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the affidavit was generated."
          },
          "Length": {
            "type": "integer",
            "description": "Size of the affidavit file in bytes."
          }
        }
      },
      "EviNoticeAttachmentInfo": {
        "type": "object",
        "description": "Metadata for a single attachment associated with an EviNotice.",
        "properties": {
          "Id": {
            "type": "string",
            "description": "Unique identifier of the attachment."
          },
          "Filename": {
            "type": "string",
            "description": "File name including extension."
          },
          "MimeType": {
            "type": "string",
            "description": "MIME type of the attachment."
          },
          "Length": {
            "type": "integer",
            "description": "Size of the attachment in bytes."
          },
          "Hash": {
            "type": "string",
            "description": "Cryptographic hash of the attachment content, used for integrity verification."
          },
          "IncludeOnAffidavits": {
            "type": "boolean",
            "description": "Whether this attachment is referenced in generated affidavits."
          }
        }
      },
      "EviNoticeGetResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/EviNoticeSummary"
          },
          {
            "type": "object",
            "properties": {
              "SiteName": {
                "type": "string",
                "description": "Name of the Namirial Notify site under which this notice was submitted."
              },
              "XmissionResult": {
                "type": "boolean",
                "nullable": true,
                "description": "Whether the delivery notification email or SMS was successfully transmitted."
              },
              "XmissionSummary": {
                "type": "string",
                "description": "Human-readable summary of the transmission result (e.g. bounce or SMTP reply code)."
              },
              "CustomLayoutLogoUrl": {
                "type": "string",
                "format": "uri",
                "description": "Custom logo URL that was configured at submission."
              },
              "Affidavits": {
                "type": "array",
                "description": "Metadata for each generated affidavit. Present when IncludeAffidavits is true.",
                "items": {
                  "$ref": "#/components/schemas/EviNoticeAffidavitInfo"
                }
              },
              "Attachments": {
                "type": "array",
                "description": "Metadata for each attachment. Present when IncludeAttachments is true.",
                "items": {
                  "$ref": "#/components/schemas/EviNoticeAttachmentInfo"
                }
              }
            }
          }
        ]
      },
      "EviNoticeQueryRequest": {
        "type": "object",
        "description": "Filters and pagination controls for querying EviNotices. All fields are optional.",
        "properties": {
          "Limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "default": 100,
            "description": "Maximum number of results to return per page."
          },
          "Owner": {
            "type": "string",
            "format": "email",
            "description": "Filter by the email address of the account that submitted the notices."
          },
          "LookupKeys": {
            "type": "array",
            "description": "Filter by one or more integrator-assigned lookup keys.",
            "items": {
              "type": "string"
            }
          },
          "LinkedId": {
            "type": "string",
            "format": "uuid",
            "description": "Filter by linked ID."
          },
          "State": {
            "type": "string",
            "description": "Filter by current notice state.",
            "enum": [
              "Draft",
              "Submitted",
              "Processed",
              "Sent",
              "Dispatched",
              "Delivered",
              "Received",
              "Read",
              "Replied",
              "Closed",
              "Failed"
            ]
          },
          "Outcome": {
            "type": "string",
            "description": "Filter by certification outcome.",
            "enum": [
              "None",
              "Certified",
              "Sent",
              "Delivered",
              "Received",
              "Read",
              "Accepted",
              "Rejected",
              "Failed",
              "Cancelled",
              "Refused"
            ]
          },
          "Cursor": {
            "type": "string",
            "description": "Opaque pagination cursor returned in the previous response. Pass this value to retrieve the next page."
          }
        }
      },
      "EviNoticeQueryResponse": {
        "type": "object",
        "description": "Paginated list of EviNotices matching the query filters.",
        "properties": {
          "Cursor": {
            "type": "string",
            "description": "Opaque cursor for the next page of results. Pass this value as Cursor in a subsequent request to retrieve the next page. Absent when there are no further results.\n"
          },
          "Results": {
            "type": "array",
            "description": "The list of EviNotice summaries matching the query.",
            "items": {
              "$ref": "#/components/schemas/EviNoticeSummary"
            }
          }
        }
      },
      "EviNoticeAffidavitRequestBody": {
        "type": "object",
        "required": [
          "Id"
        ],
        "properties": {
          "Id": {
            "type": "string",
            "format": "uuid",
            "description": "The unique ID of the EviNotice, as returned at submission."
          },
          "IncludeBody": {
            "type": "boolean",
            "description": "Include the notice body in the affidavit."
          },
          "IncludeAttachments": {
            "type": "boolean",
            "description": "Include notice attachments in the affidavit. Attachments must have been submitted with IncludeOnAffidavits set to true."
          },
          "IncludeEvents": {
            "type": "boolean",
            "description": "Include detailed event information in the affidavit."
          }
        }
      },
      "EviNoticeAffidavitRequestResponse": {
        "type": "object",
        "properties": {
          "RequestId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier for this affidavit request. Use it to correlate the subsequent AffidavitPublished callback."
          }
        }
      },
      "EviNoticeBatchSummary": {
        "type": "object",
        "description": "Summary of a notice batch, returned in batch query results.",
        "properties": {
          "Id": {
            "type": "string",
            "format": "uuid"
          },
          "State": {
            "type": "string",
            "enum": [
              "Draft",
              "Submitted",
              "Scheduled",
              "Processing",
              "Processed",
              "Invalid",
              "Failed"
            ]
          },
          "Submitter": {
            "type": "string"
          },
          "SubmitterId": {
            "type": "string"
          },
          "SiteId": {
            "type": "string",
            "format": "uuid"
          },
          "SiteName": {
            "type": "string"
          },
          "Description": {
            "type": "string"
          },
          "CreationDate": {
            "type": "string",
            "format": "date-time"
          },
          "ScheduledFor": {
            "type": "string",
            "format": "date-time",
            "description": "Scheduled execution date and time in UTC."
          },
          "StartedOn": {
            "type": "string",
            "format": "date-time"
          },
          "ProcessedOn": {
            "type": "string",
            "format": "date-time"
          },
          "LastUpdated": {
            "type": "string",
            "format": "date-time"
          },
          "TotalCount": {
            "type": "integer"
          },
          "TotalSent": {
            "type": "integer"
          },
          "TotalFailed": {
            "type": "integer"
          }
        }
      },
      "EviNoticeBatchesQueryResponse": {
        "type": "object",
        "properties": {
          "Cursor": {
            "type": "string",
            "description": "Opaque cursor for the next page. Pass it back as `Cursor` to retrieve more results."
          },
          "HasMoreResults": {
            "type": "boolean"
          },
          "Results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EviNoticeBatchSummary"
            }
          }
        }
      },
      "EviNoticeBatchCreateRequest": {
        "type": "object",
        "required": [
          "Description"
        ],
        "properties": {
          "Description": {
            "type": "string",
            "maxLength": 255,
            "description": "Human-readable description of the batch."
          }
        }
      },
      "EviNoticeBatchCreateResponse": {
        "type": "object",
        "properties": {
          "BatchId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier of the created batch. Use it in all other batch operations."
          }
        }
      },
      "EviNoticeAffidavitKindValue": {
        "type": "string",
        "enum": [
          "Submitted",
          "SubmittedAdvanced",
          "Dispatched",
          "TransmissionResult",
          "DeliveryResult",
          "Received",
          "Read",
          "Committed",
          "CommittedAdvanced",
          "Refused",
          "Closed",
          "ClosedAdvanced",
          "Event",
          "Complete",
          "CompleteAdvanced",
          "OnDemand",
          "ContentDownload",
          "Failed"
        ]
      },
      "EviNoticePushNotificationValue": {
        "type": "string",
        "enum": [
          "Processed",
          "Sent",
          "Dispatched",
          "Delivered",
          "Received",
          "Read",
          "Replied",
          "Failed",
          "Closed",
          "AffidavitPublished"
        ]
      },
      "EviNoticeBatchTemplate": {
        "type": "object",
        "description": "The notice template configured for the batch (the per-notice settings applied to every recipient).",
        "properties": {
          "Subject": {
            "type": "string"
          },
          "Body": {
            "type": "string",
            "description": "HTML body of the notice."
          },
          "IssuerName": {
            "type": "string"
          },
          "From": {
            "type": "string"
          },
          "DisableSenderHeader": {
            "type": "boolean"
          },
          "ReplyTo": {
            "type": "string"
          },
          "CostCentre": {
            "type": "string"
          },
          "TimeToLive": {
            "type": "integer"
          },
          "CertificationLevel": {
            "type": "string",
            "enum": [
              "None",
              "Standard",
              "Advanced",
              "QERDS",
              "Standard_CO",
              "Standard_CR",
              "Standard_EC",
              "Standard_EU",
              "Standard_MX",
              "Standard_PE",
              "Advanced_CO",
              "Advanced_CR",
              "Advanced_EC",
              "Advanced_EU",
              "Advanced_MX",
              "Advanced_PE",
              "QERDS_ES",
              "QERDS_IT"
            ]
          },
          "LtaStorage": {
            "type": "boolean",
            "description": "Enables post-close LTA storage for every notice generated from the batch. Each notice is stored after its own tracking reaches `Closed`. Requires LTA to be enabled for the site.\n"
          },
          "AffidavitKinds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EviNoticeAffidavitKindValue"
            }
          },
          "Language": {
            "type": "string"
          },
          "AffidavitLanguage": {
            "type": "string"
          },
          "OnlineRetentionPeriod": {
            "type": "integer"
          },
          "PushNotificationUrl": {
            "type": "string",
            "format": "uri"
          },
          "PushNotificationFilter": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EviNoticePushNotificationValue"
            }
          },
          "PushNotificationExtraData": {
            "type": "string"
          },
          "CommitmentOptions": {
            "type": "string",
            "enum": [
              "Disabled",
              "Accept",
              "Reject",
              "AcceptOrReject"
            ]
          },
          "CommitmentCommentsAllowed": {
            "type": "boolean"
          },
          "RejectReasons": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "AcceptReasons": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "RequireRejectReason": {
            "type": "boolean"
          },
          "RequireAcceptReason": {
            "type": "boolean"
          },
          "DeliveryAppearance": {
            "type": "string",
            "enum": [
              "Certified",
              "AsIs"
            ]
          },
          "AllowRefusal": {
            "type": "boolean"
          },
          "OwnerNotificationTemplate": {
            "type": "string"
          },
          "Channel": {
            "type": "string"
          }
        }
      },
      "EviNoticeBatchGetResponse": {
        "type": "object",
        "description": "Full state of a notice batch, including its configured notice template and processing progress.",
        "properties": {
          "Id": {
            "type": "string",
            "format": "uuid"
          },
          "State": {
            "type": "string",
            "enum": [
              "Draft",
              "Submitted",
              "Scheduled",
              "Processing",
              "Processed",
              "Invalid",
              "Failed"
            ]
          },
          "Submitter": {
            "type": "string",
            "description": "Display name of the user who created the batch."
          },
          "SubmitterId": {
            "type": "string"
          },
          "SiteName": {
            "type": "string"
          },
          "SiteId": {
            "type": "string",
            "format": "uuid"
          },
          "Description": {
            "type": "string"
          },
          "CreationDate": {
            "type": "string",
            "format": "date-time"
          },
          "ScheduledFor": {
            "type": "string",
            "format": "date-time",
            "description": "Scheduled execution date and time in UTC."
          },
          "StartedOn": {
            "type": "string",
            "format": "date-time"
          },
          "ProcessedOn": {
            "type": "string",
            "format": "date-time"
          },
          "SubmittedOn": {
            "type": "string",
            "format": "date-time"
          },
          "InvalidOn": {
            "type": "string",
            "format": "date-time"
          },
          "LastUpdated": {
            "type": "string",
            "format": "date-time"
          },
          "TotalCount": {
            "type": "integer",
            "description": "Total number of recipients in the batch."
          },
          "EviNotice": {
            "$ref": "#/components/schemas/EviNoticeBatchTemplate"
          },
          "BatchPushNotificationUrl": {
            "type": "string",
            "format": "uri"
          },
          "SentCount": {
            "type": "integer",
            "description": "Number of notices dispatched so far."
          },
          "FailedCount": {
            "type": "integer",
            "description": "Number of notices that failed."
          },
          "ProgressPercentage": {
            "type": "number",
            "format": "float",
            "description": "Processing progress as a percentage (0–100)."
          },
          "ExtraFields": {
            "type": "array",
            "description": "Names of the custom recipient columns detected in the uploaded CSV.",
            "items": {
              "type": "string"
            }
          },
          "InvalidReason": {
            "type": "string",
            "description": "Explanation when the batch is in the `Invalid` state."
          },
          "CsvId": {
            "type": "string",
            "format": "uuid"
          },
          "Outcome": {
            "type": "string"
          }
        }
      },
      "EviNoticeBatchPatchRequest": {
        "type": "object",
        "description": "Batch metadata and notice template options. All fields are optional; only supplied fields are changed.",
        "properties": {
          "IssuerName": {
            "type": "string"
          },
          "Subject": {
            "type": "string",
            "description": "Subject line of the notice. (The body is set with the Body endpoint.)"
          },
          "ScheduledDate": {
            "type": "string",
            "format": "date-time",
            "description": "Scheduled execution date and time in UTC."
          },
          "State": {
            "type": "string",
            "description": "Transitions the batch to a new state (for example, `Submitted` to start processing).",
            "enum": [
              "Draft",
              "Submitted",
              "Scheduled",
              "Processing",
              "Processed",
              "Invalid",
              "Failed"
            ]
          },
          "Description": {
            "type": "string",
            "maxLength": 255
          },
          "From": {
            "type": "string"
          },
          "DisableSenderHeader": {
            "type": "boolean"
          },
          "ReplyTo": {
            "type": "string"
          },
          "TimeToLive": {
            "type": "integer",
            "description": "Delivery/accessibility window in minutes."
          },
          "CostCentre": {
            "type": "string"
          },
          "CertificationLevel": {
            "type": "string",
            "description": "Certification level applied to every notice in the batch.",
            "enum": [
              "None",
              "Standard",
              "Advanced",
              "QERDS",
              "Standard_CO",
              "Standard_CR",
              "Standard_EC",
              "Standard_EU",
              "Standard_MX",
              "Standard_PE",
              "Advanced_CO",
              "Advanced_CR",
              "Advanced_EC",
              "Advanced_EU",
              "Advanced_MX",
              "Advanced_PE",
              "QERDS_ES",
              "QERDS_IT"
            ]
          },
          "AffidavitKinds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EviNoticeAffidavitKindValue"
            }
          },
          "Language": {
            "type": "string",
            "description": "BCP 47 language tag for the hosted notice UI."
          },
          "AffidavitLanguage": {
            "type": "string",
            "description": "BCP 47 language tag for generated affidavits."
          },
          "OnlineRetentionPeriod": {
            "type": "integer"
          },
          "LtaStorage": {
            "type": "boolean",
            "description": "Enables post-close LTA storage for every notice generated from the batch. Each notice is stored after its own tracking reaches `Closed`. Requires LTA to be enabled for the site.\n"
          },
          "PushNotificationUrl": {
            "type": "string",
            "format": "uri",
            "description": "Push notification URL propagated to every notice generated from the batch — it becomes each notice's own callback URL for the normal per-notice lifecycle callbacks. Alias of `BatchPushNotificationUrl` (both set the same value; if both are supplied, this one is applied last). The batch itself has no separate lifecycle callback — track batch progress with `GET .../{BatchId}`.\n"
          },
          "PushNotificationFilter": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EviNoticePushNotificationValue"
            }
          },
          "PushNotificationExtraData": {
            "type": "string"
          },
          "CommitmentOptions": {
            "type": "string",
            "enum": [
              "Disabled",
              "Accept",
              "Reject",
              "AcceptOrReject"
            ]
          },
          "CommitmentCommentsAllowed": {
            "type": "boolean"
          },
          "RejectReasons": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "AcceptReasons": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "RequireRejectReason": {
            "type": "boolean"
          },
          "RequireAcceptReason": {
            "type": "boolean"
          },
          "DeliveryAppearance": {
            "type": "string",
            "enum": [
              "Certified",
              "AsIs"
            ]
          },
          "BatchPushNotificationUrl": {
            "type": "string",
            "format": "uri",
            "description": "Alias of `PushNotificationUrl` — both set the same value. It is propagated to every notice generated from the batch as that notice's own callback URL; the batch has no separate lifecycle callback. Track batch progress with `GET .../{BatchId}`.\n"
          },
          "AllowRefusal": {
            "type": "boolean"
          },
          "OwnerNotificationTemplate": {
            "type": "string"
          },
          "Channel": {
            "type": "string",
            "description": "Notification channel for the batch."
          }
        }
      },
      "EviNoticeBatchRecipient": {
        "type": "object",
        "properties": {
          "LookupKey": {
            "type": "string"
          },
          "DisplayName": {
            "type": "string"
          },
          "LegalName": {
            "type": "string"
          },
          "Address": {
            "type": "string",
            "description": "Recipient email address or mobile number."
          },
          "ExtraFields": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Custom per-recipient fields supplied as `*`-prefixed CSV columns."
          },
          "CustodyChallenge": {
            "type": "string"
          },
          "CustodyChallengeResponse": {
            "type": "string"
          },
          "DeliveryOtpChannel": {
            "type": "string"
          },
          "DeliveryOtpAddress": {
            "type": "string"
          },
          "EvidenceUniqueId": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the generated EviNotice for this recipient, once the batch has been processed."
          },
          "Channel": {
            "type": "string"
          },
          "DeliveryChallenge": {
            "type": "string"
          },
          "DeliveryChallengeResponse": {
            "type": "string"
          }
        }
      },
      "EviNoticeBatchRecipientsQueryResponse": {
        "type": "object",
        "properties": {
          "Cursor": {
            "type": "string",
            "description": "Opaque cursor for the next page of recipients."
          },
          "Results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EviNoticeBatchRecipient"
            }
          }
        }
      },
      "EviNoticeBatchAttachmentInfo": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "format": "uuid"
          },
          "DisplayName": {
            "type": "string"
          },
          "FileName": {
            "type": "string"
          },
          "MimeType": {
            "type": "string"
          },
          "Size": {
            "type": "integer",
            "description": "Size of the attachment in bytes."
          },
          "ContentEncoding": {
            "type": "string"
          },
          "ContentId": {
            "type": "string"
          }
        }
      },
      "EviNoticeBatchAttachmentPostResponse": {
        "type": "object",
        "properties": {
          "AttachmentId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier of the added attachment."
          }
        }
      },
      "EviMailRecipient": {
        "type": "object",
        "required": [
          "EmailAddress"
        ],
        "properties": {
          "LegalName": {
            "type": "string",
            "description": "Optional legal name of the recipient."
          },
          "EmailAddress": {
            "type": "string",
            "format": "email"
          }
        }
      },
      "EviMailCarbonCopy": {
        "type": "object",
        "properties": {
          "Name": {
            "type": "string",
            "description": "Optional name of the carbon copy recipient."
          },
          "EmailAddress": {
            "type": "string",
            "format": "email"
          }
        }
      },
      "EviMailAttachment": {
        "type": "object",
        "properties": {
          "ContentId": {
            "type": "string",
            "description": "Attachment content identifier."
          },
          "DisplayName": {
            "type": "string"
          },
          "Filename": {
            "type": "string"
          },
          "MimeType": {
            "type": "string",
            "description": "Attachment MIME type."
          },
          "ContentDescription": {
            "type": "string"
          },
          "ContentDisposition": {
            "type": "string"
          },
          "ContentLocation": {
            "type": "string"
          },
          "ContentEncoding": {
            "type": "string"
          },
          "Data": {
            "type": "string",
            "description": "Base64-encoded file content."
          },
          "Attributes": {
            "type": "array",
            "description": "Attachment key-value attributes. Use the `IncludeOnAffidavits` key with value `\"true\"` to reference the attachment in generated affidavits (PDF attachments only; not valid with basic affidavit content).\n",
            "items": {
              "type": "object",
              "properties": {
                "Key": {
                  "type": "string"
                },
                "Value": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "EviMailOptions": {
        "type": "object",
        "properties": {
          "CertificationLevel": {
            "type": "string",
            "description": "Certification level for EviMail v1. Supported values include the bare `Standard` and `Advanced` levels and their regional variants, such as `Standard_EU` or `Advanced_EU`. Availability depends on the account.\n",
            "enum": [
              "Standard",
              "Advanced",
              "Standard_CO",
              "Standard_CR",
              "Standard_EC",
              "Standard_EU",
              "Standard_MX",
              "Standard_PE",
              "Advanced_CO",
              "Advanced_CR",
              "Advanced_EC",
              "Advanced_EU",
              "Advanced_MX",
              "Advanced_PE"
            ]
          },
          "TimeToLive": {
            "type": "integer",
            "description": "Minutes."
          },
          "DeliveryAppearance": {
            "type": "string",
            "description": "Controls the visual appearance of the delivery notification page. Accepted values: `Certified` (default branded certified-delivery appearance) or `AsIs` (plain appearance without certification branding).\n",
            "enum": [
              "Certified",
              "AsIs"
            ]
          },
          "Language": {
            "type": "string",
            "enum": [
              "en",
              "es",
              "ca",
              "it",
              "pt",
              "pt-BR",
              "fr",
              "de",
              "ro"
            ]
          },
          "AffidavitLanguage": {
            "type": "string",
            "enum": [
              "en",
              "es",
              "ca",
              "it",
              "pt",
              "pt-BR",
              "fr",
              "de",
              "ro",
              "el"
            ]
          },
          "AffidavitKinds": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "Submitted",
                "SubmittedAdvanced",
                "TransmissionResult",
                "DeliveryResult",
                "Read",
                "Committed",
                "CommittedAdvanced",
                "Closed",
                "ClosedAdvanced",
                "Complete",
                "CompleteAdvanced",
                "OnDemand",
                "Event",
                "Failed"
              ]
            }
          },
          "CommitmentOptions": {
            "type": "string",
            "enum": [
              "Disabled",
              "Accept",
              "Reject",
              "AcceptOrReject"
            ]
          },
          "CommitmentCommentsAllowed": {
            "type": "boolean"
          },
          "PushNotificationFilter": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "Ready",
                "Sent",
                "Dispatched",
                "Delivered",
                "Read",
                "Replied",
                "Failed",
                "Closed",
                "AffidavitPublished"
              ]
            }
          },
          "PushNotificationUrl": {
            "type": "string",
            "format": "uri"
          },
          "PushNotificationExtraData": {
            "type": "string"
          },
          "EvidenceAccessControlMethod": {
            "type": "string",
            "description": "Controls how recipients access the evidence record. Supported values: `Public`, `Challenge`, `AutoChallenge`. When omitted, the account's configured default method applies.\n",
            "enum": [
              "AutoChallenge",
              "Public",
              "Challenge"
            ]
          },
          "EvidenceAccessControlChallenge": {
            "type": "string"
          },
          "EvidenceAccessControlChallengeResponse": {
            "type": "string"
          },
          "RequireAcceptReason": {
            "type": "boolean",
            "description": "Requires CommitmentCommentsAllowed true and an accept-capable commitment mode."
          },
          "AcceptReasons": {
            "type": "array",
            "description": "Requires CommitmentCommentsAllowed true and an accept-capable commitment mode.",
            "items": {
              "type": "string"
            }
          },
          "RequireRejectReason": {
            "type": "boolean",
            "description": "Requires CommitmentCommentsAllowed true and a reject-capable commitment mode."
          },
          "RejectReasons": {
            "type": "array",
            "description": "Requires CommitmentCommentsAllowed true and a reject-capable commitment mode.",
            "items": {
              "type": "string"
            }
          },
          "OnlineRetentionPeriod": {
            "type": "integer"
          },
          "CostCentre": {
            "type": "string"
          },
          "OwnerNotificationTemplate": {
            "type": "string",
            "description": "Identifier of an enabled custom template used for the issuer's status notification email. See [Using communication templates from the API](../../dev/templates.md).\n"
          },
          "OwnerNotificationTemplateValues": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Key-value pairs supplying values for the user variables declared in OwnerNotificationTemplate."
          },
          "CustomLayoutLogoUrl": {
            "type": "string",
            "format": "uri",
            "description": "URL of a custom logo to display in the certified email layout."
          },
          "DisablePlatformReferences": {
            "type": "boolean",
            "description": "When true, internal platform references are suppressed in the generated affidavits."
          },
          "LtaStorage": {
            "type": "boolean",
            "description": "When true, the evidence for this transaction is stored in Namirial Archive during post-close processing after tracking reaches `Closed`. Requires LTA to be enabled for the site. `OnlineRetentionPeriod` separately controls online accessibility.\n"
          },
          "NotaryRetentionPeriod": {
            "type": "integer",
            "description": "Notarial deposit retention period in years. Requires NotaryProfile to be set."
          },
          "NotaryProfile": {
            "type": "string",
            "description": "The notary profile identifier to use for notarial deposit."
          }
        }
      },
      "EviMailSubmitRequest": {
        "type": "object",
        "required": [
          "Subject",
          "Body",
          "Recipient"
        ],
        "properties": {
          "Subject": {
            "type": "string"
          },
          "Body": {
            "type": "string"
          },
          "LookupKey": {
            "type": "string"
          },
          "IssuerName": {
            "type": "string"
          },
          "From": {
            "type": "string",
            "format": "email"
          },
          "ReplyTo": {
            "type": "string",
            "format": "email"
          },
          "DisableSenderHeader": {
            "type": "boolean"
          },
          "Recipient": {
            "$ref": "#/components/schemas/EviMailRecipient"
          },
          "CarbonCopy": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EviMailCarbonCopy"
            }
          },
          "Attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EviMailAttachment"
            }
          },
          "Options": {
            "$ref": "#/components/schemas/EviMailOptions"
          }
        }
      },
      "EviMailSubmitResponse": {
        "type": "object",
        "required": [
          "eviId"
        ],
        "properties": {
          "eviId": {
            "type": "string"
          }
        }
      },
      "EviMailError": {
        "type": "object",
        "description": "V1 service-style error response returned by EviMail Submit on 400.",
        "properties": {
          "responseStatus": {
            "type": "object",
            "properties": {
              "errorCode": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "errors": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "errorCode": {
                      "type": "string"
                    },
                    "fieldName": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "EviMailAffidavitInfo": {
        "type": "object",
        "description": "Affidavit metadata and optional legacy Base64 content associated with a certified email.",
        "properties": {
          "uniqueId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier of the affidavit."
          },
          "date": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the affidavit was generated."
          },
          "evidenceUniqueId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier of the email this affidavit belongs to."
          },
          "partyUniqueId": {
            "type": "string",
            "format": "uuid",
            "description": "Identifier of the related delivery/party, when applicable."
          },
          "bytes": {
            "type": "string",
            "format": "byte",
            "nullable": true,
            "deprecated": true,
            "description": "Base64-encoded affidavit PDF. Populated only when the deprecated IncludeAffidavitBlobs option is true."
          },
          "description": {
            "type": "string",
            "description": "Human-readable description of the affidavit."
          },
          "kind": {
            "type": "string",
            "description": "Technical identifier of the affidavit kind, for example EviMail:Complete."
          },
          "additionalData": {
            "type": "object",
            "description": "Additional affidavit metadata as key-value pairs.",
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "EviMailAttachmentInfo": {
        "type": "object",
        "description": "Metadata for a single attachment associated with a certified email.",
        "properties": {
          "uniqueId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier of the attachment."
          },
          "evidenceUniqueId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier of the email this attachment belongs to."
          },
          "filename": {
            "type": "string",
            "description": "File name including extension."
          },
          "displayName": {
            "type": "string",
            "description": "Human-readable label of the attachment."
          },
          "mimeType": {
            "type": "string",
            "description": "MIME type of the attachment."
          },
          "contentId": {
            "type": "string",
            "description": "Content-ID used to reference the attachment inline in the body."
          },
          "contentDescription": {
            "type": "string",
            "description": "Optional human-readable description of the attachment."
          },
          "contentDisposition": {
            "type": "string",
            "description": "Content-Disposition of the attachment (e.g. inline or attachment)."
          },
          "contentLocation": {
            "type": "string",
            "description": "Content-Location header value for the attachment."
          },
          "contentEncoding": {
            "type": "string",
            "description": "Encoding of the attachment content."
          },
          "contentLength": {
            "type": "integer",
            "description": "Size of the attachment in bytes."
          },
          "hash": {
            "type": "string",
            "description": "Cryptographic hash of the attachment content."
          }
        }
      },
      "EviMailQueryResult": {
        "type": "object",
        "description": "Individual query result object. The nested `affidavits` and `attachments` arrays are included only when the corresponding include flags are set on the request.",
        "properties": {
          "uniqueId": {
            "type": "string",
            "description": "Unique identifier (EviId) of the certified email."
          },
          "linkedId": {
            "type": "string",
            "format": "uuid",
            "description": "Identifier of a related certified email, when this message is linked to another."
          },
          "lookupKey": {
            "type": "string",
            "description": "Locator assigned by the issuer at submission."
          },
          "issuer": {
            "type": "object",
            "properties": {
              "legalName": {
                "type": "string"
              },
              "emailAddress": {
                "type": "string",
                "format": "email"
              }
            }
          },
          "recipient": {
            "type": "object",
            "properties": {
              "legalName": {
                "type": "string"
              },
              "emailAddress": {
                "type": "string",
                "format": "email"
              }
            }
          },
          "carbonCopy": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "emailAddress": {
                  "type": "string",
                  "format": "email"
                }
              }
            }
          },
          "subject": {
            "type": "string"
          },
          "body": {
            "type": "string",
            "description": "HTML body of the email."
          },
          "state": {
            "type": "string",
            "enum": [
              "Draft",
              "New",
              "Ready",
              "Sent",
              "Dispatched",
              "Delivered",
              "Read",
              "Replied",
              "Closed",
              "Failed"
            ]
          },
          "outcome": {
            "type": "string",
            "enum": [
              "None",
              "Certified",
              "Sent",
              "Delivered",
              "Read",
              "Accepted",
              "Rejected",
              "Failed"
            ]
          },
          "acceptOrRejectComments": {
            "type": "string",
            "description": "Comments provided by the recipient during acceptance or rejection."
          },
          "creationDate": {
            "type": "string",
            "format": "date-time"
          },
          "lastStateChangeDate": {
            "type": "string",
            "format": "date-time"
          },
          "newOn": {
            "type": "string",
            "format": "date-time"
          },
          "readyOn": {
            "type": "string",
            "format": "date-time"
          },
          "sentOn": {
            "type": "string",
            "format": "date-time"
          },
          "dispatchedOn": {
            "type": "string",
            "format": "date-time"
          },
          "deliveredOn": {
            "type": "string",
            "format": "date-time"
          },
          "readOn": {
            "type": "string",
            "format": "date-time"
          },
          "repliedOn": {
            "type": "string",
            "format": "date-time"
          },
          "acceptedOn": {
            "type": "string",
            "format": "date-time"
          },
          "rejectedOn": {
            "type": "string",
            "format": "date-time"
          },
          "failedOn": {
            "type": "string",
            "format": "date-time"
          },
          "expiredOn": {
            "type": "string",
            "format": "date-time"
          },
          "timeToLive": {
            "type": "integer",
            "description": "Minutes before the message tracking closes."
          },
          "onlineRetentionPeriod": {
            "type": "integer",
            "description": "Years of online retention."
          },
          "notaryRetentionPeriod": {
            "type": "integer",
            "description": "Years of notarial custody, when notarial retention is configured."
          },
          "notaryProfile": {
            "type": "string",
            "description": "Identifier of the notary profile applied for custody."
          },
          "sourceChannel": {
            "type": "string",
            "enum": [
              "Web",
              "Api",
              "Smtp"
            ]
          },
          "allowRefusal": {
            "type": "boolean",
            "description": "Whether the recipient was allowed to refuse the message without opening it."
          },
          "costCentre": {
            "type": "string"
          },
          "affidavitKinds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "xmissionResult": {
            "type": "boolean",
            "description": "Whether the transmission was successful."
          },
          "xmissionSummary": {
            "type": "string",
            "description": "Human-readable summary of the transmission result."
          },
          "from": {
            "type": "string",
            "description": "From header value used in the email."
          },
          "customLayoutLogoUrl": {
            "type": "string",
            "format": "uri"
          },
          "siteName": {
            "type": "string"
          },
          "affidavits": {
            "type": "array",
            "description": "Affidavit entries. Present when IncludeAffidavits is true; bytes is populated only when the deprecated IncludeAffidavitBlobs option is also true.",
            "items": {
              "$ref": "#/components/schemas/EviMailAffidavitInfo"
            }
          },
          "attachments": {
            "type": "array",
            "description": "Attachment metadata. Present only when IncludeAttachments is true on the request.",
            "items": {
              "$ref": "#/components/schemas/EviMailAttachmentInfo"
            }
          }
        },
        "additionalProperties": true
      },
      "EviMailQueryResponse": {
        "type": "object",
        "properties": {
          "totalMatches": {
            "type": "integer"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EviMailQueryResult"
            }
          }
        }
      },
      "EviMailAffidavitRequest": {
        "type": "object",
        "required": [
          "UniqueId"
        ],
        "properties": {
          "UniqueId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique ID of the EviMail to generate an affidavit for."
          },
          "IncludeBody": {
            "type": "boolean",
            "description": "Include the email body in the affidavit."
          },
          "IncludeAttachments": {
            "type": "boolean",
            "description": "Include email attachments in the affidavit. Attachments must have been submitted with IncludeOnAffidavits true."
          },
          "IncludeEvents": {
            "type": "boolean",
            "description": "Include detailed event information in the affidavit."
          }
        }
      },
      "EviMailAffidavitResponse": {
        "type": "object",
        "required": [
          "requestId"
        ],
        "properties": {
          "requestId": {
            "type": "string"
          }
        }
      },
      "EviMailAffidavitError": {
        "type": "object",
        "properties": {
          "responseStatus": {
            "type": "object",
            "properties": {
              "errorCode": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "errors": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        }
      },
      "EviMailBatchSummary": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "format": "uuid"
          },
          "State": {
            "type": "string",
            "enum": [
              "Draft",
              "Submitted",
              "Scheduled",
              "Processing",
              "Processed",
              "Invalid",
              "Failed"
            ]
          },
          "Submitter": {
            "type": "string"
          },
          "SubmitterId": {
            "type": "string"
          },
          "SiteId": {
            "type": "string",
            "format": "uuid"
          },
          "SiteName": {
            "type": "string"
          },
          "Description": {
            "type": "string"
          },
          "CreationDate": {
            "type": "string",
            "format": "date-time"
          },
          "ScheduledFor": {
            "type": "string",
            "format": "date-time",
            "description": "Scheduled execution date and time in UTC."
          },
          "StartedOn": {
            "type": "string",
            "format": "date-time"
          },
          "ProcessedOn": {
            "type": "string",
            "format": "date-time"
          },
          "LastUpdated": {
            "type": "string",
            "format": "date-time"
          },
          "TotalCount": {
            "type": "integer"
          },
          "TotalSent": {
            "type": "integer"
          },
          "TotalFailed": {
            "type": "integer"
          }
        }
      },
      "EviMailBatchesQueryResponse": {
        "type": "object",
        "properties": {
          "Cursor": {
            "type": "string"
          },
          "HasMoreResults": {
            "type": "boolean"
          },
          "Results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EviMailBatchSummary"
            }
          }
        }
      },
      "EviMailBatchCreateRequest": {
        "type": "object",
        "required": [
          "Description"
        ],
        "properties": {
          "Description": {
            "type": "string",
            "maxLength": 255,
            "description": "Human-readable description of the batch."
          }
        }
      },
      "EviMailBatchCreateResponse": {
        "type": "object",
        "properties": {
          "BatchId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier of the created batch. Use it in all other batch operations."
          }
        }
      },
      "EviMailBatchCertificationLevelValue": {
        "type": "string",
        "enum": [
          "Standard",
          "Advanced",
          "Standard_CO",
          "Standard_CR",
          "Standard_EC",
          "Standard_EU",
          "Standard_MX",
          "Standard_PE",
          "Advanced_CO",
          "Advanced_CR",
          "Advanced_EC",
          "Advanced_EU",
          "Advanced_MX",
          "Advanced_PE"
        ]
      },
      "EviMailBatchAffidavitKindValue": {
        "type": "string",
        "enum": [
          "Submitted",
          "SubmittedAdvanced",
          "TransmissionResult",
          "DeliveryResult",
          "Read",
          "Committed",
          "CommittedAdvanced",
          "Closed",
          "ClosedAdvanced",
          "Complete",
          "CompleteAdvanced",
          "OnDemand",
          "Event",
          "Failed"
        ]
      },
      "EviMailBatchPushNotificationValue": {
        "type": "string",
        "enum": [
          "Ready",
          "Sent",
          "Dispatched",
          "Delivered",
          "Read",
          "Replied",
          "Closed",
          "Failed",
          "AffidavitPublished"
        ]
      },
      "EviMailBatchTemplate": {
        "type": "object",
        "description": "The email template configured for the batch (the per-email settings applied to every recipient).",
        "properties": {
          "Subject": {
            "type": "string"
          },
          "Body": {
            "type": "string",
            "description": "HTML body of the email."
          },
          "IssuerName": {
            "type": "string"
          },
          "CostCentre": {
            "type": "string"
          },
          "From": {
            "type": "string"
          },
          "DisableSenderHeader": {
            "type": "boolean"
          },
          "ReplyTo": {
            "type": "string"
          },
          "TimeToLive": {
            "type": "integer"
          },
          "CertificationLevel": {
            "$ref": "#/components/schemas/EviMailBatchCertificationLevelValue"
          },
          "LtaStorage": {
            "type": "boolean",
            "description": "Enables post-close LTA storage for every email generated from the batch. Each email is stored after its own tracking reaches `Closed`. Requires LTA to be enabled for the site.\n"
          },
          "AffidavitKinds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EviMailBatchAffidavitKindValue"
            }
          },
          "Language": {
            "type": "string"
          },
          "AffidavitLanguage": {
            "type": "string"
          },
          "OnlineRetentionPeriod": {
            "type": "integer"
          },
          "PushNotificationUrl": {
            "type": "string",
            "format": "uri"
          },
          "PushNotificationFilter": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EviMailBatchPushNotificationValue"
            }
          },
          "PushNotificationExtraData": {
            "type": "string"
          },
          "CommitmentOptions": {
            "type": "string",
            "enum": [
              "Disabled",
              "Accept",
              "Reject",
              "AcceptOrReject"
            ]
          },
          "CommitmentCommentsAllowed": {
            "type": "boolean"
          },
          "RejectReasons": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "AcceptReasons": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "RequireRejectReason": {
            "type": "boolean"
          },
          "RequireAcceptReason": {
            "type": "boolean"
          },
          "DeliveryAppearance": {
            "type": "string",
            "enum": [
              "Certified",
              "AsIs"
            ]
          },
          "OwnerNotificationTemplate": {
            "type": "string"
          }
        }
      },
      "EviMailBatchGetResponse": {
        "type": "object",
        "description": "Full state of an email batch, including its configured email template and processing progress.",
        "properties": {
          "Id": {
            "type": "string",
            "format": "uuid"
          },
          "State": {
            "type": "string",
            "enum": [
              "Draft",
              "Submitted",
              "Scheduled",
              "Processing",
              "Processed",
              "Invalid",
              "Failed"
            ]
          },
          "Submitter": {
            "type": "string"
          },
          "SubmitterId": {
            "type": "string"
          },
          "SiteName": {
            "type": "string"
          },
          "SiteId": {
            "type": "string",
            "format": "uuid"
          },
          "Description": {
            "type": "string"
          },
          "CreationDate": {
            "type": "string",
            "format": "date-time"
          },
          "ScheduledFor": {
            "type": "string",
            "format": "date-time",
            "description": "Scheduled execution date and time in UTC."
          },
          "StartedOn": {
            "type": "string",
            "format": "date-time"
          },
          "ProcessedOn": {
            "type": "string",
            "format": "date-time"
          },
          "SubmittedOn": {
            "type": "string",
            "format": "date-time"
          },
          "InvalidOn": {
            "type": "string",
            "format": "date-time"
          },
          "LastUpdated": {
            "type": "string",
            "format": "date-time"
          },
          "TotalCount": {
            "type": "integer"
          },
          "EviMail": {
            "$ref": "#/components/schemas/EviMailBatchTemplate"
          },
          "BatchPushNotificationUrl": {
            "type": "string",
            "format": "uri"
          },
          "SentCount": {
            "type": "integer"
          },
          "FailedCount": {
            "type": "integer"
          },
          "ProgressPercentage": {
            "type": "number",
            "format": "float"
          },
          "ExtraFields": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "InvalidReason": {
            "type": "string"
          },
          "CsvId": {
            "type": "string",
            "format": "uuid"
          },
          "Outcome": {
            "type": "string"
          }
        }
      },
      "EviMailBatchPatchRequest": {
        "type": "object",
        "description": "Batch metadata and email template options. All fields are optional; only supplied fields are changed.",
        "properties": {
          "IssuerName": {
            "type": "string"
          },
          "Subject": {
            "type": "string",
            "description": "Subject line of the email. (The body is set with the Body endpoint.)"
          },
          "ScheduledDate": {
            "type": "string",
            "format": "date-time",
            "description": "Scheduled execution date and time in UTC."
          },
          "State": {
            "type": "string",
            "enum": [
              "Draft",
              "Submitted",
              "Scheduled",
              "Processing",
              "Processed",
              "Invalid",
              "Failed"
            ]
          },
          "Description": {
            "type": "string",
            "maxLength": 255
          },
          "From": {
            "type": "string"
          },
          "DisableSenderHeader": {
            "type": "boolean"
          },
          "ReplyTo": {
            "type": "string"
          },
          "TimeToLive": {
            "type": "integer"
          },
          "CostCentre": {
            "type": "string"
          },
          "CertificationLevel": {
            "$ref": "#/components/schemas/EviMailBatchCertificationLevelValue"
          },
          "AffidavitKinds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EviMailBatchAffidavitKindValue"
            }
          },
          "Language": {
            "type": "string"
          },
          "AffidavitLanguage": {
            "type": "string"
          },
          "OnlineRetentionPeriod": {
            "type": "integer"
          },
          "LtaStorage": {
            "type": "boolean",
            "description": "Enables post-close LTA storage for every email generated from the batch. Each email is stored after its own tracking reaches `Closed`. Requires LTA to be enabled for the site.\n"
          },
          "PushNotificationUrl": {
            "type": "string",
            "format": "uri",
            "description": "Push notification URL propagated to every email generated from the batch — it becomes each email's own callback URL for the normal per-email lifecycle callbacks. Alias of `BatchPushNotificationUrl` (both set the same value; if both are supplied, this one is applied last). The batch itself has no separate lifecycle callback — track batch progress with `GET .../{BatchId}`.\n"
          },
          "PushNotificationFilter": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EviMailBatchPushNotificationValue"
            }
          },
          "PushNotificationExtraData": {
            "type": "string"
          },
          "CommitmentOptions": {
            "type": "string",
            "enum": [
              "Disabled",
              "Accept",
              "Reject",
              "AcceptOrReject"
            ]
          },
          "CommitmentCommentsAllowed": {
            "type": "boolean"
          },
          "RejectReasons": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "AcceptReasons": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "RequireRejectReason": {
            "type": "boolean"
          },
          "RequireAcceptReason": {
            "type": "boolean"
          },
          "DeliveryAppearance": {
            "type": "string",
            "enum": [
              "Certified",
              "AsIs"
            ]
          },
          "BatchPushNotificationUrl": {
            "type": "string",
            "format": "uri",
            "description": "Alias of `PushNotificationUrl` — both set the same value. It is propagated to every email generated from the batch as that email's own callback URL; the batch has no separate lifecycle callback. Track batch progress with `GET .../{BatchId}`.\n"
          },
          "OwnerNotificationTemplate": {
            "type": "string"
          }
        }
      },
      "EviMailBatchRecipient": {
        "type": "object",
        "properties": {
          "LookupKey": {
            "type": "string"
          },
          "DisplayName": {
            "type": "string"
          },
          "LegalName": {
            "type": "string"
          },
          "Address": {
            "type": "string",
            "description": "Recipient email address."
          },
          "ExtraFields": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Custom per-recipient fields supplied as `*`-prefixed CSV columns."
          },
          "EvidenceAccessControlChallenge": {
            "type": "string"
          },
          "EvidenceAccessControlChallengeResponse": {
            "type": "string"
          },
          "EvidenceUniqueId": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the generated EviMail for this recipient, once the batch has been processed."
          }
        }
      },
      "EviMailBatchRecipientsQueryResponse": {
        "type": "object",
        "properties": {
          "Cursor": {
            "type": "string"
          },
          "Results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EviMailBatchRecipient"
            }
          }
        }
      },
      "EviMailBatchAttachmentInfo": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "format": "uuid"
          },
          "DisplayName": {
            "type": "string"
          },
          "FileName": {
            "type": "string"
          },
          "MimeType": {
            "type": "string"
          },
          "Size": {
            "type": "integer",
            "description": "Size of the attachment in bytes."
          },
          "ContentEncoding": {
            "type": "string"
          },
          "ContentId": {
            "type": "string"
          }
        }
      },
      "EviMailBatchAttachmentPostResponse": {
        "type": "object",
        "properties": {
          "AttachmentId": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "EviSmsRecipient": {
        "type": "object",
        "required": [
          "PhoneNumber"
        ],
        "properties": {
          "LegalName": {
            "type": "string"
          },
          "PhoneNumber": {
            "type": "string",
            "description": "International mobile number."
          }
        }
      },
      "EviSmsOptions": {
        "type": "object",
        "properties": {
          "CertificationLevel": {
            "type": "string",
            "description": "Supported values include `Standard`, `Advanced`, and their regional variants, such as `Standard_EU` or `Advanced_EU`. Availability depends on the account.",
            "enum": [
              "Standard",
              "Advanced",
              "Standard_CO",
              "Standard_CR",
              "Standard_EC",
              "Standard_EU",
              "Standard_MX",
              "Standard_PE",
              "Advanced_CO",
              "Advanced_CR",
              "Advanced_EC",
              "Advanced_EU",
              "Advanced_MX",
              "Advanced_PE"
            ]
          },
          "CostCentre": {
            "type": "string"
          },
          "DeliveryChannels": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "RCS",
                "SMS"
              ]
            }
          },
          "AffidavitKinds": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "Submitted",
                "SubmittedAdvanced",
                "TransmissionResult",
                "DeliveryResult",
                "Read",
                "Closed",
                "ClosedAdvanced",
                "Complete",
                "CompleteAdvanced",
                "Event"
              ]
            }
          },
          "TimeToLive": {
            "type": "integer",
            "minimum": 60,
            "maximum": 86400,
            "description": "The time in minutes during which the platform will attempt delivery before the message expires. Range: 60-86,400 (1 minute to 60 days)."
          },
          "Language": {
            "type": "string",
            "enum": [
              "en",
              "es",
              "ca",
              "it",
              "pt",
              "pt-BR",
              "fr",
              "de",
              "ro"
            ]
          },
          "AffidavitLanguage": {
            "type": "string",
            "enum": [
              "en",
              "es",
              "ca",
              "it",
              "pt",
              "pt-BR",
              "fr",
              "de",
              "ro",
              "el"
            ]
          },
          "EvidenceAccessControlMethod": {
            "type": "string",
            "description": "Controls how recipients access the evidence record. Supported values: `Public`, `Challenge`, `AutoChallenge`. When omitted, the account's configured default method applies.\n",
            "enum": [
              "AutoChallenge",
              "Public",
              "Challenge"
            ]
          },
          "EvidenceAccessControlChallenge": {
            "type": "string"
          },
          "EvidenceAccessControlChallengeResponse": {
            "type": "string"
          },
          "OnlineRetentionPeriod": {
            "type": "integer"
          },
          "NotaryRetentionPeriod": {
            "type": "integer"
          },
          "NotaryProfile": {
            "type": "string"
          },
          "PushNotificationFilter": {
            "type": "array",
            "description": "State transitions that trigger a push notification callback to PushNotificationUrl. `AffidavitPublished` is a platform meta-event that fires when affidavit generation completes — it is not a lifecycle state.\n",
            "items": {
              "type": "string",
              "enum": [
                "Ready",
                "Sent",
                "Dispatched",
                "Delivered",
                "Read",
                "Failed",
                "Closed",
                "AffidavitPublished"
              ]
            }
          },
          "PushNotificationUrl": {
            "type": "string",
            "format": "uri"
          },
          "PushNotificationExtraData": {
            "type": "string"
          },
          "DeliveryAppearance": {
            "type": "string",
            "description": "Controls the visual appearance of the delivery page. `Certified` is the branded certified-delivery appearance; `AsIs` is a plain appearance without certification branding.\n",
            "enum": [
              "Certified",
              "AsIs"
            ]
          },
          "OwnerNotificationTemplate": {
            "type": "string",
            "description": "Identifier of an enabled custom template used for the issuer's status notification email. See [Using communication templates from the API](../../dev/templates.md).\n"
          },
          "OwnerNotificationTemplateValues": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Key-value pairs supplying values for the user variables declared in OwnerNotificationTemplate."
          },
          "LtaStorage": {
            "type": "boolean",
            "description": "When true, the evidence for this transaction is stored in Namirial Archive during post-close processing after tracking reaches `Closed`. Requires LTA to be enabled for the site. `OnlineRetentionPeriod` separately controls online accessibility.\n"
          }
        }
      },
      "EviSmsSubmitRequest": {
        "type": "object",
        "required": [
          "Text",
          "Recipient"
        ],
        "properties": {
          "Text": {
            "type": "string"
          },
          "LookupKey": {
            "type": "string"
          },
          "IssuerName": {
            "type": "string",
            "description": "Legal name or short identifier for the sending organisation, recorded in the certification evidence. This is not the sender shown in the recipient's inbox (that sender is configured at the account level).\n"
          },
          "Recipient": {
            "$ref": "#/components/schemas/EviSmsRecipient"
          },
          "Options": {
            "$ref": "#/components/schemas/EviSmsOptions"
          }
        }
      },
      "EviSmsSubmitResponse": {
        "type": "object",
        "required": [
          "eviId"
        ],
        "properties": {
          "eviId": {
            "type": "string"
          }
        }
      },
      "EviSmsError": {
        "type": "object",
        "properties": {
          "responseStatus": {
            "type": "object",
            "properties": {
              "errorCode": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "errors": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        }
      },
      "EviSmsAffidavitInfo": {
        "type": "object",
        "description": "Affidavit metadata and optional legacy Base64 content associated with a certified SMS.",
        "properties": {
          "uniqueId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier of the affidavit."
          },
          "date": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the affidavit was generated."
          },
          "evidenceUniqueId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier of the SMS this affidavit belongs to."
          },
          "partyUniqueId": {
            "type": "string",
            "format": "uuid",
            "description": "Identifier of the related delivery/party, when applicable."
          },
          "bytes": {
            "type": "string",
            "format": "byte",
            "nullable": true,
            "deprecated": true,
            "description": "Base64-encoded affidavit PDF. Populated only when the deprecated IncludeAffidavitBlobs option is true."
          },
          "description": {
            "type": "string",
            "description": "Human-readable description of the affidavit."
          },
          "kind": {
            "type": "string",
            "description": "Technical identifier of the affidavit kind, for example EviSms:Closed."
          },
          "additionalData": {
            "type": "object",
            "description": "Additional affidavit metadata as key-value pairs.",
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "EviSmsQueryResult": {
        "type": "object",
        "description": "Individual query result object. The nested `affidavits` array is included only when `IncludeAffidavits` is set on the request.",
        "properties": {
          "uniqueId": {
            "type": "string",
            "description": "Unique identifier (EviId) of the certified SMS."
          },
          "lookupKey": {
            "type": "string",
            "description": "Locator assigned by the issuer at submission."
          },
          "text": {
            "type": "string",
            "description": "Content of the SMS message."
          },
          "issuer": {
            "type": "object",
            "properties": {
              "legalName": {
                "type": "string"
              },
              "phoneNumber": {
                "type": "string"
              }
            }
          },
          "recipient": {
            "type": "object",
            "properties": {
              "legalName": {
                "type": "string"
              },
              "phoneNumber": {
                "type": "string"
              }
            }
          },
          "state": {
            "type": "string",
            "enum": [
              "Draft",
              "New",
              "Ready",
              "Sent",
              "Dispatched",
              "Delivered",
              "Read",
              "Closed",
              "Failed"
            ]
          },
          "outcome": {
            "type": "string",
            "enum": [
              "None",
              "Certified",
              "Sent",
              "Delivered",
              "Read",
              "Failed"
            ]
          },
          "creationDate": {
            "type": "string",
            "format": "date-time"
          },
          "lastStateChangeDate": {
            "type": "string",
            "format": "date-time"
          },
          "newOn": {
            "type": "string",
            "format": "date-time"
          },
          "readyOn": {
            "type": "string",
            "format": "date-time"
          },
          "sentOn": {
            "type": "string",
            "format": "date-time"
          },
          "dispatchedOn": {
            "type": "string",
            "format": "date-time"
          },
          "deliveredOn": {
            "type": "string",
            "format": "date-time"
          },
          "readOn": {
            "type": "string",
            "format": "date-time"
          },
          "failedOn": {
            "type": "string",
            "format": "date-time"
          },
          "expiredOn": {
            "type": "string",
            "format": "date-time"
          },
          "timeToLive": {
            "type": "integer",
            "description": "Minutes before the message tracking closes."
          },
          "costCentre": {
            "type": "string",
            "description": "Cost-centre label recorded with the transaction for internal billing allocation."
          },
          "onlineRetentionPeriod": {
            "type": "integer",
            "description": "Years of online retention."
          },
          "notaryRetentionPeriod": {
            "type": "integer",
            "description": "Years of retention at the notary office."
          },
          "notaryProfile": {
            "type": "string",
            "description": "Notary identifier for custody."
          },
          "sourceChannel": {
            "type": "string",
            "enum": [
              "Web",
              "Api",
              "Smtp"
            ]
          },
          "deliveryChannels": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Channels used to deliver the SMS (e.g., RCS, SMS)."
          },
          "affidavitKinds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "affidavits": {
            "type": "array",
            "description": "Affidavit entries. Present when IncludeAffidavits is true; bytes is populated only when the deprecated IncludeAffidavitBlobs option is also true.",
            "items": {
              "$ref": "#/components/schemas/EviSmsAffidavitInfo"
            }
          }
        },
        "additionalProperties": true
      },
      "EviSmsQueryResponse": {
        "type": "object",
        "properties": {
          "totalMatches": {
            "type": "integer"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EviSmsQueryResult"
            }
          }
        }
      },
      "EviSmsBatchSummary": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "string",
            "format": "uuid"
          },
          "State": {
            "type": "string",
            "enum": [
              "Draft",
              "Submitted",
              "Scheduled",
              "Processing",
              "Processed",
              "Invalid",
              "Failed"
            ]
          },
          "Submitter": {
            "type": "string"
          },
          "SubmitterId": {
            "type": "string"
          },
          "SiteId": {
            "type": "string",
            "format": "uuid"
          },
          "SiteName": {
            "type": "string"
          },
          "Description": {
            "type": "string"
          },
          "CreationDate": {
            "type": "string",
            "format": "date-time"
          },
          "ScheduledFor": {
            "type": "string",
            "format": "date-time",
            "description": "Scheduled execution date and time in UTC."
          },
          "StartedOn": {
            "type": "string",
            "format": "date-time"
          },
          "ProcessedOn": {
            "type": "string",
            "format": "date-time"
          },
          "LastUpdated": {
            "type": "string",
            "format": "date-time"
          },
          "TotalCount": {
            "type": "integer"
          },
          "TotalSent": {
            "type": "integer"
          },
          "TotalFailed": {
            "type": "integer"
          }
        }
      },
      "EviSmsBatchesQueryResponse": {
        "type": "object",
        "properties": {
          "Cursor": {
            "type": "string"
          },
          "HasMoreResults": {
            "type": "boolean"
          },
          "Results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EviSmsBatchSummary"
            }
          }
        }
      },
      "EviSmsBatchCreateRequest": {
        "type": "object",
        "required": [
          "Description"
        ],
        "properties": {
          "Description": {
            "type": "string",
            "maxLength": 255,
            "description": "Human-readable description of the batch."
          }
        }
      },
      "EviSmsBatchCreateResponse": {
        "type": "object",
        "properties": {
          "BatchId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier of the created batch. Use it in all other batch operations."
          }
        }
      },
      "EviSmsBatchAffidavitKindValue": {
        "type": "string",
        "enum": [
          "Submitted",
          "SubmittedAdvanced",
          "TransmissionResult",
          "DeliveryResult",
          "Read",
          "Closed",
          "ClosedAdvanced",
          "Complete",
          "CompleteAdvanced",
          "Event"
        ]
      },
      "EviSmsBatchPushNotificationValue": {
        "type": "string",
        "enum": [
          "Ready",
          "Sent",
          "Dispatched",
          "Delivered",
          "Read",
          "Closed",
          "Failed",
          "AffidavitPublished"
        ]
      },
      "EviSmsBatchTemplate": {
        "type": "object",
        "description": "The message template configured for the batch (the per-message settings applied to every recipient).",
        "properties": {
          "Text": {
            "type": "string",
            "description": "The SMS message content."
          },
          "IssuerName": {
            "type": "string"
          },
          "CostCentre": {
            "type": "string"
          },
          "TimeToLive": {
            "type": "integer"
          },
          "CertificationLevel": {
            "type": "string",
            "description": "Supported values include `Standard`, `Advanced`, and their regional variants, such as `Standard_EU` or `Advanced_EU`. Availability depends on the account.",
            "enum": [
              "Standard",
              "Advanced",
              "Standard_CO",
              "Standard_CR",
              "Standard_EC",
              "Standard_EU",
              "Standard_MX",
              "Standard_PE",
              "Advanced_CO",
              "Advanced_CR",
              "Advanced_EC",
              "Advanced_EU",
              "Advanced_MX",
              "Advanced_PE"
            ]
          },
          "LtaStorage": {
            "type": "boolean",
            "description": "Enables post-close LTA storage for every message generated from the batch. Each message is stored after its own tracking reaches `Closed`. Requires LTA to be enabled for the site.\n"
          },
          "AffidavitKinds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EviSmsBatchAffidavitKindValue"
            }
          },
          "Language": {
            "type": "string"
          },
          "AffidavitLanguage": {
            "type": "string"
          },
          "OnlineRetentionPeriod": {
            "type": "integer"
          },
          "PushNotificationUrl": {
            "type": "string",
            "format": "uri"
          },
          "PushNotificationFilter": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EviSmsBatchPushNotificationValue"
            }
          },
          "PushNotificationExtraData": {
            "type": "string"
          },
          "DeliveryAppearance": {
            "type": "string",
            "enum": [
              "Certified",
              "AsIs"
            ]
          },
          "OwnerNotificationTemplate": {
            "type": "string"
          }
        }
      },
      "EviSmsBatchGetResponse": {
        "type": "object",
        "description": "Full state of an SMS batch, including its configured message template and processing progress.",
        "properties": {
          "Id": {
            "type": "string",
            "format": "uuid"
          },
          "State": {
            "type": "string",
            "enum": [
              "Draft",
              "Submitted",
              "Scheduled",
              "Processing",
              "Processed",
              "Invalid",
              "Failed"
            ]
          },
          "Submitter": {
            "type": "string"
          },
          "SubmitterId": {
            "type": "string"
          },
          "SiteName": {
            "type": "string"
          },
          "SiteId": {
            "type": "string",
            "format": "uuid"
          },
          "Description": {
            "type": "string"
          },
          "CreationDate": {
            "type": "string",
            "format": "date-time"
          },
          "ScheduledFor": {
            "type": "string",
            "format": "date-time",
            "description": "Scheduled execution date and time in UTC."
          },
          "StartedOn": {
            "type": "string",
            "format": "date-time"
          },
          "ProcessedOn": {
            "type": "string",
            "format": "date-time"
          },
          "SubmittedOn": {
            "type": "string",
            "format": "date-time"
          },
          "InvalidOn": {
            "type": "string",
            "format": "date-time"
          },
          "LastUpdated": {
            "type": "string",
            "format": "date-time"
          },
          "TotalCount": {
            "type": "integer"
          },
          "EviSms": {
            "$ref": "#/components/schemas/EviSmsBatchTemplate"
          },
          "BatchPushNotificationUrl": {
            "type": "string",
            "format": "uri"
          },
          "SentCount": {
            "type": "integer"
          },
          "FailedCount": {
            "type": "integer"
          },
          "ProgressPercentage": {
            "type": "number",
            "format": "float"
          },
          "ExtraFields": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "InvalidReason": {
            "type": "string"
          },
          "CsvId": {
            "type": "string",
            "format": "uuid"
          },
          "Outcome": {
            "type": "string"
          }
        }
      },
      "EviSmsBatchPatchRequest": {
        "type": "object",
        "description": "Batch metadata and message template options. All fields are optional; only supplied fields are changed.",
        "properties": {
          "IssuerName": {
            "type": "string",
            "description": "Legal name or short identifier for the sending organisation, recorded in the certification evidence. This is not the sender shown in the recipient's inbox (that sender is configured at the account level).\n"
          },
          "ScheduledDate": {
            "type": "string",
            "format": "date-time",
            "description": "Scheduled execution date and time in UTC."
          },
          "State": {
            "type": "string",
            "enum": [
              "Draft",
              "Submitted",
              "Scheduled",
              "Processing",
              "Processed",
              "Invalid",
              "Failed"
            ]
          },
          "Description": {
            "type": "string",
            "maxLength": 255
          },
          "Text": {
            "type": "string",
            "description": "The SMS message content for this batch."
          },
          "TimeToLive": {
            "type": "integer"
          },
          "CostCentre": {
            "type": "string"
          },
          "CertificationLevel": {
            "type": "string",
            "description": "Supported values include `Standard`, `Advanced`, and their regional variants, such as `Standard_EU` or `Advanced_EU`. Availability depends on the account.",
            "enum": [
              "Standard",
              "Advanced",
              "Standard_CO",
              "Standard_CR",
              "Standard_EC",
              "Standard_EU",
              "Standard_MX",
              "Standard_PE",
              "Advanced_CO",
              "Advanced_CR",
              "Advanced_EC",
              "Advanced_EU",
              "Advanced_MX",
              "Advanced_PE"
            ]
          },
          "AffidavitKinds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EviSmsBatchAffidavitKindValue"
            }
          },
          "Language": {
            "type": "string"
          },
          "AffidavitLanguage": {
            "type": "string"
          },
          "OnlineRetentionPeriod": {
            "type": "integer"
          },
          "LtaStorage": {
            "type": "boolean",
            "description": "Enables post-close LTA storage for every message generated from the batch. Each message is stored after its own tracking reaches `Closed`. Requires LTA to be enabled for the site.\n"
          },
          "PushNotificationUrl": {
            "type": "string",
            "format": "uri",
            "description": "Push notification URL propagated to every message generated from the batch — it becomes each message's own callback URL for the normal per-message lifecycle callbacks. Alias of `BatchPushNotificationUrl` (both set the same value; if both are supplied, this one is applied last). The batch itself has no separate lifecycle callback — track batch progress with `GET .../{BatchId}`.\n"
          },
          "PushNotificationFilter": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EviSmsBatchPushNotificationValue"
            }
          },
          "PushNotificationExtraData": {
            "type": "string"
          },
          "DeliveryAppearance": {
            "type": "string",
            "enum": [
              "Certified",
              "AsIs"
            ]
          },
          "BatchPushNotificationUrl": {
            "type": "string",
            "format": "uri",
            "description": "Alias of `PushNotificationUrl` — both set the same value. It is propagated to every message generated from the batch as that message's own callback URL; the batch has no separate lifecycle callback. Track batch progress with `GET .../{BatchId}`.\n"
          },
          "OwnerNotificationTemplate": {
            "type": "string"
          }
        }
      },
      "EviSmsBatchRecipient": {
        "type": "object",
        "properties": {
          "LookupKey": {
            "type": "string"
          },
          "LegalName": {
            "type": "string"
          },
          "PhoneNumber": {
            "type": "string",
            "description": "Recipient mobile number."
          },
          "ExtraFields": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Custom per-recipient fields supplied as `*`-prefixed CSV columns."
          },
          "EvidenceAccessControlChallenge": {
            "type": "string"
          },
          "EvidenceAccessControlChallengeResponse": {
            "type": "string"
          },
          "EvidenceUniqueId": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the generated EviSMS for this recipient, once the batch has been processed."
          }
        }
      },
      "EviSmsBatchRecipientsQueryResponse": {
        "type": "object",
        "properties": {
          "Cursor": {
            "type": "string"
          },
          "Results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EviSmsBatchRecipient"
            }
          }
        }
      },
      "EviPostAddress": {
        "type": "object",
        "required": [
          "StreetAddress",
          "PostalCode",
          "Locality",
          "Country"
        ],
        "properties": {
          "StreetAddress": {
            "type": "string",
            "description": "Street name and number."
          },
          "PostalCode": {
            "type": "string",
            "description": "Postal code."
          },
          "Locality": {
            "type": "string",
            "description": "City or town."
          },
          "Region": {
            "type": "string",
            "description": "Province or region. Required in RecipientAddress when PostServiceType is Registered. The issuer region must also be present, either supplied in IssuerAddress or filled from the site address.\n"
          },
          "Country": {
            "type": "string",
            "description": "ISO 3166-1 alpha-2 country code (e.g. ES)."
          },
          "PostOfficeBoxAddress": {
            "type": "string",
            "description": "Post office box address, if applicable."
          }
        }
      },
      "EviPostCustomField": {
        "type": "object",
        "required": [
          "Key",
          "Label",
          "Value"
        ],
        "properties": {
          "Key": {
            "type": "string",
            "description": "Identifier of the custom field."
          },
          "Label": {
            "type": "string",
            "description": "Display label for the field."
          },
          "Value": {
            "type": "string",
            "description": "Value of the custom field."
          },
          "IsLookupKey": {
            "type": "boolean",
            "description": "If true, this value is indexed and surfaced in query results under `LookupKey`.\n"
          },
          "TypeName": {
            "type": "string",
            "description": "Field type. Currently only `Text` is supported.",
            "enum": [
              "Text"
            ]
          },
          "DefaultValue": {
            "type": "string"
          },
          "DefaultValueIsForced": {
            "type": "boolean"
          },
          "Required": {
            "type": "boolean"
          },
          "ValidationRegex": {
            "type": "string",
            "description": "Regex expression to validate the field value."
          },
          "ValidationMessage": {
            "type": "string",
            "description": "Message shown when validation fails."
          },
          "MaxLength": {
            "type": "integer",
            "description": "Maximum character length of the field value."
          }
        }
      },
      "EviPostOptions": {
        "type": "object",
        "properties": {
          "PostServiceType": {
            "type": "string",
            "description": "Controls the type of postal delivery. `Registered` sends a certified postal communication equivalent to a burofax (via the national postal operator, Correos). `Letter` sends to a printing and enveloping provider (MRW) and requires prior provisioning by support plus a `PostServiceProfile`. `LetterLite` is a lower-cost single-attempt printed certified letter, available only within mainland Spain and with the delivery-attempt and disposal options disabled. EviPost physical delivery is currently available for destinations within Spain. Defaults to `Registered` when omitted.\n",
            "enum": [
              "Registered",
              "Letter",
              "LetterLite"
            ],
            "default": "Registered"
          },
          "PostServiceProfile": {
            "type": "string",
            "description": "Profile identifier selecting a set of configurable parameters (paper type, envelope size, QR code position). Required when `PostServiceType` is `Letter`; not used for `Registered` or `LetterLite`. Must be provisioned by support before use.\n"
          },
          "CertificationLevel": {
            "type": "string",
            "description": "Legal framework and geographic variant for certification. Supported values include `Standard`, `Advanced`, and their regional variants, such as `Standard_EU` or `Advanced_EU`. Availability depends on the account. EviPost does not support QERDS certification levels.\n",
            "enum": [
              "Standard",
              "Advanced",
              "Standard_CO",
              "Standard_CR",
              "Standard_EC",
              "Standard_EU",
              "Standard_MX",
              "Standard_PE",
              "Advanced_CO",
              "Advanced_CR",
              "Advanced_EC",
              "Advanced_EU",
              "Advanced_MX",
              "Advanced_PE"
            ]
          },
          "AffidavitProfile": {
            "type": "string",
            "description": "Controls which affidavits are generated during the process.",
            "enum": [
              "None",
              "Basic",
              "AdvancedContentOnSubmit",
              "AdvancedContentOnClose",
              "AdvancedContentOnSubmitAndOnClose"
            ]
          },
          "AffidavitsOnDemandEnabled": {
            "type": "boolean",
            "description": "Enables on-demand affidavit generation via the AffidavitRequest endpoint. Requires `AffidavitProfile` to be set to one of the advanced content profiles (`AdvancedContentOnSubmit`, `AdvancedContentOnClose`, or `AdvancedContentOnSubmitAndOnClose`).\n"
          },
          "OnlineRetentionPeriod": {
            "type": "integer",
            "description": "Time in years for online evidence retention. Default is 1.",
            "default": 1
          },
          "NotaryRetentionPeriod": {
            "type": "integer",
            "description": "Years of notarial custody. Set to 5 to apply notarial retention. Set to 0 to disable. `NotaryProfile` is required when this value is greater than 0.\n"
          },
          "NotaryProfile": {
            "type": "string",
            "description": "Identifier of the notary who will carry out custody. Required when `NotaryRetentionPeriod` is greater than 0.\n"
          },
          "EvidenceAccessControlMethod": {
            "type": "string",
            "description": "Controls how recipients access the evidence record. When omitted, the account's configured default method applies. When set to `Challenge`, both `EvidenceAccessControlChallenge` and `EvidenceAccessControlChallengeResponse` must also be supplied.\n",
            "enum": [
              "AutoChallenge",
              "Public",
              "Challenge"
            ]
          },
          "EvidenceAccessControlChallenge": {
            "type": "string",
            "description": "Challenge question. Required when `EvidenceAccessControlMethod` is `Challenge`.\n"
          },
          "EvidenceAccessControlChallengeResponse": {
            "type": "string",
            "description": "Answer to the challenge question. Required when `EvidenceAccessControlMethod` is `Challenge`.\n"
          },
          "Language": {
            "type": "string",
            "description": "Language for the evidence record and generated affidavits. Defaults to the site's configured language when omitted.\n",
            "enum": [
              "en",
              "es",
              "ca",
              "it",
              "pt",
              "pt-BR",
              "fr",
              "de",
              "ro"
            ]
          },
          "CostCentre": {
            "type": "string",
            "description": "Optional billing group identifier. Groups submissions for invoicing and expense allocation.\n"
          },
          "EnableDeliveryReceipt": {
            "type": "boolean",
            "description": "For `Letter` type only. Enables delivery receipt tracking.\n"
          },
          "EnableDeliveryAttempts": {
            "type": "boolean",
            "description": "For `Letter` type only. Enables tracking of delivery attempts.\n"
          },
          "DeliveryAttemptsNumber": {
            "type": "integer",
            "description": "For `Letter` type only. Number of delivery attempts before the process ends.\n"
          },
          "CustomFields": {
            "type": "array",
            "description": "Array of custom key-value fields attached to the submission. Fields with `IsLookupKey: true` are indexed and returned in query results under `LookupKey`, concatenated with `::`.\n",
            "items": {
              "$ref": "#/components/schemas/EviPostCustomField"
            }
          },
          "PushNotificationUrl": {
            "type": "string",
            "format": "uri",
            "description": "URL to receive HTTP POST callbacks when the postal communication changes state.\n"
          },
          "PushNotificationFilter": {
            "type": "array",
            "description": "Array of state names that trigger a callback to `PushNotificationUrl`. If omitted, no callbacks are sent. `AffidavitPublished` is a platform meta-event that fires when affidavit generation completes — it is not a lifecycle state.\n",
            "items": {
              "type": "string",
              "enum": [
                "Processed",
                "Dispatched",
                "Sent",
                "Delivered",
                "Closed",
                "Cancelled",
                "Issued",
                "Disposed",
                "AffidavitPublished"
              ]
            }
          },
          "PushNotificationExtraData": {
            "type": "string",
            "description": "Free-text value included in every callback payload under `AdditionalData.ExtraData`.\n"
          },
          "DisposalDaysAmmount": {
            "type": "integer",
            "description": "Number of days after which the undelivered postal item is disposed of. Set to 0 to disable disposal. (Note: the field name retains its original spelling in the API.)\n"
          },
          "OwnerNotificationTemplate": {
            "type": "string",
            "description": "Identifier of an enabled custom template used for the issuer's status notification email. See [Using communication templates from the API](../../dev/templates.md).\n"
          },
          "OwnerNotificationTemplateValues": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Key-value pairs supplying values for the user variables declared in OwnerNotificationTemplate."
          },
          "LtaStorage": {
            "type": "boolean",
            "description": "When true, the evidence for this transaction is stored in Namirial Archive during post-close processing after tracking reaches `Closed`. Requires LTA to be enabled for the site. `OnlineRetentionPeriod` separately controls online accessibility.\n"
          }
        }
      },
      "EviPostSubmitRequest": {
        "type": "object",
        "required": [
          "Document",
          "RecipientAddress"
        ],
        "properties": {
          "LookupKey": {
            "type": "string",
            "description": "Optional identifier set by the issuer. Can be used later to locate the evidence via the Query endpoint.\n"
          },
          "Document": {
            "type": "string",
            "description": "The document or letter to be sent, base64-encoded PDF."
          },
          "RecipientName": {
            "type": "string",
            "description": "Display name of the recipient."
          },
          "RecipientLegalName": {
            "type": "string",
            "description": "Legal name or corporate name of the recipient."
          },
          "RecipientAddress": {
            "$ref": "#/components/schemas/EviPostAddress"
          },
          "RecipientPhone": {
            "type": "string",
            "description": "Recipient's mobile phone number."
          },
          "RecipientEmail": {
            "type": "string",
            "format": "email",
            "description": "Email address of the recipient."
          },
          "IssuerName": {
            "type": "string",
            "description": "Display name of the sender."
          },
          "IssuerLegalName": {
            "type": "string",
            "description": "Legal name or corporate name of the sender."
          },
          "IssuerAddress": {
            "$ref": "#/components/schemas/EviPostAddress"
          },
          "IssuerPhone": {
            "type": "string",
            "description": "Issuer's mobile phone number."
          },
          "IssuerEmail": {
            "type": "string",
            "format": "email",
            "description": "Email address of the issuer."
          },
          "IssuerComments": {
            "type": "string",
            "description": "Optional additional comments from the issuer."
          },
          "Options": {
            "$ref": "#/components/schemas/EviPostOptions"
          }
        }
      },
      "EviPostSubmitResponse": {
        "type": "object",
        "required": [
          "uniqueId"
        ],
        "properties": {
          "uniqueId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier of the submitted postal communication."
          }
        }
      },
      "EviPostError": {
        "type": "object",
        "properties": {
          "responseStatus": {
            "type": "object",
            "properties": {
              "errorCode": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "errors": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        }
      },
      "EviPostAffidavit": {
        "type": "object",
        "description": "Affidavit metadata and optional legacy Base64 content associated with a postal communication.",
        "properties": {
          "uniqueId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier of the affidavit."
          },
          "date": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp of the affidavit."
          },
          "evidenceUniqueId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier of the evidence this affidavit belongs to."
          },
          "partyUniqueId": {
            "type": "string",
            "format": "uuid",
            "description": "Identifier of the related delivery/party, when applicable."
          },
          "bytes": {
            "type": "string",
            "format": "byte",
            "nullable": true,
            "deprecated": true,
            "description": "Base64-encoded affidavit PDF. Populated only when the deprecated IncludeAffidavitBlobsOnResult option is true."
          },
          "description": {
            "type": "string",
            "description": "Human-readable description of the affidavit."
          },
          "kind": {
            "type": "string",
            "description": "Technical identifier of the affidavit kind, when available."
          },
          "additionalData": {
            "type": "object",
            "description": "Additional affidavit metadata as key-value pairs.",
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "EviPostQueryResult": {
        "type": "object",
        "description": "Individual query result object. Unlike the request body (which uses PascalCase field names), the v1 EviPost query response serialises field names in camelCase.\n",
        "properties": {
          "evidenceId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier of the postal communication."
          },
          "lookupKey": {
            "type": "string",
            "description": "Lookup key set at submission. If multiple CustomFields were indexed, values are concatenated with `::`.\n"
          },
          "recipientName": {
            "type": "string"
          },
          "address": {
            "type": "object",
            "description": "Recipient postal address. Returned with camelCase field names.",
            "properties": {
              "streetAddress": {
                "type": "string"
              },
              "postalCode": {
                "type": "string"
              },
              "locality": {
                "type": "string"
              },
              "region": {
                "type": "string"
              },
              "country": {
                "type": "string",
                "description": "ISO 3166-1 alpha-2 country code (e.g. ES)."
              },
              "postOfficeBoxAddress": {
                "type": "string"
              }
            }
          },
          "document": {
            "type": "string",
            "description": "Base64-encoded original document. Only present when `IncludeDocumentOnResult` is true.\n"
          },
          "state": {
            "type": "string",
            "description": "Current lifecycle state. `Undelivered` records reported non-delivery but does not itself close tracking. For `Registered` and `Letter` with delivery tracking enabled, the platform accepts a later valid delivery report before closure; the operator sequence is unconfirmed. `LetterLite` cannot complete normal closure with `Delivered` once non-delivery has been recorded. A `Letter` workflow configured for disposal can continue to `Disposed`; a later failure report for `Letter` can instead lead to `Failed` before closure. Individual delivery attempts are events and do not necessarily change the state. `Unknown` may appear for transitional internal states; contact support if seen in production responses.\n",
            "enum": [
              "Draft",
              "Submitted",
              "Processed",
              "Sent",
              "Dispatched",
              "Delivered",
              "Missing",
              "Closed",
              "Issued",
              "Failed",
              "Undelivered",
              "Disposed",
              "Cancelled"
            ]
          },
          "stateDate": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of the last state change."
          },
          "lastStateChangeDate": {
            "type": "string",
            "format": "date-time"
          },
          "outcome": {
            "type": "string",
            "description": "Result recorded so far; it may change while the communication is open. Treat this as the final postal result when `state` is `Closed`. `Undelivered` does not by itself identify an item awaiting collection or a return-to-sender action. `Unknown` may appear for transitional internal states; contact support if seen in production responses.\n",
            "enum": [
              "None",
              "Delivered",
              "Dispatched",
              "Acknowledged",
              "Declined",
              "Hindered",
              "Cancelled",
              "Expired",
              "Failed",
              "Sent",
              "Rejected",
              "Undelivered",
              "Disposed"
            ]
          },
          "outcomeDate": {
            "type": "string",
            "format": "date-time"
          },
          "creationDate": {
            "type": "string",
            "format": "date-time"
          },
          "submittedOn": {
            "type": "string",
            "format": "date-time"
          },
          "processedOn": {
            "type": "string",
            "format": "date-time"
          },
          "dispatchedOn": {
            "type": "string",
            "format": "date-time"
          },
          "sentOn": {
            "type": "string",
            "format": "date-time"
          },
          "deliveredOn": {
            "type": "string",
            "format": "date-time"
          },
          "closedOn": {
            "type": "string",
            "format": "date-time"
          },
          "issuedOn": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the postal item was issued."
          },
          "timeToLive": {
            "type": "integer",
            "description": "Tracking lifetime of the postal item, in minutes."
          },
          "costCentre": {
            "type": "string",
            "description": "Cost-centre label recorded with the transaction for internal billing allocation."
          },
          "onlineRetentionPeriod": {
            "type": "integer"
          },
          "notaryRetentionPeriod": {
            "type": "integer"
          },
          "notaryProfile": {
            "type": "string"
          },
          "sourceChannel": {
            "type": "string",
            "enum": [
              "Web",
              "Api",
              "Smtp"
            ]
          },
          "enableDeliveryReceipt": {
            "type": "boolean",
            "description": "For `Letter` type. Whether delivery receipt tracking is enabled."
          },
          "deliveryAttemptsNumber": {
            "type": "integer",
            "description": "For `Letter` type. Number of delivery attempts configured before the process ends."
          },
          "disposalDaysAmmount": {
            "type": "integer",
            "description": "Number of days after which an undelivered postal item is disposed of. (Note: the field name retains its original spelling in the API.)\n"
          },
          "affidavits": {
            "type": "array",
            "description": "Affidavit entries. Present when `IncludeAffidavitsOnResult` is true; bytes is populated only when the deprecated `IncludeAffidavitBlobsOnResult` option is also true.\n",
            "items": {
              "$ref": "#/components/schemas/EviPostAffidavit"
            }
          }
        }
      },
      "EviPostQueryResponse": {
        "type": "object",
        "properties": {
          "totalMatches": {
            "type": "integer",
            "description": "Total number of records matching the query filters."
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EviPostQueryResult"
            }
          }
        }
      },
      "EviPostAffidavitRequest": {
        "type": "object",
        "required": [
          "UniqueId"
        ],
        "properties": {
          "UniqueId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique ID of the EviPost to generate an affidavit for."
          },
          "IncludeDocument": {
            "type": "boolean",
            "description": "If true, the document is included in the affidavit."
          },
          "IncludeEvents": {
            "type": "boolean",
            "description": "If true, detailed event information is included in the affidavit.\n"
          }
        }
      },
      "EviPostAffidavitResponse": {
        "type": "object",
        "required": [
          "requestId"
        ],
        "properties": {
          "requestId": {
            "type": "string",
            "description": "Identifier of the affidavit generation request."
          }
        }
      },
      "EviPostCancelRequest": {
        "type": "object",
        "required": [
          "UniqueId"
        ],
        "properties": {
          "UniqueId": {
            "type": "string",
            "format": "uuid",
            "description": "The unique ID of the postal communication to cancel, as returned at submission."
          }
        }
      },
      "EviPostCancelResponse": {
        "type": "object",
        "properties": {
          "uniqueId": {
            "type": "string",
            "format": "uuid",
            "description": "The unique ID of the cancelled postal communication."
          }
        }
      },
      "Attachment": {
        "type": "object",
        "description": "Attachment metadata and base64-encoded content.",
        "properties": {
          "uniqueId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier of the attachment."
          },
          "creationDate": {
            "type": "string",
            "format": "date-time",
            "description": "Date and time the attachment was created."
          },
          "evidenceUniqueId": {
            "type": "string",
            "format": "uuid",
            "description": "Identifier of the evidence the attachment belongs to."
          },
          "partyId": {
            "type": "string",
            "format": "uuid",
            "nullable": true,
            "description": "Identifier of the related party, when applicable."
          },
          "contentId": {
            "type": "string",
            "description": "Content identifier of the attachment."
          },
          "displayName": {
            "type": "string",
            "description": "Display name of the attachment."
          },
          "filename": {
            "type": "string",
            "description": "File name of the attachment."
          },
          "mimeType": {
            "type": "string",
            "description": "MIME type of the attachment content."
          },
          "contentDescription": {
            "type": "string",
            "description": "Content description."
          },
          "contentDisposition": {
            "type": "string",
            "description": "Content disposition."
          },
          "contentLocation": {
            "type": "string",
            "description": "Content location."
          },
          "contentEncoding": {
            "type": "string",
            "description": "Content encoding."
          },
          "contentLength": {
            "type": "integer",
            "format": "int32",
            "description": "Length of the attachment content in bytes."
          },
          "hash": {
            "type": "string",
            "description": "Hash of the content (algorithm and value)."
          },
          "data": {
            "type": "string",
            "format": "byte",
            "description": "Attachment content, Base64-encoded."
          },
          "attributes": {
            "type": "array",
            "description": "Optional key-value attributes; omitted when empty.",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string"
                },
                "value": {
                  "type": "string"
                },
                "values": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      },
      "AttachmentDownloadResponse": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Attachment"
            }
          },
          "totalMatches": {
            "type": "integer",
            "description": "Total number of attachments matching the requested IDs."
          },
          "responseStatus": {
            "type": "object",
            "additionalProperties": true,
            "description": "Error details when automatic exception handling returns one."
          }
        }
      },
      "UniqueIdsRequest": {
        "type": "object",
        "required": [
          "UniqueIds"
        ],
        "properties": {
          "UniqueIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        }
      },
      "AffidavitUniqueIdsRequest": {
        "type": "object",
        "required": [
          "UniqueIds"
        ],
        "properties": {
          "UniqueIds": {
            "type": "array",
            "description": "Affidavit UUIDs to include. Duplicate values are invalid and should not be retried unchanged.",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        }
      }
    },
    "parameters": {
      "UniqueIds": {
        "name": "UniqueIds",
        "in": "query",
        "required": true,
        "schema": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "uuid"
          }
        },
        "style": "form",
        "explode": true
      },
      "AffidavitUniqueIds": {
        "name": "UniqueIds",
        "in": "query",
        "required": true,
        "description": "Affidavit UUIDs to include. Duplicate values are invalid and should not be retried unchanged.",
        "schema": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "uuid"
          }
        },
        "style": "form",
        "explode": true
      }
    },
    "responses": {
      "AffidavitArchive": {
        "description": "ZIP archive containing the requested affidavit PDFs.",
        "headers": {
          "Content-Disposition": {
            "description": "Suggested archive filename.",
            "schema": {
              "type": "string",
              "example": "attachment;filename=\"affidavits.zip\""
            }
          }
        },
        "content": {
          "application/zip": {
            "schema": {
              "type": "string",
              "format": "binary"
            }
          }
        }
      }
    }
  }
}