Create penetration test
const url = 'https://api.varman.io/v1/security-penetration-tests';const options = { method: 'POST', headers: {'X-API-Key': '<X-API-Key>', 'Content-Type': 'application/json'}, body: '{"targetUrl":"https://app.example.com","repoUrl":"https://github.com/org/repo","additionalContext":"example","aiAssisted":false,"authentication":{"loginUrl":"https://app.example.com/login","username":"example","password":"example","usernameField":"email","passwordField":"password","totpSecret":"example","cookie":"example","headers":{"additionalProperty":"example"},"secondary":{"loginUrl":"https://app.example.com/login","username":"example","password":"example","usernameField":"email","passwordField":"password","totpSecret":"example","cookie":"example","headers":{"additionalProperty":"example"}}},"additionalTargets":["example"]}'};
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/security-penetration-tests \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <X-API-Key>' \ --data '{ "targetUrl": "https://app.example.com", "repoUrl": "https://github.com/org/repo", "additionalContext": "example", "aiAssisted": false, "authentication": { "loginUrl": "https://app.example.com/login", "username": "example", "password": "example", "usernameField": "email", "passwordField": "password", "totpSecret": "example", "cookie": "example", "headers": { "additionalProperty": "example" }, "secondary": { "loginUrl": "https://app.example.com/login", "username": "example", "password": "example", "usernameField": "email", "passwordField": "password", "totpSecret": "example", "cookie": "example", "headers": { "additionalProperty": "example" } } }, "additionalTargets": [ "example" ] }'Create an AI-powered penetration test run for an approved target and track the resulting findings and report artifacts.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Organization ID (required for session auth, optional for API key auth)
Request Bodyrequired
Section titled “Request Bodyrequired”object
Target URL for the penetration test scan
Example
https://app.example.comRepository URL containing the target application code
Example
https://github.com/org/repoFree-text context shared with the testing agent, e.g. remediation notes or accepted-by-design explanations from a previous run. Saved per-finding context notes for the same target are appended automatically. Max 4000 characters.
Use AI to validate findings, plan follow-up probes and write impact and fix guidance. Requires the organization AI-assisted pentests setting.
Sign in as a dedicated test user (login form, cookie, or headers). Write-only and sensitive: forwarded to the runner for this run only, never stored, logged or returned.
object
Login page URL. Must share the registrable domain of a target.
Example
https://app.example.com/loginTest user username or email. Write-only and sensitive: forwarded to the scan runner for this run only, never stored or returned.
Test user password. Write-only and sensitive: forwarded to the scan runner for this run only, never stored or returned.
Name of the username input on the login form, if not auto-detected.
Example
emailName of the password input on the login form, if not auto-detected.
Example
passwordBase32 TOTP secret for accounts with MFA. Write-only and sensitive: forwarded to the scan runner for this run only, never stored or returned.
Session cookie header value, as an alternative to a login form. Write-only and sensitive: forwarded to the scan runner for this run only, never stored or returned.
Extra request headers (e.g. Authorization), as an alternative to a login form. Write-only and sensitive: forwarded to the scan runner for this run only, never stored or returned.
object
Optional second test user, used to check whether one user can see another user’s data.
object
Login page URL. Must share the registrable domain of a target.
Example
https://app.example.com/loginTest user username or email. Write-only and sensitive: forwarded to the scan runner for this run only, never stored or returned.
Test user password. Write-only and sensitive: forwarded to the scan runner for this run only, never stored or returned.
Name of the username input on the login form, if not auto-detected.
Example
emailName of the password input on the login form, if not auto-detected.
Example
passwordBase32 TOTP secret for accounts with MFA. Write-only and sensitive: forwarded to the scan runner for this run only, never stored or returned.
Session cookie header value, as an alternative to a login form. Write-only and sensitive: forwarded to the scan runner for this run only, never stored or returned.
Extra request headers (e.g. Authorization), as an alternative to a login form. Write-only and sensitive: forwarded to the scan runner for this run only, never stored or returned.
object
Up to 5 extra URLs scanned in the same test. Each host must pass the same domain ownership check as targetUrl.
Responses
Section titled “Responses”Penetration test created
Invalid request payload