## Update User Security Settings

**patch** `/v1/user/security`

Update the current user's security settings

### Body Parameters

- `source_ip_rule: optional SourceIPRule`

  IP filter rules.

  - `allowed: optional array of string`

    List of IPv4 CIDR addresses to allow.

  - `blocked: optional array of string`

    List of IPv4 CIDR addresses to deny.

### Returns

- `UserSecurity object { source_ip_rule, created_at, updated_at }`

  User security settings response.

  - `source_ip_rule: SourceIPRuleResponse`

    IP filter rules.

    - `allowed: array of string`

      List of IPv4 CIDR addresses to allow.

    - `blocked: array of string`

      List of IPv4 CIDR addresses to deny.

  - `created_at: optional string`

    When the user security settings were created.

  - `updated_at: optional string`

    When the user security settings were updated.

### Example

```http
curl https://api.nirvanalabs.io/v1/user/security \
    -X PATCH \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \
    -d '{}'
```

#### Response

```json
{
  "source_ip_rule": {
    "allowed": [
      "192.168.1.0/24",
      "10.0.0.0/8"
    ],
    "blocked": [
      "192.168.1.100/32"
    ]
  },
  "created_at": "2025-01-01T00:00:00Z",
  "updated_at": "2025-01-01T00:00:00Z"
}
```
