Skip to Content
APIEndpointsGet content outline

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}/outline

Authorization

HeaderTypeRequired
AuthorizationBearer asky_sk_…required

Path parameters

ParameterTypeRequiredDescription
draft_iduuidrequiredFrom List content drafts

Query parameters

ParameterTypeRequiredDescription
include_htmlbooleanoptionalAlso 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

{ "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

FieldTypeDescription
data.iduuidrequired. The draft
data.titlestring | nullrequired
data.statusstringrequired
data.languagestring | nullrequired
data.collection_namestring | nullrequired. The CMS collection, when the draft has one
data.targetsarrayrequired. 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_countintegerrequired
data.body_outlinearrayrequired. One entry per block: index, type, preview, hash, and html with include_html
request_idstringrequired
Last updated on