Update a study guide
PATCH/study-guides/:study_guide_id
Partial update of any subset of title, description, content,
or tags. Only fields provided in the request body are touched;
absent fields preserve their current values. Tags, when provided,
are REPLACED entirely (no merge) and normalized server-side
(trim + lowercase + dedupe).
Creator-only: 403 if the viewer is not the guide's creator. 404 for missing or already-deleted guides. Order of checks:
- Validate the request body (per-field caps + at-least-one field provided).
- Fetch + lock guide row.
- 404 if missing or deleted_at IS NOT NULL.
- 403 if creator_id != viewer_id.
- UPDATE only the provided fields, set updated_at = now(), COMMIT.
- Re-hydrate the full StudyGuideDetail (same shape as GET).
Request
Responses
- 200
- 400
- 401
- 403
- 404
- 500
The updated study guide.
Bad request
Unauthorized
Forbidden
Not found
Internal server error