Create Review Response Draft Route
Create or regenerate the AI-drafted reply for one own-brand review.
Authorization is mandatory and runs BEFORE any review body is read or
the LLM is called: _get_brand_or_404 proves the caller owns
brand_id; generate_review_response_draft then resolves
review_id as an own-brand review of that brand — never a
competitor’s — before touching the provider (Design §4.2’s server-side
authorization paragraph). Both “wrong brand” and “competitor-owned
review_id” surface as the same 404, by design — see
ReviewResponseDraftReviewNotFound.
Regenerating an already-drafted review OVERWRITES the existing row
(Design §4.3) — this route is both “create” and “regenerate”, the DB
upsert on the unique review_id index is what prevents a second row.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Response
Successful Response
One AI-drafted reply, as served to every consuming surface.
draft, edited, copied, dismissed