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
| HTTP | code | Cause | nextAction |
|---|---|---|---|
| 400 | invalid-argument | The anchor is ambiguous. | Use a longer anchor. |
| 404 | not-found | No such article, or no section matches the anchor. | Call GET /outline for current anchors. |
| 401 | unauthenticated | Missing or invalid key. | — |
curl
curl -sS -X DELETE "https://scripto.codika.io/api/articles/$ID/sections/e5f6a7b8" \
-H "Authorization: Bearer $SCRIPTO_API_KEY" Next
- GET …/outline — re-read the anchors.
- Working with sections — the loop.