---
updatedAt: 2026-09-02T13:22:56.000Z
---

# Delete a product category

Use the `deleteProductCategory` mutation to delete a category by its `id`. The category must not have subcategories or associated products — both will block deletion.

```graphql
mutation deleteProductCategory {
  deleteProductCategory(id: "113d331a-6884-40ab-b87b-cb1a962be711") {
    id
  }
}
```

## Response

```json
{
  "data": {
    "deleteProductCategory": {
      "id": "113d331a-6884-40ab-b87b-cb1a962be711"
    }
  }
}
```

## Errors

**Category not found**

```json
{
  "errors": [
    {
      "message": "Category with id '113d331a-...' not found",
      "extensions": { "code": "CATEGORY_NOT_FOUND" }
    }
  ]
}
```

**Category has subcategories**

```json
{
  "errors": [
    {
      "message": "Category 'Electronics' has 3 subcategories and cannot be deleted",
      "extensions": { "code": "CATEGORY_HAS_SUBCATEGORIES" }
    }
  ]
}
```

**Category has products**

```json
{
  "errors": [
    {
      "message": "Category 'Laptops' has 12 products and cannot be deleted",
      "extensions": { "code": "CATEGORY_HAS_PRODUCTS" }
    }
  ]
}
```

## Authentication

This API uses API Key authentication. See [Using the Connect API](https://developer.goacoustic.com/acoustic-connect/reference/use-connect-api) for instructions on how to get and use your API key.