Create and manage API keys to authenticate your scans. Keys are available on Pro plan and above.
Each API key starts with 100 credits. One scan costs one credit. Top up from your dashboard.
Trigger a scan with a single request. Replace vr_YOUR_API_KEY with your actual key.
curl -X POST https://asenvra.com/api/v1/scan \
-H "Authorization: Bearer vr_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"projectName":"my-app","inputType":"github_url","inputValue":"https://github.com/user/repo"}'const response = await fetch('https://asenvra.com/api/v1/scan', {
method: 'POST',
headers: {
'Authorization': 'Bearer vr_YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
projectName: 'my-app',
inputType: 'github_url',
inputValue: 'https://github.com/user/repo',
}),
});
const { scanId, status, report } = await response.json();import requests
response = requests.post(
"https://asenvra.com/api/v1/scan",
headers={
"Authorization": "Bearer vr_YOUR_API_KEY",
"Content-Type": "application/json",
},
json={
"projectName": "my-app",
"inputType": "github_url",
"inputValue": "https://github.com/user/repo",
},
)
data = response.json()
print(f"Scan {data['scanId']}: {data['status']}")The scan endpoint returns a JSON object with your scan ID, status, and the full report.
{
"scanId": "uuid-here",
"status": "complete",
"report": {
"overallScore": "green|yellow|red",
"totalIssues": 3,
"criticalCount": 1,
"warningCount": 1,
"infoCount": 1,
"categories": [{
"name": "...",
"score": "green",
"issues": [...]
}]
}
}scanIdstring (UUID)Unique identifier for this scan
statusstringOne of: pending, running, complete, failed
report.overallScorestringgreen, yellow, or red — overall health
report.totalIssuesintegerTotal number of issues found
report.criticalCountintegerNumber of critical-severity issues
report.warningCountintegerNumber of warning-severity issues
report.infoCountintegerNumber of informational issues
report.categoriesarrayPer-category breakdown with scores and issues
Configure a webhook URL in your dashboard to receive real-time notifications when scans complete.
{
"event": "scan.complete",
"timestamp": "2026-06-03T12:00:00Z",
"data": {
"scanId": "uuid-here",
"projectName": "my-app",
"status": "complete",
"overallScore": "green",
"totalIssues": 0,
"criticalCount": 0,
"warningCount": 0,
"infoCount": 0
}
}scan.complete and scan.failedDrop this workflow into .github/workflows/asenvra.yml and add your API key as a repository secret.
name: Asenvra Scan
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run Asenvra Scan
env:
ASENVRA_API_KEY: ${{ secrets.ASENVRA_API_KEY }}
run: |
RESPONSE=$(curl -s -X POST \
https://asenvra.com/api/v1/scan \
-H "Authorization: Bearer $ASENVRA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"projectName":"${{ github.repository }}","inputType":"github_url","inputValue":"${{ github.event.repository.html_url }}"}')
echo "$RESPONSE"
SCORE=$(echo "$RESPONSE" | jq -r '.report.overallScore')
if [ "$SCORE" = "red" ]; then
echo "::error::Asenvra scan failed — critical issues found"
exit 1
fiASENVRA_API_KEY.github/workflows/asenvra.yml