Documentation

PolicyCortex REST API Reference for Secure Multi-Cloud Governance

Comprehensive REST API for integrating PolicyCortex into your workflows and applications.

API Documentation: Quick Start & Installation

PolicyCortex API uses Bearer token authentication. Obtain your API key from the dashboard under Settings → API Keys.

API Scopes and Permissions

ScopePermissionsDescription
policy:readRead policies and rulesView policy configurations and status
policy:writeCreate and modify policiesDeploy, update, and delete policies
scan:executeTrigger compliance scansRun on-demand security and compliance scans
report:readAccess reports and analyticsView compliance reports and metrics
admin:allFull administrative accessComplete control over the platform
Authentication Examplebash
# Using curl
curl -H "Authorization: Bearer your_api_key_here" \
     -H "Content-Type: application/json" \
     https://api.policycortex.com/v1/policies

# Using JavaScript fetch
fetch('https://api.policycortex.com/v1/policies', {
  headers: {
    'Authorization': 'Bearer your_api_key_here',
    'Content-Type': 'application/json'
  }
})

Policies API

GET/api/v1/policiesList all policies
curl -X GET "https://api.policycortex.com/v1/policies?limit=10&offset=0" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"
POST/api/v1/policiesCreate a new policy
curl -X POST "https://api.policycortex.com/v1/policies" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "enforce-ebs-encryption",
    "description": "Ensure EBS volumes are encrypted",
    "resource_type": "aws_ebs_volume",
    "rules": [
      {
        "condition": "encrypted == false",
        "action": "enforce",
        "remediation": {
          "type": "encrypt_volume",
          "kms_key": "alias/aws/ebs"
        }
      }
    ],
    "severity": "high",
    "compliance_frameworks": ["soc2", "hipaa"]
  }'