---
title: "Update Source Annotation"
method: PATCH
path: "/sources/{source_id}/annotations/{annotation_id}"
tags: ["Sources"]
---

# Update Source Annotation

`PATCH /sources/{source_id}/annotations/{annotation_id}`

## Path parameters

- `source_id` string, required
- `annotation_id` string, required

## Query parameters

- `type` 'repository' | 'documentation' | 'research_paper' | 'huggingface_dataset' | 'local_folder' | 'slack' | 'google_drive' | 'connector', nullable — Source type hint

## Request body

- SourceAnnotationUpdateRequest
  - `kind` 'note' | 'tip' | 'warning' | 'gotcha', nullable — Updated annotation category
  - `content` string, nullable — Updated annotation body

## Response `200`

Successful Response

- SourceCurationResponse — Full curation state for a source.
  - `source_id` string, required — Source identifier
  - `source_type` 'repository' | 'documentation' | 'research_paper' | 'huggingface_dataset' | 'local_folder' | 'slack' | 'google_drive' | 'connector', required — Source type
  - `trust_signals` SourceTrustSignals — Trust and curation signals attached to a source.
    - `trust_level` 'low' | 'medium' | 'high' — User or team trust preference for the source
    - `trust_tier` 'low' | 'medium' | 'high' | 'verified' — Effective trust tier after derived verified/global signals
    - `scope` 'private' | 'organization' | 'global' — Ownership scope of the source
    - `is_global` boolean — Whether the source references a shared global source
    - `is_verified` boolean — Whether the source has a Nia-verified overlay
    - `overlay_available` boolean — Whether a curated overlay is attached
    - `annotation_count` integer — Number of saved annotations for this source
  - `overlay` SourceCuratedOverlay — Structured high-confidence guidance layered on top of a source.
    - `kind` 'custom' | 'nia_verified' — Overlay provenance
    - `summary` string, required — Short high-confidence summary for the source
    - `guidance` string, nullable — Longer coding-agent guidance or caveats
    - `recommended_queries` string[] — Suggested follow-up prompts for agents
    - `updated_at` string, nullable — Last overlay update timestamp (ISO)
  - `annotations` SourceAnnotation[] — Saved annotations for the source
    - `id` string, required — Annotation identifier
    - `kind` 'note' | 'tip' | 'warning' | 'gotcha' — Annotation category
    - `content` string, required — Annotation text
    - `created_at` string, nullable — Creation timestamp (ISO)
    - `updated_at` string, nullable — Last update timestamp (ISO)
  - `created_at` string, nullable — Curation record creation timestamp (ISO)
  - `updated_at` string, nullable — Curation record update timestamp (ISO)

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/trynia/apis/nia-ai-api.md) · [All operations](https://skmtc.net/trynia/apis/nia-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/trynia/nia-ai-api/versions/d216ffc3efb6/schema)
