Ban the user IP address
curl --request POST \
--url https://{domain}/api/application/users/{user}/ip-ban \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reason": "Repeated fraud attempts",
"duration": "1_week",
"banned_by_user_id": 2
}
'import requests
url = "https://{domain}/api/application/users/{user}/ip-ban"
payload = {
"reason": "Repeated fraud attempts",
"duration": "1_week",
"banned_by_user_id": 2
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({reason: 'Repeated fraud attempts', duration: '1_week', banned_by_user_id: 2})
};
fetch('https://{domain}/api/application/users/{user}/ip-ban', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{domain}/api/application/users/{user}/ip-ban",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'reason' => 'Repeated fraud attempts',
'duration' => '1_week',
'banned_by_user_id' => 2
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{domain}/api/application/users/{user}/ip-ban"
payload := strings.NewReader("{\n \"reason\": \"Repeated fraud attempts\",\n \"duration\": \"1_week\",\n \"banned_by_user_id\": 2\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{domain}/api/application/users/{user}/ip-ban")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reason\": \"Repeated fraud attempts\",\n \"duration\": \"1_week\",\n \"banned_by_user_id\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{domain}/api/application/users/{user}/ip-ban")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"reason\": \"Repeated fraud attempts\",\n \"duration\": \"1_week\",\n \"banned_by_user_id\": 2\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 192,
"name": "Jane A. Cooper",
"email": "jane.cooper@example.com",
"role": "user",
"avatar": "/assets/default-avatar.png",
"banner": null,
"footer_message": "Thanks, Jane",
"contact_info": {
"phone": "+1 555 0100",
"company": "Cooper Hosting LLC",
"country": "US"
},
"balance": 25,
"loyalty_points": 0,
"customer_pin": "DX-926037",
"subscribed_to_emails": false,
"email_verified_at": "2026-11-16T14:33:49.000000Z",
"phone_verified_at": null,
"two_factor_enabled": false,
"linked_accounts": {
"discord": null,
"google": null,
"github": null
},
"suspension": {
"is_suspended": true,
"reason": "IP banned: Repeated fraud attempts",
"suspended_at": "2026-11-16T14:33:49.000000Z",
"expires_at": "2026-11-23T14:33:49.000000Z"
},
"billing": {
"stripe_customer_id": null,
"payment_method_type": null,
"payment_method_last_four": null,
"payment_method_notes": null
},
"ip": "203.0.113.24",
"created_at": "2026-11-16T14:33:49.000000Z",
"updated_at": "2026-11-16T14:33:49.000000Z",
"counts": []
},
"message": "User IP banned.",
"meta": {
"request_id": "76235796-c371-4107-ae5e-839b53b7d4cc"
}
}User actions
Ban the user IP address
Bans the last known IP address of the user (ip field), suspends the account with the reason IP banned: <reason> and signs out all of the user sessions.
Permission: users.ip
POST
/
users
/
{user}
/
ip-ban
Ban the user IP address
curl --request POST \
--url https://{domain}/api/application/users/{user}/ip-ban \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reason": "Repeated fraud attempts",
"duration": "1_week",
"banned_by_user_id": 2
}
'import requests
url = "https://{domain}/api/application/users/{user}/ip-ban"
payload = {
"reason": "Repeated fraud attempts",
"duration": "1_week",
"banned_by_user_id": 2
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({reason: 'Repeated fraud attempts', duration: '1_week', banned_by_user_id: 2})
};
fetch('https://{domain}/api/application/users/{user}/ip-ban', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{domain}/api/application/users/{user}/ip-ban",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'reason' => 'Repeated fraud attempts',
'duration' => '1_week',
'banned_by_user_id' => 2
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{domain}/api/application/users/{user}/ip-ban"
payload := strings.NewReader("{\n \"reason\": \"Repeated fraud attempts\",\n \"duration\": \"1_week\",\n \"banned_by_user_id\": 2\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{domain}/api/application/users/{user}/ip-ban")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reason\": \"Repeated fraud attempts\",\n \"duration\": \"1_week\",\n \"banned_by_user_id\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{domain}/api/application/users/{user}/ip-ban")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"reason\": \"Repeated fraud attempts\",\n \"duration\": \"1_week\",\n \"banned_by_user_id\": 2\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 192,
"name": "Jane A. Cooper",
"email": "jane.cooper@example.com",
"role": "user",
"avatar": "/assets/default-avatar.png",
"banner": null,
"footer_message": "Thanks, Jane",
"contact_info": {
"phone": "+1 555 0100",
"company": "Cooper Hosting LLC",
"country": "US"
},
"balance": 25,
"loyalty_points": 0,
"customer_pin": "DX-926037",
"subscribed_to_emails": false,
"email_verified_at": "2026-11-16T14:33:49.000000Z",
"phone_verified_at": null,
"two_factor_enabled": false,
"linked_accounts": {
"discord": null,
"google": null,
"github": null
},
"suspension": {
"is_suspended": true,
"reason": "IP banned: Repeated fraud attempts",
"suspended_at": "2026-11-16T14:33:49.000000Z",
"expires_at": "2026-11-23T14:33:49.000000Z"
},
"billing": {
"stripe_customer_id": null,
"payment_method_type": null,
"payment_method_last_four": null,
"payment_method_notes": null
},
"ip": "203.0.113.24",
"created_at": "2026-11-16T14:33:49.000000Z",
"updated_at": "2026-11-16T14:33:49.000000Z",
"counts": []
},
"message": "User IP banned.",
"meta": {
"request_id": "76235796-c371-4107-ae5e-839b53b7d4cc"
}
}Authorizations
Body
application/json
Was this page helpful?

