Create admin IP allowlist entry
POST
/api/admin/ip-allowlist
Code sample: Shell / cURL
curl --request POST \ --url https://auth.example.com/api/admin/ip-allowlist \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "ip_range": "203.0.113.0/24", "description": "Office network", "enabled": true }'Adds an IPv4, IPv6, or CIDR range to the admin IP allowlist. Duplicate ranges return a conflict error.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ” Media type application/json
object
ip_range
required
string
description
string
enabled
boolean
key
additional properties
Example
{ "ip_range": "203.0.113.0/24", "description": "Office network", "enabled": true}Responses
Section titled “ Responses ”Admin IP allowlist entry.
Media type application/json
object
Example
{ "id": "ip_123", "tenant_id": "tenant_123", "ip_range": "203.0.113.0/24", "ip_version": 4, "description": "Office network", "enabled": 1, "created_by": "admin_123", "created_at": 1770000000000, "updated_at": 1770000000000}Error response.
Media type application/json
object
error
string
message
string
error_description
string
key
additional properties
Example generated
{ "error": "example", "message": "example", "error_description": "example"}default
Section titled “default ”Error response.
Media type application/json
object
error
string
message
string
error_description
string
key
additional properties
Example generated
{ "error": "example", "message": "example", "error_description": "example"}