# Delete Host

`DELETE /vault/hyok/hosts/{host_id}` · Keys & Secrets · HYOK Clusters & Hosts

Deregisters a host. It is refused while the host is in a cluster: remove it from the cluster first. The host's record is kept with the status `deregistered`. Deregistering it again returns 204. Needs `ORG_ADMIN`.

## Parameters

| Name | In | Required | Description |
|---|---|---|---|
| `orgId` | query | yes | The organisation's id. Example: `"org_O3QAqchb6v7d"`. |
| `host_id` | path | yes | The host's id: `hyokhost_` and a UUID. Example: `"hyokhost_8c1b3d5f-7a9e-4c2d-8e6f-0a1b2c3d4e5f"`. |

## Responses

- **204**: The host is deregistered.

## Errors

| HTTP | Description |
|---|---|
| 404 | No such host. |
| 409 | `HYOK_HOST_IN_CLUSTER`: the host is in a cluster. |
| 500 | An internal error. Retry later. |

## Code samples

### cURL

```bash
curl -X DELETE 'https://<org>.api-<region>.k9o.io/@storefront/vault/hyok/hosts/<hostId>' \
  -H 'Authorization: Bearer $K9O_TOKEN'
```

### fetch

```javascript
const res = await fetch('https://<org>.api-<region>.k9o.io/@storefront/vault/hyok/hosts/<hostId>', {
  method: 'DELETE',
  headers: {
    'Authorization': `Bearer ${process.env.K9O_TOKEN}`
  },
});
const { data, meta } = await res.json();
```


Canonical page: https://docs.kilimanjaro.dev/api-playground/keys-secrets/delete-host
