Test an unsaved scan account
curl --request POST \
--url https://api.trycomp.ai/v1/security-penetration-tests/accounts/test \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"targetUrl": "https://app.example.com",
"account": {
"label": "auditor",
"value": "<string>",
"headers": [
{
"name": "Authorization",
"value": "Bearer <token>"
}
],
"role": "<string>",
"tenant": "<string>"
}
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
targetUrl: 'https://app.example.com',
account: {
label: 'auditor',
value: '<string>',
headers: [{name: 'Authorization', value: 'Bearer <token>'}],
role: '<string>',
tenant: '<string>'
}
})
};
fetch('https://api.trycomp.ai/v1/security-penetration-tests/accounts/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/test"
payload = {
"targetUrl": "https://app.example.com",
"account": {
"label": "auditor",
"value": "<string>",
"headers": [
{
"name": "Authorization",
"value": "Bearer <token>"
}
],
"role": "<string>",
"tenant": "<string>"
}
}
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 an unsaved scan account | Comp AI API
Probes an account the caller has not saved against targetUrl and returns verified, unverified or rejected. Nothing is stored and no scan credit is spent, so.
POST
/
v1
/
security-penetration-tests
/
accounts
/
test
Test an unsaved scan account
curl --request POST \
--url https://api.trycomp.ai/v1/security-penetration-tests/accounts/test \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"targetUrl": "https://app.example.com",
"account": {
"label": "auditor",
"value": "<string>",
"headers": [
{
"name": "Authorization",
"value": "Bearer <token>"
}
],
"role": "<string>",
"tenant": "<string>"
}
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
targetUrl: 'https://app.example.com',
account: {
label: 'auditor',
value: '<string>',
headers: [{name: 'Authorization', value: 'Bearer <token>'}],
role: '<string>',
tenant: '<string>'
}
})
};
fetch('https://api.trycomp.ai/v1/security-penetration-tests/accounts/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/test"
payload = {
"targetUrl": "https://app.example.com",
"account": {
"label": "auditor",
"value": "<string>",
"headers": [
{
"name": "Authorization",
"value": "Bearer <token>"
}
],
"role": "<string>",
"tenant": "<string>"
}
}
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
Response
Probe result
Was this page helpful?

