Skip to content

IP Allowlist Management

Overview

The IP Allowlist API provides endpoints for restricting management console access to allowed IP addresses only. It operates in whitelist mode to enhance security.

Required Permissions

OperationRequired Permission
Readadmin:ip_allowlist:read
Writeadmin:ip_allowlist:write

Endpoint List

MethodEndpointDescription
GET/api/admin/ip-allowlistGet IP allowlist
GET/api/admin/ip-allowlist/:idGet IP entry details
POST/api/admin/ip-allowlistAdd IP entry
PATCH/api/admin/ip-allowlist/:idUpdate IP entry
DELETE/api/admin/ip-allowlist/:idDelete IP entry
POST/api/admin/ip-allowlist/:id/enableEnable entry
POST/api/admin/ip-allowlist/:id/disableDisable entry
POST/api/admin/ip-allowlist/checkCheck IP permission

Get IP Allowlist

Retrieve the IP allowlist.

Endpoint

GET /api/admin/ip-allowlist

Query Parameters

ParameterTypeRequiredDescription
include_disabledboolean-Include disabled entries (default: false)

Request Example

Terminal window
curl -X GET "https://{tenant-domain}/api/admin/ip-allowlist?include_disabled=true" \
-H "Authorization: Bearer {token}"

Response Example

{
"items": [
{
"id": "ip_abc123",
"ip_range": "192.168.1.0/24",
"description": "Office network",
"enabled": true,
"created_at": 1705881600000,
"updated_at": 1706140800000
},
{
"id": "ip_def456",
"ip_range": "10.0.0.0/8",
"description": "VPN network",
"enabled": true,
"created_at": 1705968000000,
"updated_at": null
},
{
"id": "ip_ghi789",
"ip_range": "203.0.113.50",
"description": "Remote work - John",
"enabled": false,
"created_at": 1706054400000,
"updated_at": 1706140800000
}
],
"total": 3,
"restriction_active": true
}

Get IP Entry Details

Retrieve detailed information for a specified IP entry.

Endpoint

GET /api/admin/ip-allowlist/:id

Path Parameters

ParameterTypeRequiredDescription
idstringEntry ID

Request Example

Terminal window
curl -X GET "https://{tenant-domain}/api/admin/ip-allowlist/ip_abc123" \
-H "Authorization: Bearer {token}"

Response Example

{
"id": "ip_abc123",
"ip_range": "192.168.1.0/24",
"description": "Office network",
"enabled": true,
"created_by": "admin_xyz789",
"created_at": 1705881600000,
"updated_at": 1706140800000
}

Add IP Entry

Add a new IP entry.

Endpoint

POST /api/admin/ip-allowlist

Request Body

FieldTypeRequiredDescription
ip_rangestringIP address or CIDR notation
descriptionstring-Description
enabledboolean-Enable/disable (default: true)

Request Example

Terminal window
curl -X POST "https://{tenant-domain}/api/admin/ip-allowlist" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{
"ip_range": "192.168.1.0/24",
"description": "Office network",
"enabled": true
}'

Response Example

{
"id": "ip_abc123",
"ip_range": "192.168.1.0/24",
"description": "Office network",
"enabled": true,
"created_at": 1706227200000
}

Supported Formats

FormatExampleDescription
Single IP192.168.1.100Single IP address
CIDR192.168.1.0/24Subnet range
IPv62001:db8::1IPv6 address
IPv6 CIDR2001:db8::/32IPv6 subnet

Update IP Entry

Update an existing IP entry.

Endpoint

PATCH /api/admin/ip-allowlist/:id

Request Body

FieldTypeRequiredDescription
ip_rangestring-IP address or CIDR notation
descriptionstring-Description
enabledboolean-Enable/disable

Request Example

Terminal window
curl -X PATCH "https://{tenant-domain}/api/admin/ip-allowlist/ip_abc123" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{
"description": "Headquarters office network"
}'

Response Example

{
"id": "ip_abc123",
"ip_range": "192.168.1.0/24",
"description": "Headquarters office network",
"enabled": true,
"updated_at": 1706313600000
}

Delete IP Entry

Delete an IP entry.

Endpoint

DELETE /api/admin/ip-allowlist/:id

Request Example

Terminal window
curl -X DELETE "https://{tenant-domain}/api/admin/ip-allowlist/ip_ghi789" \
-H "Authorization: Bearer {token}"

Response Example

{
"deleted": true,
"id": "ip_ghi789"
}

Enable Entry

Enable a disabled IP entry.

Endpoint

POST /api/admin/ip-allowlist/:id/enable

Request Example

Terminal window
curl -X POST "https://{tenant-domain}/api/admin/ip-allowlist/ip_ghi789/enable" \
-H "Authorization: Bearer {token}"

Response Example

{
"id": "ip_ghi789",
"enabled": true,
"enabled_at": 1706400000000
}

Disable Entry

Disable an IP entry (temporarily disable without deleting).

Endpoint

POST /api/admin/ip-allowlist/:id/disable

Request Example

Terminal window
curl -X POST "https://{tenant-domain}/api/admin/ip-allowlist/ip_ghi789/disable" \
-H "Authorization: Bearer {token}"

Response Example

{
"id": "ip_ghi789",
"enabled": false,
"disabled_at": 1706486400000
}

Check IP Permission

Check if a specified IP address is allowed.

Endpoint

POST /api/admin/ip-allowlist/check

Request Body

FieldTypeRequiredDescription
ip_addressstringIP address to check

Request Example

Terminal window
curl -X POST "https://{tenant-domain}/api/admin/ip-allowlist/check" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{
"ip_address": "192.168.1.100"
}'

Response Example (Allowed)

{
"ip_address": "192.168.1.100",
"allowed": true,
"matched_entry": {
"id": "ip_abc123",
"ip_range": "192.168.1.0/24",
"description": "Office network"
},
"restriction_active": true,
"total_entries": 5
}

Response Example (Denied)

{
"ip_address": "203.0.113.200",
"allowed": false,
"matched_entry": null,
"restriction_active": true,
"total_entries": 5
}

Response Example (No Restriction)

{
"ip_address": "203.0.113.200",
"allowed": true,
"matched_entry": null,
"restriction_active": false,
"total_entries": 0
}

Best Practices

  1. Office Networks: Set broadly using CIDR blocks
  2. VPN: Register VPN gateway IP address ranges
  3. Remote Work: Manage with individual IP addresses, disable when no longer needed
  4. Emergency Access: Always keep at least one backup IP enabled