Skip to content

Add IP to blacklist

POST
/api/v1/admin/security/ip-blacklist
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.

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"
}

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
}