PATCH /api/articles/[id]/notes/[nid]
Update one or more of a note's fields — kind, title, body, url. Only the fields you pass change. Backs scripto note set.
The CLI equivalent is scripto note set <id> <anchor> [--kind …] [--title …] [--url …|--clear-url] [--body …|--clear-body].
Updates one or more of a note’s fields. Only the fields you pass change. nid is a note anchor.
Endpoint
PATCH https://scripto.codika.io/api/articles/{id}/notes/{nid} Auth
Authorization: Bearer scripto_…
Request
At least one of:
| Field | Type | Meaning |
|---|---|---|
kind | string | One of source, decision, idea, question. |
title | string | Non-empty. |
body | string | null | null clears it. |
url | string | null | null clears it. |
{ "title": "Lead with the install", "url": null } Response (200)
{
"success": true,
"data": {
"note": { "anchor": "1a2b3c4d", "kind": "decision", "title": "Lead with the install", "…": "…" },
"notes": [ "… the fresh notes map …" ]
}
} Errors
| HTTP | code | Cause | nextAction |
|---|---|---|---|
| 400 | invalid-argument | Nothing to change; unknown kind; empty title; wrong type; or ambiguous anchor. | Use a longer anchor. |
| 404 | not-found | No such article, or no note matches the anchor. | Call GET /notes for current anchors. |
| 401 | unauthenticated | Missing or invalid key. | — |
curl
curl -sS -X PATCH "https://scripto.codika.io/api/articles/$ID/notes/1a2b3c4d" \
-H "Authorization: Bearer $SCRIPTO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"title":"Lead with the install"}' Next
- DELETE …/notes/[nid] — remove a note.