Test a saved scan account
curl --request POST \
--url https://api.trycomp.ai/v1/security-penetration-tests/accounts/{id}/test \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"targetUrl": "https://app.example.com"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({targetUrl: 'https://app.example.com'})
};
fetch('https://api.trycomp.ai/v1/security-penetration-tests/accounts/{id}/test', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/security-penetration-tests/accounts/{id}/test"
payload = { "targetUrl": "https://app.example.com" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"status": "verified",
"checkedAt": "2023-11-07T05:31:56Z",
"reason": "<string>"
}Security Penetration Tests
Test a saved scan account | Comp AI API
Probes a saved scan account credential against targetUrl and records the result, spending no scan credit. Use it to check an expired cookie or an edge-gated.
POST
/
v1
/
security-penetration-tests
/
accounts
/
{id}
/
test
Test a saved scan account
curl --request POST \
--url https://api.trycomp.ai/v1/security-penetration-tests/accounts/{id}/test \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"targetUrl": "https://app.example.com"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({targetUrl: 'https://app.example.com'})
};
fetch('https://api.trycomp.ai/v1/security-penetration-tests/accounts/{id}/test', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/security-penetration-tests/accounts/{id}/test"
payload = { "targetUrl": "https://app.example.com" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"status": "verified",
"checkedAt": "2023-11-07T05:31:56Z",
"reason": "<string>"
}Headers
Body
application/json
URL the stored credential is probed against. Its origin, scheme included, must match the one the account was saved against, so an account saved on http can be retested and one saved on https cannot be replayed over http. It must be the application this account signs in to, or the probe proves nothing.
Example:
"https://app.example.com"
Response
Probe result
Was this page helpful?

