Skip to main content
POST
/
whitelist-ips
curl --request POST \
  --url https://api.gotrebol.com/whitelist-ips \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "ips": [
    "192.168.1.1"
  ]
}
'
{
  "success": true,
  "message": "IPs added successfully",
  "added_ips": [
    "192.168.1.1",
    "10.0.0.0/24"
  ],
  "total_ips": 5
}

Authorizations

x-api-key
string
header
required

Body

application/json
ips
string[]
required

Lista de direcciones IP a agregar (IPv4 e IPv6).

Required array length: 1 - 100 elements
Pattern: ^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$|^(?:[0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}$|^(?:[0-9a-fA-F]{1,4}:){1,7}:$|^(?:[0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}$|^(?:[0-9a-fA-F]{1,4}:){1,5}(?::[0-9a-fA-F]{1,4}){1,2}$|^(?:[0-9a-fA-F]{1,4}:){1,4}(?::[0-9a-fA-F]{1,4}){1,3}$|^(?:[0-9a-fA-F]{1,4}:){1,3}(?::[0-9a-fA-F]{1,4}){1,4}$|^(?:[0-9a-fA-F]{1,4}:){1,2}(?::[0-9a-fA-F]{1,4}){1,5}$|^[0-9a-fA-F]{1,4}:(?:(?::[0-9a-fA-F]{1,4}){1,6})$|^:(?:(?::[0-9a-fA-F]{1,4}){1,7}|:)$

Response

IPs added successfully.

success
boolean
Example:

true

message
string
Example:

"IPs added successfully"

added_ips
string[]

Lista de IPs que fueron agregadas.

Example:
["192.168.1.1", "10.0.0.0/24"]
total_ips
integer

Número total de IPs permitidas después de la operación.

Example:

5