Skip to Content
APIEndpointsUpdate content draft

Update content draft

Changes a draft’s title, meta description, slug or plain CMS fields. Send only what you want to change. The draft changes at once, also for teammates who have it open in the editor; the live page changes only when the draft is published.

  • fields takes the targets Get content outline lists with kind plain and writable true, matched exactly.
  • The slug of a published draft cannot change: the page is live at its address.
  • Values are plain text: html tags and control characters are refused.

Requires the write:content scope, and the workspace must be enabled for API writes.

PATCH /v1/brands/{brand_id}/content/{draft_id}

Authorization

HeaderTypeRequired
AuthorizationBearer asky_sk_…required
Idempotency-Keystringrequired

Path parameters

ParameterTypeRequiredDescription
brand_iduuidrequiredFrom List brands
draft_iduuidrequiredFrom List content drafts

Query parameters

None.

Body

application/json. At least one field is required.

FieldTypeRequiredDescription
titlestring, up to 300 charsoptionalCannot be empty
meta_descriptionstring, up to 500 charsoptional
slugstring, up to 200 charsoptionalLowercase letters, digits and single hyphens
fieldsarray, up to 20optional{ "target": "...", "value": "..." }, value up to 5,000 chars

Request

curl --request PATCH \ --url 'https://api.askylabs.com/v1/brands/242546de-4cee-4a7d-952e-f6aa60c63ef8/content/7c1e2b90-3f4d-4a8e-9b21-5d6f7a8b9c0d' \ --header 'Authorization: Bearer <api-key>' \ --header 'Idempotency-Key: <unique-per-attempt>' \ --header 'Content-Type: application/json' \ --data '{"meta_description":"How to pick a CRM your small team will actually use, with a five-point checklist."}'

Response

{ "data": { "draft_id": "7c1e2b90-3f4d-4a8e-9b21-5d6f7a8b9c0d", "updated": ["meta_description"], "version": 14, "review_url": "https://app.askylabs.com/content/7c1e2b90-3f4d-4a8e-9b21-5d6f7a8b9c0d", "live_page_updated": false, "translations_unchanged": [{ "draft_id": "1d2e3f40-5a6b-4c7d-8e9f-0a1b2c3d4e5f", "language": "de" }] }, "request_id": "req_7d21b0af59c34e18b6ac" }

Response fields

FieldTypeDescription
data.draft_iduuidrequired
data.updatedstring[]required. What changed: title, meta_description, slug, and webflow:<field>, sanity:<field> or wordpress:<field>
data.versionintegerrequired. The draft’s version after the change
data.review_urlstringrequired. The draft in the app
data.live_page_updatedbooleanrequired. Always false: publishing the draft updates the live page
data.translations_unchangedarrayrequired. The draft’s translations, which this change does not touch
request_idstringrequired
Last updated on