Skip to content
Docs

Update Attack Challenge mode

POSThttps://api.vercel.com/v1/security/attack-mode
Update the setting for determining if the project has Attack Challenge mode enabled.
https://api.vercel.com/v1/security/attack-mode
const response = await fetch('https://api.vercel.com/v1/security/attack-mode?teamId=string&slug=string', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"projectId": "example_id",
"attackModeEnabled": "true",
"attackModeActiveUntil": "123"
}),
});
const data = await response.json();
console.log(data);
Response
{
"attackModeEnabled": "false",
"attackModeUpdatedAt": "123"
}
AuthorizationbearerToken

Default authentication mechanism

teamIdstringOptional
The Team identifier to perform the request on behalf of.
slugstringOptional
The Team slug to perform the request on behalf of.
application/json
projectIdstringRequired
attackModeEnabledbooleanRequired
attackModeActiveUntilnumberRequired
200Success
attackModeEnabledbooleanRequired
attackModeUpdatedAtnumberRequired
400One of the provided values in the request body is invalid.
401The request is not authorized.
403You do not have permission to access this resource.
404Error
410Error