Skip to main content
PUT
/
applications
/
{id}
/
ip-restriction
Update IP restriction
curl --request PUT \
  --url https://api.sevalla.com/v3/applications/{id}/ip-restriction \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "type": "allow",
  "is_enabled": true,
  "ip_list": [
    "203.0.113.0/24",
    "198.51.100.1"
  ]
}
'
{
  "type": "allow",
  "is_enabled": true,
  "ip_list": [
    "203.0.113.0/24",
    "198.51.100.1"
  ]
}

Authorizations

Authorization
string
header
required

API key authentication. Pass your API key as a Bearer token in the Authorization header.

Path Parameters

id
string<uuid>
required

Application identifier

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Example:

"fb5e5168-4281-4bec-94c5-0d1584e9e657"

Body

application/json
type
enum<string>
required

Restriction type. allow - only listed IPs can access the application. deny - listed IPs are blocked from accessing the application.

Available options:
allow,
deny
Example:

"allow"

is_enabled
boolean
required

Whether the IP restriction should be active

Example:

true

ip_list
string[]
required

List of IP addresses or CIDR ranges to include in the restriction

Maximum array length: 500
Maximum string length: 45
Example:
["203.0.113.0/24", "198.51.100.1"]

Response

Default Response

type
enum<string>
required

Restriction type. allow - only listed IPs can access. deny - listed IPs are blocked.

Available options:
allow,
deny
Example:

"allow"

is_enabled
boolean
required

Whether the IP restriction is currently active

Example:

true

ip_list
string[]
required

List of IP addresses or CIDR ranges included in the restriction

Example:
["203.0.113.0/24", "198.51.100.1"]