Create malware scan configuration
Creates a Malware Scanner global configuration: a named scan schedule you then assign to websites. Answers **201** with the configuration document and a `Location` header. Creating it scans no website yet - assign websites with "Assign websites to a malware scan configuration".
**Body** (JSON):
- `name` (string, required, max 255).
- `tier` (string, required) - `basic` (scans only) or `premium` (scans and cleans, depends on the addon); cannot change after creation.
- `schedule` (object, required): `frequency` (`monthly`, `weekly`, `daily` - a basic configuration is limited to `monthly`), `start_hour` (`HH:MM`, 24 hours), `timezone` (IANA name, e.g. `Europe/Madrid`), `day_week` (`monday` ... `sunday`, required for a weekly schedule), `day_month` (1-31, required for a monthly schedule).
- `extensions` (array of string, optional) - file extensions skipped by every scan, from the provider's own code-file set (`php`, `phtml`, `php3`, `php4`, `php5`, `php7`, `phps`, `inc`, `js`, `html`, `htm`, `htaccess`, `svg`); omit to scan every extension.
- `max_file_size` (integer, optional) - bytes, 0 to 5242880 (5 MB); omit to keep the default.
- `default` (boolean, optional) - `true` makes it the configuration new websites receive.
`region` and `batch` are never accepted here and answer 422 - a Malware Scanner configuration carries no region, and the technical batch sizes stay a dashboard-only setting.
Requires a full-access token (read-only tokens answer 403). Validation failures answer 422 with a JSON:API `errors` document.
Authentication
AuthorizationBearer
Personal access token created in the Modular DS dashboard; read-only tokens can only call GET endpoints.
Request
This endpoint expects an object.
default
extensions
max_file_size
name
schedule
tier
Response headers
Location
Response
201 - Malware scan configuration created
data
jsonapi
Errors
422
Unprocessable Entity Error

