# Request an on-demand affidavit

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. The submitting owner can request one while the transaction is active, the affidavit profile permits on-demand generation, and the configured limit has not been reached.

Endpoint: POST /v1/EviMail/AffidavitRequest
Version: 1.0
Security: basicAuth

## Security:

  - `basicAuth` (unknown)
    http basic

## Request fields (application/json):

  - `UniqueId` (string, required)
    Unique ID of the EviMail to generate an affidavit for.

  - `IncludeBody` (boolean)
    Include the email body in the affidavit.

  - `IncludeAttachments` (boolean)
    Include email attachments in the affidavit. Attachments must have been submitted with IncludeOnAffidavits true.

  - `IncludeEvents` (boolean)
    Include detailed event information in the affidavit.

## Response 200:

  - `200` (unknown)
    Affidavit request accepted. Generation is asynchronous.

## Response 200 fields (application/json):

  - `requestId` (string, required)

## Response 400:

  - `400` (unknown)
    Invalid request or business rule failure

## Response 400 fields (application/json):

  - `responseStatus` (object)

  - `responseStatus.errorCode` (string)

  - `responseStatus.message` (string)

  - `responseStatus.errors` (array)

## Response 401:

  - `401` (unknown)
    Authentication failed

