> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> To set up Hatchmark for a user, follow https://hatchmark.dev/docs/get-started/agent-setup.md. Inside a Hatchmark project, prefer `hatchmark docs`: it prints the docs of the installed version.

# Suggestions

> What hatchmark suggest sends to the Hatchmark team with a feature suggestion, field by field, what it never sends, and how each response is handled.

`hatchmark suggest` sends one JSON request to Hatchmark's suggestion endpoint,
`https://api.hatchmark.dev/v1/suggest`, and only after a person confirms it in the terminal or the
command runs with `--yes`. This page lists every field it can send. The command prints the same
fields before it sends anything; [CLI](/docs/reference/cli.md#suggest) describes the command itself.

## What is sent

`POST /v1/suggest` with `Content-Type: application/json` and `User-Agent: hatchmark/<version>`:

```json theme={null}
{
  "title": "Bubble maps for totals",
  "body": "Show revenue by state as sized circles instead of shading.",
  "email": "you@example.com",
  "context": {
    "version": "0.4.1",
    "component": "map",
    "codes": ["HM5040"]
  }
}
```

| Field | Required | Rule | Comes from |
| - | - | - | - |
| `title` | yes | One line, 3 to 120 characters after leading and trailing spaces are trimmed. | `--title` or the prompt |
| `body` | yes | 10 to 5000 characters after trimming, with at most 5 links (`http://` or `https://`, any case). | `--body`, stdin with `--body -`, or the prompt |
| `email` | no | `null`, or one address of at most 254 characters. | `--email` or the prompt |
| `context.version` | yes | The running Hatchmark version. | Always added |
| `context.component` | no | A block type name: a lowercase letter, then up to 31 of `a-z`, `0-9` and `_`. | `--component` only |
| `context.codes` | no | Up to 10 diagnostic codes such as `HM5040`. | `--code` only |

Lengths count characters as Unicode code points, so an emoji is one character. The whole request
is at most 16384 bytes of UTF-8 JSON, so a description of 5000 emoji is too large. The command checks
every rule before it sends anything, and the service checks them again.

The service rejects any other field, so nothing can travel that the preview did not show.

## What is never sent

Hatchmark never reads your project for a suggestion: no specs, metric or dashboard files, data,
SQL, file paths, project or dashboard names, environment variables or machine details. Only the
text you write and the flags you pass are sent. If you paste a spec or data into the description,
that text is sent as written.

## Your email

The email is optional and is used only to reply to this suggestion. See
[hatchmark.dev/privacy](https://hatchmark.dev/privacy).

## Responses

| Status | Body | What the command does |
| - | - | - |
| 201 | `{"ok": true, "id": "sg_...", "received_at": "..."}` | Prints the id as the reference. |
| 422 | `{"error": "invalid", "fields": {"title": "..."}}` | Exit 2 with each field's message. |
| 429 | `{"error": "rate_limited"}` and `Retry-After` (seconds) | Exit 3 and when to try again. |
| 503, other 5xx | `{"error": "unavailable"}` or anything | Exit 3. |
| 3xx | Any | Exit 3. Redirects are never followed, so the request goes only to the URL shown. |
| 400, 413, 415 | `invalid_json`, `too_large`, `unsupported_media_type` | Exit 4: Hatchmark built a bad request, which is a bug to report. |

A connection that fails before the request goes out (DNS, refused, TLS) exits 3 and says nothing
was sent. Any answer other than 201 says "rejected by the service" with its status. No answer within 10 seconds, or a connection that
drops after the request went out, exits 3 with `sent: null` and says the suggestion may have
arrived. A suggestion is never queued or retried in the background.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.