--- title: "Update notification settings" source_url: https://dev.digicert.com/certcentral-apis/services-api/vulnerability-assessments/update-notification-settings.html api_method: PUT --- Use this endpoint to change the setting for when you receive notification emails about vulnerability assessments for an order. Replace `{{order_id}}` in the URL with the ID of the order. To get the ID values for orders in your account, use the [List orders](https://dev.digicert.com/md/certcentral-apis/services-api/orders/list-orders.md) endpoint. ## Example requests and responses **cURL** ```bash curl-X PUT \ https://www.digicert.com/services/v2/vulnerability-assessment/{{order_id}}/notification-settings \ -H 'Content-Type: application/json' \ -H 'X-DC-DEVKEY: {{api_key}}' \ -d '{ "setting": "always_notify" }' ``` **Python** ```python import requests url = "https://www.digicert.com/services/v2/vulnerability-assessment/{{order_id}}/notification-settings" payload = "{\n\t\"setting\": \"always_notify\"\n}" headers = { 'Content-Type': 'application/json', 'X-DC-DEVKEY': '{{api_key}}' } response = requests.request("PUT", url, headers=headers, data = payload) print(response.text.encode('utf8')) ``` **Go** ```go package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "https://www.digicert.com/services/v2/vulnerability-assessment/{{order_id}}/notification-settings" method := "PUT" payload := strings.NewReader("{\n \"setting\": \"always_notify\"\n}") client := &http.Client { } req, err := http.NewRequest(method, url, payload) if err != nil { fmt.Println(err) } req.Header.Add("Content-Type", "application/json") req.Header.Add("X-DC-DEVKEY", "{{api_key}}") res, err := client.Do(req) defer res.Body.Close() body, err := ioutil.ReadAll(res.Body) fmt.Println(string(body)) } ``` **NodeJS** ```javascript var request = require('request'); var options = { 'method': 'PUT', 'url': 'https://www.digicert.com/services/v2/vulnerability-assessment/{{order_id}}/notification-settings', 'headers': { 'Content-Type': 'application/json', 'X-DC-DEVKEY': '{{api_key}}' }, body: JSON.stringify({"setting":"always_notify"}) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); }); ``` **200 OK** ```json // empty ``` **404 Not Found** ```json { "errors": [ { "code": "not_found|route", "message": "The specified route was not found." } ] } ``` **403 Forbidden (Access permission)** ```json { "errors": [ { "code": "access_denied", "message": "You do not have permission to manage this request." } ] } ``` **400 Bad Request (Invalid order status)** ```json { "errors": [ { "code": "va_not_eligible_order", "message": "Invalid order status. Order must be issued, not revoked, expired, or pending." } ] } ``` **400 Bad Request (Invalid product type)** ```json { "errors": [ { "code": "va_not_eligible_product", "message": "Invalid certificate type. Vulnerability assessment is only available for Secure Site EV and Secure Site Pro certificates." } ] } ``` ## Request parameters
Name Opt/Req Type Description
setting required string Sets when you receive notification emails.
Allowed values (case sensitive, lowercase):
  • disabled: Never receive email notifications.
  • always_notify: Receive notification emails after every completed scan.
  • notify_only_alerts: Only receive email notifications when a scan finds vulnerabilities.