Submit version for approval
POST
/v1/policies/{id}/versions/{versionId}/submit-for-approval
const url = 'https://api.varman.io/v1/policies/pol_abc123def456/versions/pv_abc123def456/submit-for-approval';const options = { method: 'POST', headers: {'X-API-Key': '<X-API-Key>', 'Content-Type': 'application/json'}, body: '{"approverId":"mem_abc123def456"}'};
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/submit-for-approval \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <X-API-Key>' \ --data '{ "approverId": "mem_abc123def456" }'Sends a version to every listed policy approver (plus approverId, if given) and marks the policy as needing review. It publishes once all approve.
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”Submit a policy version for approval
Media typeapplication/json
object
approverId
Member ID of an extra approver. Optional when the policy already lists approvers; the version goes to all of them.
string
Example
mem_abc123def456Responses
Section titled “Responses”Version submitted for approval
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"}