Delete compliance policy
DELETE
/v1/policies/{id}
const url = 'https://api.varman.io/v1/policies/pol_abc123def456';const options = {method: 'DELETE', 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 DELETE \ --url https://api.varman.io/v1/policies/pol_abc123def456 \ --header 'X-API-Key: <X-API-Key>'Delete a compliance policy that is no longer part of the organization evidence library or control program.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Example
pol_abc123def456Policy 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”Policy deleted successfully
Media typeapplication/json
object
success
Indicates successful deletion
boolean
deletedPolicy
object
id
The deleted policy ID
string
name
The deleted policy name
string
authType
How the request was authenticated
string
Example
{ "success": true, "deletedPolicy": { "id": "pol_abc123def456", "name": "Data Privacy Policy" }, "authType": "api-key"}Unauthorized - Invalid authentication or insufficient permissions
Media typeapplication/json
object
message
string
Example
{ "message": "Unauthorized"}Policy not found
Media typeapplication/json
object
message
string
Example
{ "message": "Policy with ID pol_abc123def456 not found"}