Save a scan account
curl --request POST \
--url https://api.trycomp.ai/v1/security-penetration-tests/accounts \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"label": "auditor",
"targetUrl": "https://app.example.com",
"value": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({label: 'auditor', targetUrl: 'https://app.example.com', value: '<string>'})
};
fetch('https://api.trycomp.ai/v1/security-penetration-tests/accounts', 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"
payload = {
"label": "auditor",
"targetUrl": "https://app.example.com",
"value": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Security Penetration Tests
Save a scan account | Comp AI API
Probes the credential against targetUrl, then saves it for reuse when starting runs. A credential the target refuses is rejected by label, so a scan never.
POST
/
v1
/
security-penetration-tests
/
accounts
Save a scan account
curl --request POST \
--url https://api.trycomp.ai/v1/security-penetration-tests/accounts \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"label": "auditor",
"targetUrl": "https://app.example.com",
"value": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({label: 'auditor', targetUrl: 'https://app.example.com', value: '<string>'})
};
fetch('https://api.trycomp.ai/v1/security-penetration-tests/accounts', 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"
payload = {
"label": "auditor",
"targetUrl": "https://app.example.com",
"value": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Headers
Body
application/json
Response
Saved scan account returned
Was this page helpful?

