---
title: "Draft an Email from a Sales Order Case"
method: POST
path: "/v2/sales-order-cases/{case_id}/emails"
tags: ["sales-order-cases"]
---

# Draft an Email from a Sales Order Case

`POST /v2/sales-order-cases/{case_id}/emails`

## Request

- Base URL: `https://api.stuut.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.stuut.ai/v2/sales-order-cases/{case_id}/emails`
- Auth: HTTP bearer

The draft goes to the case contact, or else the customer's outreach address, from the user's default
sender. It names the order by the customer's PO, else the sales order number. An early ship case's
body lists the lines with their scheduled and new ship dates, for the user to edit before sending;
other cases start with an empty line. Every body ends with an AI notice.

## Path parameters

- `case_id` string, required

## Response `200`

Successful Response

- SalesOrderCaseEmailSchema: An email written from a case.
  - `created_at` string, date-time, required
  - `modified_at` string, date-time, nullable, required
  - `id` string, required
  - `subject` string, nullable, required
  - `snippet` string, nullable, required
  - `from` string, nullable, required
  - `to` string[], required
  - `cc` string[], required: List of CC email addresses
  - `direction` 'inbound' | 'outbound', required
  - `status` 'draft' | 'pending' | 'sending' | 'sent' | 'error', required
  - `sent_at` string, date-time, nullable, required: When the email was sent.
  - `is_unread` boolean, required
  - `author_id` string, nullable, required
  - `author_name` string, nullable, required
  - `processing_status` 'processing' | 'completed' | 'failed', required
  - `thread_id` string, required
  - `object` string, required: String representing the object's type. Objects of the same type share the same value.

## Other responses

- `422`: Validation Error

---

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