> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/fleet-intel/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/fleet-intel/_mcp/server.

# Update a notification preference

PUT /v1/notification_preferences/{id}
Content-Type: application/json

Update the preference addressed by id. Uses the same body shape as create; components, notifiedOn, scope, and targets replace the stored configuration, while omitted active preserves the existing pause/resume toggle.

Reference: https://docs.nvidia.com/fleet-intel/fleet-intel/api-explorer/notification-preferences/put-v-1-notification-preference-by-id

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: fleet-intelligence
  version: 1.0.0
paths:
  /v1/notification_preferences/{id}:
    put:
      operationId: putV1NotificationPreferenceByID
      summary: Update a notification preference
      description: >-
        Update the preference addressed by id. Uses the same body shape as
        create; components, notifiedOn, scope, and targets replace the stored
        configuration, while omitted active preserves the existing pause/resume
        toggle.
      tags:
        - notification_preferences
      parameters:
        - name: id
          in: path
          description: Preference id (UUID)
          required: true
          schema:
            type: string
      responses:
        '204':
          description: No Content - Preference updated
          content:
            application/json:
              schema:
                type: object
                properties: {}
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.ErrorResponse'
        '403':
          description: Forbidden - UAM authorization denied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.ErrorResponse'
        '404':
          description: Not Found - No preference with this id
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.ErrorResponse'
        '499':
          description: Client Closed Request - request was canceled by the client
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.ErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.ErrorResponse'
        '503':
          description: Service Unavailable - Database temporarily unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.ErrorResponse'
      requestBody:
        description: Notification preference configuration
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/models.NotificationPreferenceRequest'
components:
  schemas:
    models.NotificationChannel:
      type: string
      enum:
        - email
        - slack
        - webhook
      description: 'Channel type: email, slack, or webhook'
      title: models.NotificationChannel
    models.NotificationTarget:
      type: object
      properties:
        channel:
          $ref: '#/components/schemas/models.NotificationChannel'
        config:
          type: object
          additionalProperties:
            description: Any type
          description: >-
            Channel-specific configuration (see EmailNotificationConfig,
            SlackNotificationConfig, WebhookNotificationConfig)
      required:
        - channel
        - config
      title: models.NotificationTarget
    models.NotificationScopeType:
      type: string
      enum:
        - all
        - compute_zones
        - node_groups
        - tags
        - nodes
      description: 'Scope type: all, nodes, node_groups, compute_zones, or tags'
      title: models.NotificationScopeType
    models.NotificationScope:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/models.NotificationScopeType'
        values:
          type: array
          items:
            type: string
          description: >-
            Scope values: UUIDs for nodes/node_groups/compute_zones, or tag name
            strings for tags.

            At least one value is required for all types except "all".
      description: |-
        Optional scope to narrow which nodes trigger notifications.
        If omitted or null, all nodes for this component trigger notifications.
      title: models.NotificationScope
    models.NotificationPreferenceRequest:
      type: object
      properties:
        active:
          type: boolean
          description: >-
            Active flag: when false, this preference is temporarily paused
            (other preferences covering

            the same component still fire). If omitted on create, defaults to
            true. If omitted on update, the

            existing value is preserved.
        components:
          type: array
          items:
            type: string
          description: >-
            Components this preference applies to (e.g. GPU, CPU, NVLink,
            agent_liveness). At least one;

            all settings below apply equally to every listed component.
        notificationTargets:
          type: array
          items:
            $ref: '#/components/schemas/models.NotificationTarget'
          description: >-
            At least one notification target is required.

            Config structure depends on channel — see EmailNotificationConfig,
            SlackNotificationConfig, WebhookNotificationConfig.
        notifiedOn:
          type: array
          items:
            type: string
          description: >-
            Alert statuses to notify on. Valid values: Critical, Warning,
            Resolved.

            If empty or omitted, defaults to all three: [Critical, Warning,
            Resolved].
        scope:
          $ref: '#/components/schemas/models.NotificationScope'
      required:
        - components
        - notificationTargets
      title: models.NotificationPreferenceRequest
    models.KASRequestStatus:
      type: object
      properties:
        requestId:
          type: string
          description: Request ID for tracing
        statusCode:
          type: string
          description: Status code from KAS
        statusDescription:
          type: string
          description: Status description from KAS
      description: >-
        RequestStatus contains KAS-specific error details

        This is added to reflect the field in OpenAPI docs for UI reference and
        not populated by our code

        If KAS returns an error, the request will not be forwarded to the
        backend
      title: models.KASRequestStatus
    models.ErrorResponse:
      type: object
      properties:
        details:
          type: string
          description: Detailed error information
        error:
          type: string
          description: Error message or type
        requestStatus:
          $ref: '#/components/schemas/models.KASRequestStatus'
      description: >-
        Standard error response returned by all API endpoints. For KAS API
        errors, requestStatus fields are populated.
      title: models.ErrorResponse

```

## Examples



**Request**

```json
{
  "components": [
    "GPU",
    "NVLink"
  ],
  "notificationTargets": [
    {
      "channel": "email",
      "config": {}
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://api.example.com/v1/notification_preferences/id"

payload = {
    "components": ["GPU", "NVLink"],
    "notificationTargets": [
        {
            "channel": "email",
            "config": {}
        }
    ]
}
headers = {"Content-Type": "application/json"}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.example.com/v1/notification_preferences/id';
const options = {
  method: 'PUT',
  headers: {'Content-Type': 'application/json'},
  body: '{"components":["GPU","NVLink"],"notificationTargets":[{"channel":"email","config":{}}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.example.com/v1/notification_preferences/id"

	payload := strings.NewReader("{\n  \"components\": [\n    \"GPU\",\n    \"NVLink\"\n  ],\n  \"notificationTargets\": [\n    {\n      \"channel\": \"email\",\n      \"config\": {}\n    }\n  ]\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.example.com/v1/notification_preferences/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"components\": [\n    \"GPU\",\n    \"NVLink\"\n  ],\n  \"notificationTargets\": [\n    {\n      \"channel\": \"email\",\n      \"config\": {}\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://api.example.com/v1/notification_preferences/id")
  .header("Content-Type", "application/json")
  .body("{\n  \"components\": [\n    \"GPU\",\n    \"NVLink\"\n  ],\n  \"notificationTargets\": [\n    {\n      \"channel\": \"email\",\n      \"config\": {}\n    }\n  ]\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://api.example.com/v1/notification_preferences/id', [
  'body' => '{
  "components": [
    "GPU",
    "NVLink"
  ],
  "notificationTargets": [
    {
      "channel": "email",
      "config": {}
    }
  ]
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.example.com/v1/notification_preferences/id");
var request = new RestRequest(Method.PUT);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"components\": [\n    \"GPU\",\n    \"NVLink\"\n  ],\n  \"notificationTargets\": [\n    {\n      \"channel\": \"email\",\n      \"config\": {}\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = [
  "components": ["GPU", "NVLink"],
  "notificationTargets": [
    [
      "channel": "email",
      "config": []
    ]
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.example.com/v1/notification_preferences/id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```