Skip to content

Create penetration test

POST
/v1/security-penetration-tests
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.

X-Organization-Id
string

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

Media typeapplication/json
object
targetUrl
required

Target URL for the penetration test scan

string

Example

https://app.example.com
repoUrl

Repository URL containing the target application code

string

Example

https://github.com/org/repo
additionalContext

Free-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.

string
<= 4000 characters
aiAssisted

Use AI to validate findings, plan follow-up probes and write impact and fix guidance. Requires the organization AI-assisted pentests setting.

boolean
authentication

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
loginUrl

Login page URL. Must share the registrable domain of a target.

string

Example

https://app.example.com/login
username

Test user username or email. Write-only and sensitive: forwarded to the scan runner for this run only, never stored or returned.

string
password

Test user password. Write-only and sensitive: forwarded to the scan runner for this run only, never stored or returned.

string format: password
usernameField

Name of the username input on the login form, if not auto-detected.

string

Example

email
passwordField

Name of the password input on the login form, if not auto-detected.

string

Example

password
totpSecret

Base32 TOTP secret for accounts with MFA. Write-only and sensitive: forwarded to the scan runner for this run only, never stored or returned.

string format: password
cookie

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.

string format: password
headers

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
key
additional properties
string
secondary

Optional second test user, used to check whether one user can see another user’s data.

object
loginUrl

Login page URL. Must share the registrable domain of a target.

string

Example

https://app.example.com/login
username

Test user username or email. Write-only and sensitive: forwarded to the scan runner for this run only, never stored or returned.

string
password

Test user password. Write-only and sensitive: forwarded to the scan runner for this run only, never stored or returned.

string format: password
usernameField

Name of the username input on the login form, if not auto-detected.

string

Example

email
passwordField

Name of the password input on the login form, if not auto-detected.

string

Example

password
totpSecret

Base32 TOTP secret for accounts with MFA. Write-only and sensitive: forwarded to the scan runner for this run only, never stored or returned.

string format: password
cookie

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.

string format: password
headers

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
key
additional properties
string
additionalTargets

Up to 5 extra URLs scanned in the same test. Each host must pass the same domain ownership check as targetUrl.

Array<string>
<= 5 items

Penetration test created

Invalid request payload