latestSwagger 2.02026-08-109450223.9 KB

94acb422c07d

Unwanted Access Rules

Update an Unwanted Access Rule

Updates the schedule and notes on an existing Unwanted Access Rule. The rule's category, value, scope, logic, and type cannot be changed.

Standard, catchall, and catchall exception rules can all be updated, but catchall and catchall exception rules must keep starts_at and expires_at nil. Passing a value for those fields on those rules will return a 422.

patch/v1/unwanted_access_rules/{id}

Path parameters

idinteger required

Unwanted Access Rule ID.

Request body

starts_atstring date

UTC date (YYYY-MM-DD) when the rule becomes active. Pass an empty string or null to clear.

expires_atstring date

UTC date (YYYY-MM-DD) when the rule expires. Pass an empty string or null to clear.

notesstring

Free-text note attached to the rule. Pass an empty string or null to clear.

Response

Update an Unwanted Access Rule

Example response

{
  "unwanted_access_rule": {
    "id": 84938,
    "applied_to": {
      "type": "Organization",
      "id": 1234,
      "name": "ExampleCo"
    },
    "category": "country",
    "country_code": "US",
    "vpn": "NORD_VPN",
    "ip_address": "203.0.113.0/24",
    "type": "unauthorized",
    "status": "active",
    "logic": "standard",
    "note": "Approved by compliance — regional office access",
    "starts_at": "2025-09-05T18:20:34Z",
    "expires_at": "2025-12-05T18:20:34Z",
    "created_by": "Jane Doe",
    "created_at": "2025-09-05T18:20:34Z",
    "updated_at": "2025-09-05T18:20:34Z"
  }
}