---
title: "Bulk delete hosts"
method: POST
path: "/api/v1/hosts/bulk-delete"
tags: ["Hosts"]
---

# Bulk delete hosts

`POST /api/v1/hosts/bulk-delete`

Deletes multiple hosts in a single request. The request body should be
an array of host IDs to delete. Fails if any host has an associated daemon.

## Request body

- string[]

## Response `200`

Hosts deleted successfully

- ApiResponseBulkDeleteResponse
  - `data` object
    - `deleted_count` integer, required
    - `requested_count` integer, required
  - `error` string, nullable
  - `meta` ApiMeta, required — API metadata included in all responses
    - `api_version` integer, required — API version (integer, increments on breaking changes)
    - `server_version` string, required — Server version (semver)
  - `success` boolean, required

## Other responses

- `409` — One or more hosts has an associated daemon - delete daemons first

---

[API](https://skmtc.dev/scanopy/apis/scanopy-api.md) · [All operations](https://skmtc.dev/scanopy/apis/scanopy-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/scanopy/scanopy-api/revisions/f04499e2280f/schema)
