Undo content edit
Reverses an edit made with Apply content edits, also in every editor where the draft is open. Refused with 409 conflict once the edited blocks have changed since, when it was already undone, or while the draft has suggestions waiting for review. The undo is itself logged with a new edit_id, so it can be undone in turn.
Requires the write:content scope, and the workspace must be enabled for API writes.
POST /v1/brands/{brand_id}/content/{draft_id}/edits/{edit_id}/undoAuthorization
| Header | Type | Required |
|---|---|---|
Authorization | Bearer asky_sk_… | required |
Idempotency-Key | string | required |
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
brand_id | uuid | required | From List brands |
draft_id | uuid | required | The draft the edit changed |
edit_id | uuid | required | From Apply content edits |
Query parameters
None.
Request
curl --request POST \
--url 'https://api.askylabs.com/v1/brands/242546de-4cee-4a7d-952e-f6aa60c63ef8/content/7c1e2b90-3f4d-4a8e-9b21-5d6f7a8b9c0d/edits/5e6f7a8b-9c0d-4e1f-a2b3-c4d5e6f7a8b9/undo' \
--header 'Authorization: Bearer <api-key>' \
--header 'Idempotency-Key: <unique-per-attempt>'Response
200
{
"data": {
"edit_id": "6f7a8b9c-0d1e-4f2a-b3c4-d5e6f7a8b9c0",
"undone_edit_id": "5e6f7a8b-9c0d-4e1f-a2b3-c4d5e6f7a8b9",
"draft_id": "7c1e2b90-3f4d-4a8e-9b21-5d6f7a8b9c0d",
"undo_available": true,
"review_url": "https://app.askylabs.com/content/7c1e2b90-3f4d-4a8e-9b21-5d6f7a8b9c0d",
"live_page_updated": false,
"translations_unchanged": []
},
"request_id": "req_7d21b0af59c34e18b6ac"
}Response fields
| Field | Type | Description |
|---|---|---|
data.edit_id | uuid | null | required. The undo’s own edit, which can be undone in turn |
data.undone_edit_id | uuid | required |
data.draft_id | uuid | required |
data.undo_available | boolean | required |
data.review_url | string | required |
data.live_page_updated | boolean | required. Always false |
data.translations_unchanged | array | required |
request_id | string | required |
Last updated on