---
title: "Generate Message"
method: POST
path: "/api/messages/generate"
tags: ["Messages"]
---

# Generate Message

`POST /api/messages/generate`

## Request

- Base URL: `https://api.soeru.biz` (the document declares no server; this is the origin it was published from)
- URL: `https://api.soeru.biz/api/messages/generate`
- Auth: none declared. Required headers: `authorization`

Generate a personalized message for an order.

Same-day restoration: returns cached message if already generated today.
Rate limit: 30 requests per minute per user.

Wave 4 (2026-05-05): mode='reflective' で予約 path に分岐.

## Headers

- `x-shop-id` string, nullable: Optional shop ID
- `authorization` string, required: Bearer <token>

## Request body

- GenerateRequest
  - `order_id` string, required
  - `customer_name` string
  - `customer_email` string, nullable
  - `item_names` string[]
  - `total_price` integer
  - `is_gift` boolean
  - `delivery_context` string, nullable
  - `repeat_count` integer, nullable
  - `is_repeat` boolean, nullable
  - `mode` string

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

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