Add IP to blacklist
POST
/api/v1/admin/security/ip-blacklist
const url = 'http://localhost:3001/api/v1/admin/security/ip-blacklist';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"expires_in":1,"ip_address":"example","reason":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:3001/api/v1/admin/security/ip-blacklist \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "expires_in": 1, "ip_address": "example", "reason": "example" }'Add an IP address or CIDR range to the blacklist. Requires admin:view_audit_logs permission.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”IP blacklist request
Media typeapplication/json
object
expires_in
Hours, 0 = permanent
integer
ip_address
string
reason
string
Examplegenerated
{ "expires_in": 1, "ip_address": "example", "reason": "example"}Responses
Section titled “Responses”OK
Media typeapplication/json
object
expires_at
string
id
integer
message
string
success
boolean
Examplegenerated
{ "expires_at": "example", "id": 1, "message": "example", "success": true}Bad Request
Media typeapplication/json
object
error
string
success
boolean
Examplegenerated
{ "error": "example", "success": true}Unauthorized
Media typeapplication/json
object
error
string
success
boolean
Examplegenerated
{ "error": "example", "success": true}Forbidden
Media typeapplication/json
object
error
string
success
boolean
Examplegenerated
{ "error": "example", "success": true}Internal Server Error
Media typeapplication/json
object
error
string
success
boolean
Examplegenerated
{ "error": "example", "success": true}