Scripto docs
View as Markdown

POST /api/articles/[id]/notes

Add one typed note to the Brief — kind, title, optional body and url. createdBy is inferred from the principal. Backs scripto note add.

The CLI equivalent is scripto note add <id> --kind <kind> --title <t> [--url …] [--body …|--file …|--stdin].

Adds one typed note to the Brief. createdBy is inferred from the principal — a Bearer/CLI write is an agent; a web/session write is a human.

Endpoint

POST https://scripto.codika.io/api/articles/{id}/notes

Auth

Authorization: Bearer scripto_…

Request

FieldTypeMeaning
kindstringRequired. One of source, decision, idea, question.
titlestringRequired, non-empty. The note’s short label.
bodystring | nullOptional Markdown detail.
urlstring | nullOptional link (mainly for sources).
{ "kind": "source", "title": "Medium import docs", "url": "https://help.medium.com/…" }

Response (201)

{
  "success": true,
  "data": {
    "note": { "anchor": "1a2b3c4d", "kind": "source", "title": "Medium import docs", "url": "https://…", "createdBy": "agent", "html": null },
    "notes": [ "… the fresh notes map …" ]
  }
}

Errors

HTTPcodeCausenextAction
400invalid-argumentUnknown/missing kind.Pass --kind with one of: source, decision, idea, question.
400invalid-argumentEmpty title, or wrong body/url type.
404not-foundNo such article, or you don’t own it.
401unauthenticatedMissing or invalid key.

curl

curl -sS -X POST "https://scripto.codika.io/api/articles/$ID/notes" \
  -H "Authorization: Bearer $SCRIPTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"kind":"decision","title":"Lead with the install","body":"Every answer starts with scripto <cmd>."}'

Next