/
Change a draft
Change a draft's text or fields in one version. Send the version you read; a newer one is a conflict carrying it. Use this when someone asks to edit a saved draft. ops are the draft's own operations, applied as one new version: replace_text, rewrite, add_section, update_section, remove_section, move_section and set_field (title, purpose, audience). expectedRevisionNo is required; a newer version is 409 revision_conflict carrying it. The version is the key holder's own text, recorded with the key and never as written by the assistant, and it is not run through the assistant's drafting checks. A change takes an approved draft back out of review.
Security
bearerKey
- Mock serverhttps://docs.societyhealth.co/_mock/docs/openapi/api/v1/drafts/{id}
- https://hrcledger.comhttps://hrcledger.com/api/v1/drafts/{id}
curl -i -X PATCH \
'https://docs.societyhealth.co/_mock/docs/openapi/api/v1/drafts/{id}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"expectedRevisionNo": 3,
"ops": [
{
"op": "update_section",
"sectionId": "s_Hj7kL9mN",
"text": "Could we talk Thursday?\n\nBest, Alex"
}
]
}'Response
{ "ok": true, "data": { "id": "Drf5tH8jKw2qR6mX9vBz", "url": "https://hrcledger.com/drafts/items/Drf5tH8jKw2qR6mX9vBz", "title": "Imaging at Inova", "purpose": "email", "audience": "Inova's CIO", "sections": [ … ], "subject": "Imaging at Inova", "body": "Why now\n\nInova posted an imaging contract on [SAM.gov](https://hrcledger.com/contracts/va-imaging-2026).\n\nCould we talk next week?\n\nBest, Alex", "evidence": [ … ], "approval": null, "archived": false, "revisionNo": 4, "updatedAt": "2026-10-16T14:02:11.000Z" } }