Re-deliver draft to CMS
deliver_draftRe-deliver one already approved article to the workspace's destination as a draft: a file in its git repository, or a draft document in its Sanity dataset. approve_post already delivers on approval, so this is the retry and the re-send after an edit, not the normal path. Requires the last run_gate check to have passed and the article to be ready (approve_post first); otherwise it refuses with degraded reason gate-failed or not-ready. It never publishes, never deletes and never removes the draft flag: publishing stays the human's. Git (provider github): the file is written with draft: true forced, whatever key the destination maps that to. Delivering the same article again overwrites the same path, so it is safe to repeat; if the slug changed since the last delivery the new path is written and previousPath names the old file, which is left in place for the human to delete. Returns path, commitSha, htmlUrl (the file on GitHub), commitUrl, updated (false on the first delivery) and pendingImageSlots: the pictures the article asked for and nobody uploaded, which the human adds in the CMS. Sanity (provider sanity): it creates or patches the draft drafts.seodraft-<id>; re-delivering patches only the fields seodraft maps, so an author, category or image set in Studio survives. Returns documentId, studioUrl (opens the draft in Studio), updated, pendingImageSlots and degradations: what the destination's Portable Text could not carry (kind image-skipped with the image URL, or converter with what was flattened), which the human fixes in Studio. Other degraded reasons: no-target (nothing configured in Profile -> Publishing), no-token, secrets-key-missing, github-error or sanity-error (with status and the CMS's own message).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| workspaceId | No | The workspace this call acts on, as listed by list_workspaces. Left out, the call uses the workspace the account is in right now. |