Set active policy version
POST
/v1/policies/{id}/versions/{versionId}/activate
const url = 'https://api.varman.io/v1/policies/pol_abc123def456/versions/pv_abc123def456/activate';const options = {method: 'POST', headers: {'X-API-Key': '<X-API-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.varman.io/v1/policies/pol_abc123def456/versions/pv_abc123def456/activate \ --header 'X-API-Key: <X-API-Key>'Set active policy version 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)
Responses
Section titled “Responses”Active version updated
Media typeapplication/json
object
versionId
string
version
number
Example generated
{ "versionId": "example", "version": 1}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"}