---
title: "Generate Document Email Draft"
method: POST
path: "/api/businesses/{business_id}/documents/generate-email-draft"
tags: ["Businesses"]
---

# Generate Document Email Draft

`POST /api/businesses/{business_id}/documents/generate-email-draft`

## Request

- Base URL: `https://api.flagpost.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.flagpost.ai/api/businesses/{business_id}/documents/generate-email-draft`
- Auth: HTTP bearer

Generate document request email draft without sending.

Returns email content for preview before sending.

## Path parameters

- `business_id` string, required

## Request body

- DocumentRequestRequest: Request to send document request list to seller.
  - `template_id` string, nullable
  - `custom_documents` string[], nullable
  - `message` string, nullable
  - `due_date` string, nullable
  - `custom_subject` string, nullable
  - `custom_body_html` string, nullable

## Response `200`

Successful Response

- DocumentEmailDraftResponse: Response for document request email draft.
  - `subject` string, required
  - `body_html` string, required
  - `body_text` string, required
  - `recipient_email` string, required
  - `recipient_name` string, nullable, required
  - `requested_documents` string[], required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/flagpost/apis/flagpost-api.md) - [All operations](https://skmtc.dev/flagpost/apis/flagpost-api/llms.txt) - [OpenAPI document](https://skmtc.dev/flagpost/apis/flagpost-api/revisions/0308cef485ca?raw)
