---
title: GET /api/articles/[id]/outline
description: The cheap section map of an article — one entry per section (anchor, level, title, word count, source), never the bodies. Backs scripto outline.
---

<Note>

The CLI equivalent is `scripto outline <id>`. This is the route an agent reads before editing a single section.

</Note>

Returns the **cheap map** of a story: one entry per section, never the bodies. It stays tiny no matter how long the article grows — the right thing to read before editing one section.

## Endpoint

```text
GET https://scripto.codika.io/api/articles/{id}/outline
```

## Auth

`Authorization: Bearer scripto_…`

## Response (200)

```json
{
  "success": true,
  "data": {
    "article": { "id": "0a1b2c3d-…", "title": "Our launch", "status": "draft", "wordCount": 1240 },
    "outline": [
      { "anchor": "a1b2c3d4", "level": 1, "title": "Our launch", "words": 52, "source": "markdown" },
      { "anchor": "e5f6a7b8", "level": 2, "title": "What changed", "words": 318, "source": "markdown" }
    ]
  }
}
```

Each outline entry: `anchor` (the first 8 chars of the section id — any unique prefix works as an anchor), `level` (heading level), `title`, `words`, and `source` (`markdown` or `html`).

## Errors

| HTTP | `code` | Cause |
|---|---|---|
| 401 | `unauthenticated` | Missing or invalid key. |
| 404 | `not-found` | No such article, or you don't own it. |
| 500 | `internal` | Backend error. |

## curl

```bash
curl -sS "https://scripto.codika.io/api/articles/$ID/outline" \
  -H "Authorization: Bearer $SCRIPTO_API_KEY"
```

## Next

- **[GET .../sections/[sid]](/api-reference/get-section)** — pull one section.
- **[The ordered-sections model](/concepts/sections)** — the concept.
