# Request an on-demand affidavit

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.

Endpoint: POST /v2/EviNotice/Affidavits/Request
Version: 1.0
Security: basicAuth

## Security:

  - `basicAuth` (unknown)
    http basic

## Request fields (application/json):

  - `Id` (string, required)
    The unique ID of the EviNotice, as returned at submission.

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

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

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

## Response 200:

  - `200` (unknown)
    Affidavit request accepted. Generation is asynchronous; an AffidavitPublished callback fires when the affidavit is ready.

## Response 200 fields (application/json):

  - `RequestId` (string)
    Unique identifier for this affidavit request. Use it to correlate the subsequent AffidavitPublished callback.

## Response 401:

  - `401` (unknown)
    Authentication failed

## Response 403:

  - `403` (unknown)
    The per-notice on-demand affidavit limit has been reached.

## Response 404:

  - `404` (unknown)
    Notice not found among those submitted by this user.

## Response 405:

  - `405` (unknown)
    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).

