---
title: "Delete command definition"
method: DELETE
path: "/api/v2/devices/{id}/commands/{commandId}"
tags: ["Commands"]
---

# Delete command definition

`DELETE /api/v2/devices/{id}/commands/{commandId}`

## Request

- Base URL: `https://api.chirpwireless.io`
- URL: `https://api.chirpwireless.io/api/v2/devices/{id}/commands/{commandId}`
- Auth: API key in header `X-API-Key` and API key in header `X-Organization-Id`

Delete a command definition. Returns 409 (query_command_in_use) when another command references it as its query command.

**Required scope:** `commands:write`

## Path parameters

- `id` string, required
- `commandId` string, required

## Query parameters

- `organizationId` string, required

## Response `200`

Command deleted (HTTP 204 No Content)

## Other responses

- `401`: Missing or invalid API key
- `403`: Insufficient permissions (missing required scope)

---

[API](https://skmtc.dev/chirpwireless/apis/chirp-public-api.md) · [All operations](https://skmtc.dev/chirpwireless/apis/chirp-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/chirpwireless/apis/chirp-public-api/revisions/0414f3e239ff?raw)
