Skip to content

Submit version for approval

POST
/v1/policies/{id}/versions/{versionId}/submit-for-approval
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.

id
required
string

Example

pol_abc123def456

Policy ID

versionId
required
string

Example

pv_abc123def456

Policy version ID

X-Organization-Id
string

Organization ID (required for session auth, optional for API key auth)

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_abc123def456

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"
}