Update version content
PATCH
/v1/policies/{id}/versions/{versionId}
const url = 'https://api.varman.io/v1/policies/pol_abc123def456/versions/pv_abc123def456';const options = { method: 'PATCH', headers: {'X-API-Key': '<X-API-Key>', 'Content-Type': 'application/json'}, body: '{"content":[{"type":"heading","attrs":{"level":2,"textAlign":null},"content":[{"type":"text","text":"Purpose"}]}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.varman.io/v1/policies/pol_abc123def456/versions/pv_abc123def456 \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <X-API-Key>' \ --data '{ "content": [ { "type": "heading", "attrs": { "level": 2, "textAlign": null }, "content": [ { "type": "text", "text": "Purpose" } ] } ] }'Update version content in Varman. Create, version, publish, export, map, and improve compliance policies with AI-assisted drafting and approval workflows.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Example
pol_abc123def456Policy ID
versionId
required
string
Example
pv_abc123def456Policy version ID
Header Parameters
Section titled “Header Parameters”X-Organization-Id
string
Organization ID (required for session auth, optional for API key auth)
Request Bodyrequired
Section titled “Request Bodyrequired”Update content for a policy version
Media typeapplication/json
object
content
required
Content of the policy version as TipTap JSON (array of nodes)
Array<object>
object
key
additional properties
any
Example
[ { "type": "heading", "attrs": { "level": 2, "textAlign": null }, "content": [ { "type": "text", "text": "Purpose" } ] }]Responses
Section titled “Responses”Version content updated
Media typeapplication/json
object
versionId
string
Example generated
{ "versionId": "example"}Invalid request
Media typeapplication/json
object
message
string
Example
{ "message": "Invalid request"}Unauthorized
Media typeapplication/json
object
message
string
Example
{ "message": "Unauthorized"}Resource not found
Media typeapplication/json
object
message
string
Example
{ "message": "Resource not found"}