Get content outline
The revisable structure of one draft: the fields that can be revised (targets) and a numbered outline of the body, one entry per top-level block. Each block carries a hash, which the content edit endpoints take as base_hash to refuse an edit computed against text that has changed since.
Requires the read:content scope.
GET /v1/content/{draft_id}/outlineAuthorization
| Header | Type | Required |
|---|---|---|
Authorization | Bearer asky_sk_… | required |
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
draft_id | uuid | required | From List content drafts |
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
include_html | boolean | optional | Also return each block’s full html, to copy its markup into an edit |
Request
curl 'https://api.askylabs.com/v1/content/7c1e2b90-3f4d-4a8e-9b21-5d6f7a8b9c0d/outline?include_html=true' \
-H "Authorization: Bearer $ASKY_API_KEY"Response
200
{
"data": {
"id": "7c1e2b90-3f4d-4a8e-9b21-5d6f7a8b9c0d",
"title": "How to choose a CRM for a small team",
"status": "draft",
"language": "en",
"collection_name": "Blog Posts",
"targets": [
{ "target": "body", "label": "article body", "kind": "rich", "chars": 18342, "writable": true },
{ "target": "title", "label": "title", "kind": "plain", "chars": 36, "writable": true },
{ "target": "meta_description", "label": "meta description", "kind": "plain", "chars": 148, "writable": true },
{ "target": "webflow_plain:64f0c2a1b3d4e5f6a7b8c9d0:card-subtitle", "label": "card-subtitle", "kind": "plain", "chars": 61, "writable": true }
],
"body_block_count": 42,
"body_outline": [
{ "index": 0, "type": "heading", "preview": "Why small teams outgrow spreadsheets", "hash": "5f1c9a2e", "html": "<h2>Why small teams outgrow spreadsheets</h2>" },
{ "index": 1, "type": "paragraph", "preview": "A spreadsheet works until two people edit it at once...", "hash": "a83b0d71", "html": "<p>A spreadsheet works until two people edit it at once...</p>" }
]
},
"request_id": "req_e5f14ac0015b4d63a91a"
}Response fields
| Field | Type | Description |
|---|---|---|
data.id | uuid | required. The draft |
data.title | string | null | required |
data.status | string | required |
data.language | string | null | required |
data.collection_name | string | null | required. The CMS collection, when the draft has one |
data.targets | array | required. The fields that can be revised: target, label, kind (rich or plain), chars, and writable (whether the content edit endpoints can change it) |
data.body_block_count | integer | required |
data.body_outline | array | required. One entry per block: index, type, preview, hash, and html with include_html |
request_id | string | required |
Last updated on