# EviMail

Certified email submission, status tracking, and on-demand affidavits via v1, plus batch delivery, recipients, and attachments via v2.

## Submit a certified email

 - [POST /v1/EviMail/Submit](https://docs.namirial.app/products/namirialnotify/apis/oas/namirialnotify-api/evimail/evimailsubmit.md)

## Query certified emails (GET)

 - [GET /v1/EviMail/Query](https://docs.namirial.app/products/namirialnotify/apis/oas/namirialnotify-api/evimail/evimailqueryget.md)

## Request an on-demand affidavit

 - [POST /v1/EviMail/AffidavitRequest](https://docs.namirial.app/products/namirialnotify/apis/oas/namirialnotify-api/evimail/evimailaffidavitrequest.md): 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.

## Create an email batch

 - [POST /v2/EviMail/Batches](https://docs.namirial.app/products/namirialnotify/apis/oas/namirialnotify-api/evimail/evimailbatchcreate.md): 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.

## Query email batches (HTTP QUERY method)

 - [GET /v2/EviMail/Batches](https://docs.namirial.app/products/namirialnotify/apis/oas/namirialnotify-api/evimail/evimailbatchesquery.md): Lists email batches owned by the caller (or the caller's site), with cursor pagination.

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).

## Get an email batch

 - [GET /v2/EviMail/Batches/{BatchId}](https://docs.namirial.app/products/namirialnotify/apis/oas/namirialnotify-api/evimail/evimailbatchget.md): Retrieves the full state of a batch, including its configured email template and processing progress.

## Update an email batch

 - [PATCH /v2/EviMail/Batches/{BatchId}](https://docs.namirial.app/products/namirialnotify/apis/oas/namirialnotify-api/evimail/evimailbatchpatch.md): 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.

## Delete an email batch

 - [DELETE /v2/EviMail/Batches/{BatchId}](https://docs.namirial.app/products/namirialnotify/apis/oas/namirialnotify-api/evimail/evimailbatchdelete.md): Removes a previously created batch.

## Set the batch body

 - [PUT /v2/EviMail/Batches/{BatchId}/Body](https://docs.namirial.app/products/namirialnotify/apis/oas/namirialnotify-api/evimail/evimailbatchbodyput.md): 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.

## Add batch recipients (CSV)

 - [POST /v2/EviMail/Batches/{BatchId}/Recipients](https://docs.namirial.app/products/namirialnotify/apis/oas/namirialnotify-api/evimail/evimailbatchrecipientspost.md): 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).

## Query batch recipients (HTTP QUERY method)

 - [GET /v2/EviMail/Batches/{BatchId}/Recipients](https://docs.namirial.app/products/namirialnotify/apis/oas/namirialnotify-api/evimail/evimailbatchrecipientsquery.md): Lists the recipients of a batch, with cursor pagination.

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.

## Delete all batch recipients

 - [DELETE /v2/EviMail/Batches/{BatchId}/Recipients](https://docs.namirial.app/products/namirialnotify/apis/oas/namirialnotify-api/evimail/evimailbatchrecipientsdelete.md): Removes all recipients from the batch.

## Add a batch attachment

 - [POST /v2/EviMail/Batches/{BatchId}/Attachments](https://docs.namirial.app/products/namirialnotify/apis/oas/namirialnotify-api/evimail/evimailbatchattachmentspost.md): 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.

## List batch attachments

 - [GET /v2/EviMail/Batches/{BatchId}/Attachments](https://docs.namirial.app/products/namirialnotify/apis/oas/namirialnotify-api/evimail/evimailbatchattachmentsget.md): Returns metadata for all attachments configured on the batch.

## Delete all batch attachments

 - [DELETE /v2/EviMail/Batches/{BatchId}/Attachments](https://docs.namirial.app/products/namirialnotify/apis/oas/namirialnotify-api/evimail/evimailbatchattachmentsdelete.md): Removes all attachments from the batch.

## Download a batch attachment

 - [GET /v2/EviMail/Batches/{BatchId}/Attachments/{AttachmentId}](https://docs.namirial.app/products/namirialnotify/apis/oas/namirialnotify-api/evimail/evimailbatchattachmentget.md): Downloads the binary content of a single batch attachment.

## Delete a batch attachment

 - [DELETE /v2/EviMail/Batches/{BatchId}/Attachments/{AttachmentId}](https://docs.namirial.app/products/namirialnotify/apis/oas/namirialnotify-api/evimail/evimailbatchattachmentdelete.md): Removes a single attachment from the batch.

