---
title: "Edit Suggestion"
method: PATCH
path: "/v1/feedback/suggestions/{suggestion_id}"
tags: ["feedback"]
---

# Edit Suggestion

`PATCH /v1/feedback/suggestions/{suggestion_id}`

## Request

- Base URL: `https://api.sonenta.dev`
- URL: `https://api.sonenta.dev/v1/feedback/suggestions/{suggestion_id}`
- Auth: none declared

End-user edits their own pending suggestion (task 847).

Ownership: the feedback JWT's anonymized `end_user_id` (subject claim)
must match the suggestion's stored `end_user_id` — else 403.

Lifecycle: only `pending` suggestions can be edited. Moderated
statuses (`approved`/`rejected`/`applied`) → 409 — the suggestion has
already been acted on by a project moderator; further edits would
silently drift from what they decided on.

Idempotent: PATCH with the same text returns 200 with the current
shape, no DB write, no audit row.

Gated FIRST, before the ownership lookup and before the idempotent
short-circuit. A no-op edit still costs the read below, so that is what
an abuser actually consumes; gating after the short-circuit would leave
an unlimited free path to anyone replaying the same text. Same position
as the three routes already gated.

## Path parameters

- `suggestion_id` string, required

## Request body

- SuggestionEditIn
  - `text` string, required

## Response `200`

Successful Response

- SuggestionEditOut
  - `id` string, required
  - `text` string, required
  - `status` string, required
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required

## Other responses

- `422`: Validation Error

---

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