Scripto docs
View as Markdown

DELETE /api/articles/[id]/sections/[sid]

Remove one section by anchor. If it was the last one, the article keeps a single empty section so it stays editable. Backs scripto section rm.

The CLI equivalent is scripto section rm <id> <anchor>.

Removes one section, addressed by anchor. If it was the last remaining section, the article keeps one empty section so it stays editable.

Endpoint

DELETE https://scripto.codika.io/api/articles/{id}/sections/{sid}

Auth

Authorization: Bearer scripto_…

Response (200)

{ "success": true, "data": { "outline": [ "… the full fresh outline …" ] } }

Errors

HTTPcodeCausenextAction
400invalid-argumentThe anchor is ambiguous.Use a longer anchor.
404not-foundNo such article, or no section matches the anchor.Call GET /outline for current anchors.
401unauthenticatedMissing or invalid key.

curl

curl -sS -X DELETE "https://scripto.codika.io/api/articles/$ID/sections/e5f6a7b8" \
  -H "Authorization: Bearer $SCRIPTO_API_KEY"

Next