---
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 — The result payload. Omitted on failure.
    - `deleted_count` integer, required — How many records were actually deleted.
    - `requested_count` integer, required — How many IDs the request asked to delete.
  - `error` string, nullable — Human-readable failure message. Omitted on success.
  - `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 — `true` when the request succeeded. `false` responses carry `error` instead of `data`.

## Other responses

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

---

[API](https://skmtc.net/scanopy/apis/scanopy-api.md) · [All operations](https://skmtc.net/scanopy/apis/scanopy-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/scanopy/scanopy-api/versions/28e466341947/schema)
