---
title: "Start virus scan"
method: GET
path: "/ClamScanner/start_scan"
tags: ["ClamScanner", "Antivirus Protection (ClamAV)"]
---

# Start virus scan

`GET /ClamScanner/start_scan`

This function starts a ClamAV® scan on a directory.

**Note**:

You must run the APIs in this order:

1. Run [`ClamScanner::start_scan`](https://go.cpanel.net/ClamScanner-start-scan) to start the virus scan.
2. Run [`ClamScanner::get_scan_status`](https://go.cpanel.net/ClamScanner-get-scan-status) in a loop until the scan is finished.
3. Run [`ClamScanner::list_infected_files`](https://go.cpanel.net/ClamScanner-list-infected-files) to get a report of the complete list of infected files.
4. Decide how you want to handle each infected file.
5. Run [`ClamScanner::disinfect_files`](https://go.cpanel.net/ClamScanner-disinfect-files) to queue the disinfection of the files.
6. Run [`ClamScanner::check_disinfection_status`](https://go.cpanel.net/ClamScanner-check-disinfection-status) in a loop until you get a done status.

## Query parameters

- `scan_type` 'home' | 'mail' | 'public_html' | 'public_ftp', required

## Response `200`

HTTP Request was successful.

- object
  - `apiversion` integer — The version of the API.
  - `func` string — The name of the method called.
  - `module` string — The name of the module called.
  - `result` object
    - `data` object, nullable
    - `errors` string[], nullable — List of errors if the API failed.
    - `messages` string[], nullable — List of messages generated by the API.
    - `metadata` object
    - `status` 0 | 1 — * `1` - Success. * `0` - Failed. Check the `errors` field for more details.
    - `warnings` string[], nullable — List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API.

---

[API](https://skmtc.net/cpanel/apis/cpanel-uapi.md) · [All operations](https://skmtc.net/cpanel/apis/cpanel-uapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cpanel/cpanel-uapi/versions/632e2f8e6d04/schema)
