> ## Documentation Index
> Fetch the complete documentation index at: https://docs.publica.la/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete Content

Remove content items from your catalog. This operation is **permanent and irreversible**.

:::warning Permanent Deletion
Deleted content:

- Is removed from the catalog and storefront
- Is no longer accessible via the API
- **Files, metadata, and associated data are permanently deleted**
- Cannot be restored — create the content again if needed
  :::

---

## Endpoint

```
DELETE /api/v3/content/{content_id}
```

---

## Path Parameters

| Parameter    | Type   | Description                        |
| ------------ | ------ | ---------------------------------- |
| `content_id` | string | Content internal ID or external ID |

---

## Query Parameters

| Parameter | Type   | Default    | Description                                           |
| --------- | ------ | ---------- | ----------------------------------------------------- |
| `id_type` | string | `internal` | `internal` for numeric ID, `external` for external ID |

---

## Request Examples

### Delete by Internal ID

```bash
curl -X DELETE "https://yourstore.publica.la/api/v3/content/468166" \
  -H "X-User-Token: your-api-token"
```

### Delete by External ID (ISBN)

```bash
curl -X DELETE "https://yourstore.publica.la/api/v3/content/9781234567890?id_type=external" \
  -H "X-User-Token: your-api-token"
```

---

## Response

### Success Response (204 No Content)

A successful deletion returns a `204 No Content` response with an empty body.

```
HTTP/1.1 204 No Content
```

:::tip Verifying Deletion
To confirm deletion, attempt to retrieve the content. A `404 Not Found` response confirms the content was deleted.
:::

---

## Error Handling

### Forbidden (403)

```json
{
  "message": "This action is unauthorized."
}
```

This occurs when:

- The content belongs to a different tenant

### Content Not Found (404)

```json
{
  "message": "Content not found."
}
```

This occurs when:

- The internal ID doesn't exist
- The external ID doesn't exist (with `id_type=external`)
- The content was already deleted

### Authentication Error (401)

```json
{
  "message": "Unauthenticated."
}
```

---

## Impact on Related Data

When content is deleted:

- **Permanently deleted**: files, metadata, prices, descriptions, and audiobook tracks
- **Preserved**: existing orders and historical analytics data

---

## Use Cases

### Removing Outdated Content

Delete content that is no longer relevant:

```bash
# Old edition replaced by new one
curl -X DELETE "https://yourstore.publica.la/api/v3/content/OLD-ISBN?id_type=external" \
  -H "X-User-Token: your-api-token"
```

### Content Rights Expiration

Remove content when publishing rights expire:

```bash
curl -X DELETE "https://yourstore.publica.la/api/v3/content/9781234567890?id_type=external" \
  -H "X-User-Token: your-api-token"
```

### Catalog Cleanup

Remove test or duplicate content:

```bash
# Delete test content
curl -X DELETE "https://yourstore.publica.la/api/v3/content/TEST-001?id_type=external" \
  -H "X-User-Token: your-api-token"
```

---

## Troubleshooting

### Cannot Delete Content

| Issue                 | Solution                                     |
| --------------------- | -------------------------------------------- |
| 404 Not Found         | Verify content ID and `id_type` parameter    |
| 401 Unauthenticated   | Check API token is valid and has permissions |
| Content still appears | Verify deletion with a GET request           |

### Accidental Deletion

Deleted content **cannot be recovered**. You will need to recreate the content from scratch.

---

## See Also

- [Get Content](./content-v3-get.md) - Verify content before deletion
- [Update Content](./content-v3-update.md) - Alternative to deletion
- [List Content](./content-v3-list.md) - Find content to manage
- [Overview](./content-v3-overview.md) - API overview

---
