---
title: "Generate Email"
method: POST
path: "/api/v3/summary/generate-email"
---

# Generate Email

`POST /api/v3/summary/generate-email`

Generate an email to an institution using a prompt and selected insights.

## Request body

- EmailPromptRequest
  - `institution_id` string, required
  - `tone` string, required
  - `template` string, nullable
  - `context` EmailContextItem[], required
    - `type` string, required
    - `data` object, required
  - `insights` Insights[], nullable
    - `id` string, nullable
    - `type` string, required
    - `content` string, nullable
    - `column_name` string, nullable
    - `supplier_items` object, nullable
    - `count` integer, nullable

## Response `200`

Successful Response

- EmailResponse
  - `subject` string, required
  - `body` string, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/nationgraph/apis/nationgraph-api.md) · [All operations](https://skmtc.net/nationgraph/apis/nationgraph-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/nationgraph/nationgraph-api/revisions/85804e68d86d/schema)
