> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://api.docs.modulards.com/modular-ds-public-api/malware-scanner/malware-scanner-global-configurations/update-a-malware-scanner-global-configuration/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://api.docs.modulards.com/_mcp/server. # Update a Malware Scanner global configuration PATCH https://api.modulards.com/api/public/v1/preset-malware-scans/{preset_malware_scan} Content-Type: application/json Updates one Malware Scanner global configuration. Send only the fields you want to change. - `schedule` is replaced whole: when you send it, it carries every field its frequency needs (`frequency`, `start_hour`, `timezone` and the day its frequency asks for); when you leave it out, the stored one stays. - A new schedule reaches every website that uses the configuration and reschedules their next scan. - `default: true` makes it the configuration new websites receive and takes the mark off the previous one; `default: false` clears it. - The stored premium state is what gates the add-on, as in "Create a Malware Scanner global configuration" and "Assign websites to a Malware Scanner global configuration". **Body** All fields are optional and take the same values as in "Create a Malware Scanner global configuration". - `name` (string, optional): the configuration's name. - `schedule` (object, optional): `frequency`, `start_hour`, `timezone` and the day its frequency asks for. - `extensions` (array of strings, optional): file extensions skipped by every scan. - `max_file_size` (integer, optional): bytes. - `default` (boolean, optional): whether new websites receive it. **Errors** - **403**: the stored configuration is premium and the organization has not subscribed the add-on. - **422**: `schedule.frequency` other than `monthly` on a basic configuration; `tier` is sent (a configuration's tier cannot change after creation: create a new one instead); `region` or `batch` is sent. Reference: https://api.docs.modulards.com/modular-ds-public-api/malware-scanner/malware-scanner-global-configurations/update-a-malware-scanner-global-configuration ## Authentication - `Authorization` header (bearer token, required) — Personal access token created in the Modular DS dashboard; read-only tokens can only call GET endpoints. ## Request ### Path parameters - `preset_malware_scan` (string, required) ### Body (application/json) This endpoint expects an object. - `max_file_size` (double, optional) - `name` (string, optional) ## Response ### 200 200 - Malware scan configuration updated - `data` (ApiPublicV1PresetMalwareScansPresetMalwareScanPatchResponsesContentApplicationJsonSchemaData, optional) - `jsonapi` (ApiPublicV1PresetMalwareScansPresetMalwareScanPatchResponsesContentApplicationJsonSchemaJsonapi, optional) ## Errors ### 422 Unprocessable Entity Error 422 - Tier sent on an update - `errors` (list of ApiPublicV1PresetMalwareScansPresetMalwareScanPatchResponsesContentApplicationJsonSchemaErrorsItems, optional) - `jsonapi` (ApiPublicV1PresetMalwareScansPresetMalwareScanPatchResponsesContentApplicationJsonSchemaJsonapi, optional) ## Types ### ApiPublicV1PresetMalwareScansPresetMalwareScanPatchResponsesContentApplicationJsonSchemaData - `attributes` (ApiPublicV1PresetMalwareScansPresetMalwareScanPatchResponsesContentApplicationJsonSchemaDataAttributes, optional) - `id` (string, optional) - `links` (ApiPublicV1PresetMalwareScansPresetMalwareScanPatchResponsesContentApplicationJsonSchemaDataLinks, optional) - `type` (string, optional) ### ApiPublicV1PresetMalwareScansPresetMalwareScanPatchResponsesContentApplicationJsonSchemaJsonapi - `version` (string, optional) ### ApiPublicV1PresetMalwareScansPresetMalwareScanPatchResponsesContentApplicationJsonSchemaErrorsItems - `detail` (string, optional) - `source` (ApiPublicV1PresetMalwareScansPresetMalwareScanPatchResponsesContentApplicationJsonSchemaErrorsItemsSource, optional) - `status` (string, optional) - `title` (string, optional) ### ApiPublicV1PresetMalwareScansPresetMalwareScanPatchResponsesContentApplicationJsonSchemaDataAttributes - `created_at` (string, optional) - `extensions` (list of string, optional) - `is_default` (boolean, optional) - `max_file_size` (double, optional) - `name` (string, optional) - `schedule` (ApiPublicV1PresetMalwareScansPresetMalwareScanPatchResponsesContentApplicationJsonSchemaDataAttributesSchedule, optional) - `status` (string, optional) - `tier` (string, optional) - `updated_at` (string, optional) ### ApiPublicV1PresetMalwareScansPresetMalwareScanPatchResponsesContentApplicationJsonSchemaDataLinks - `self` (string, optional) ### ApiPublicV1PresetMalwareScansPresetMalwareScanPatchResponsesContentApplicationJsonSchemaErrorsItemsSource - `parameter` (string, optional) ### ApiPublicV1PresetMalwareScansPresetMalwareScanPatchResponsesContentApplicationJsonSchemaDataAttributesSchedule - `day_month` (double, optional) - `day_week` (any, optional, nullable) - `frequency` (string, optional) - `start_hour` (string, optional) - `timezone` (string, optional) ## Examples ### 200 - Malware scan configuration updated **Response** ```json { "data": { "attributes": { "created_at": "2026-09-18T09:00:00.000000Z", "extensions": [ "php3", "phtml" ], "is_default": false, "max_file_size": 1048576, "name": "Client sites (EU)", "schedule": { "day_month": 1, "day_week": null, "frequency": "monthly", "start_hour": "03:00", "timezone": "Europe/Madrid" }, "status": "enabled", "tier": "basic", "updated_at": "2026-09-18T10:15:00.000000Z" }, "id": "7", "links": { "self": "https://api.modulards.com/api/public/v1/preset-malware-scans/7" }, "type": "preset-malware-scans" }, "jsonapi": { "version": "1.1" } } ``` **SDK Code** ```python 200 - Malware scan configuration updated import requests url = "https://api.modulards.com/api/public/v1/preset-malware-scans/preset_malware_scan" headers = {"Authorization": "Bearer "} response = requests.patch(url, headers=headers) print(response.json()) ``` ```javascript 200 - Malware scan configuration updated const url = 'https://api.modulards.com/api/public/v1/preset-malware-scans/preset_malware_scan'; const options = {method: 'PATCH', headers: {Authorization: 'Bearer '}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go 200 - Malware scan configuration updated package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.modulards.com/api/public/v1/preset-malware-scans/preset_malware_scan" req, _ := http.NewRequest("PATCH", url, nil) req.Header.Add("Authorization", "Bearer ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby 200 - Malware scan configuration updated require 'uri' require 'net/http' url = URI("https://api.modulards.com/api/public/v1/preset-malware-scans/preset_malware_scan") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Patch.new(url) request["Authorization"] = 'Bearer ' response = http.request(request) puts response.read_body ``` ```java 200 - Malware scan configuration updated import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.patch("https://api.modulards.com/api/public/v1/preset-malware-scans/preset_malware_scan") .header("Authorization", "Bearer ") .asString(); ``` ```php 200 - Malware scan configuration updated request('PATCH', 'https://api.modulards.com/api/public/v1/preset-malware-scans/preset_malware_scan', [ 'headers' => [ 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ``` ```csharp 200 - Malware scan configuration updated using RestSharp; var client = new RestClient("https://api.modulards.com/api/public/v1/preset-malware-scans/preset_malware_scan"); var request = new RestRequest(Method.PATCH); request.AddHeader("Authorization", "Bearer "); IRestResponse response = client.Execute(request); ``` ```swift 200 - Malware scan configuration updated import Foundation let headers = ["Authorization": "Bearer "] let request = NSMutableURLRequest(url: NSURL(string: "https://api.modulards.com/api/public/v1/preset-malware-scans/preset_malware_scan")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "PATCH" request.allHTTPHeaderFields = headers 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() ``` ### Update a Malware Scanner global configuration **Request** ```json { "max_file_size": 1048576, "name": "Client sites (EU)" } ``` **Response** ```json { "data": { "attributes": { "created_at": "2026-09-18T09:00:00.000000Z", "extensions": [ "php3", "phtml" ], "is_default": false, "max_file_size": 1048576, "name": "Client sites (EU)", "schedule": { "day_month": 1, "day_week": null, "frequency": "monthly", "start_hour": "03:00", "timezone": "Europe/Madrid" }, "status": "enabled", "tier": "basic", "updated_at": "2026-09-18T10:15:00.000000Z" }, "id": "7", "links": { "self": "https://api.modulards.com/api/public/v1/preset-malware-scans/7" }, "type": "preset-malware-scans" }, "jsonapi": { "version": "1.1" } } ``` **SDK Code** ```python Update a Malware Scanner global configuration import requests url = "https://api.modulards.com/api/public/v1/preset-malware-scans/preset_malware_scan" payload = { "max_file_size": 1048576, "name": "Client sites (EU)" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.patch(url, json=payload, headers=headers) print(response.json()) ``` ```javascript Update a Malware Scanner global configuration const url = 'https://api.modulards.com/api/public/v1/preset-malware-scans/preset_malware_scan'; const options = { method: 'PATCH', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: '{"max_file_size":1048576,"name":"Client sites (EU)"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Update a Malware Scanner global configuration package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.modulards.com/api/public/v1/preset-malware-scans/preset_malware_scan" payload := strings.NewReader("{\n \"max_file_size\": 1048576,\n \"name\": \"Client sites (EU)\"\n}") req, _ := http.NewRequest("PATCH", url, payload) req.Header.Add("Authorization", "Bearer ") 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 Update a Malware Scanner global configuration require 'uri' require 'net/http' url = URI("https://api.modulards.com/api/public/v1/preset-malware-scans/preset_malware_scan") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Patch.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"max_file_size\": 1048576,\n \"name\": \"Client sites (EU)\"\n}" response = http.request(request) puts response.read_body ``` ```java Update a Malware Scanner global configuration import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.patch("https://api.modulards.com/api/public/v1/preset-malware-scans/preset_malware_scan") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"max_file_size\": 1048576,\n \"name\": \"Client sites (EU)\"\n}") .asString(); ``` ```php Update a Malware Scanner global configuration request('PATCH', 'https://api.modulards.com/api/public/v1/preset-malware-scans/preset_malware_scan', [ 'body' => '{ "max_file_size": 1048576, "name": "Client sites (EU)" }', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp Update a Malware Scanner global configuration using RestSharp; var client = new RestClient("https://api.modulards.com/api/public/v1/preset-malware-scans/preset_malware_scan"); var request = new RestRequest(Method.PATCH); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"max_file_size\": 1048576,\n \"name\": \"Client sites (EU)\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Update a Malware Scanner global configuration import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = [ "max_file_size": 1048576, "name": "Client sites (EU)" ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.modulards.com/api/public/v1/preset-malware-scans/preset_malware_scan")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "PATCH" 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() ```