---
title: "Manually create a wine reference"
method: POST
path: "/wines"
tags: ["wines"]
---

# Manually create a wine reference

`POST /wines`

## Request

- Base URL: `https://api.emile.wine` (the document declares no server; this is the origin it was published from)
- URL: `https://api.emile.wine/wines`
- Auth: HTTP bearer

Used when neither the scan nor the text search surface the wine. Calls the same LLM enrichment used by scan to fill in grape varieties, food pairings, region, etc. If the LLM is unavailable the raw user input is inserted as-is so the user never ends up in a dead end. The created wine is public (visible to all users), tagged via `source` so we can audit / clean later.

## Headers

- `X-API-Key` string, nullable

## Request body

- WineCreate: User-provided wine reference. All fields except `name` are optional; the LLM-enrichment step fills the gaps when configured. `color` is restricted to the same allowlist as the CHECK constraint on `wine_references.color` so an invalid value is rejected at the edge instead of bubbling up as a Postgres error.
  - `name` string, required
  - `producer` string, nullable
  - `appellation` string, nullable
  - `region` string, nullable
  - `country` string, nullable
  - `color` 'rouge' | 'blanc' | 'rosé' | 'effervescent' | 'liquoreux' | 'other', nullable

## Response `201`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

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