---
id: DeleteAuthor
name: Delete author
version: 1.0.0
badges:
  - content: Catalog Management
    backgroundColor: green
    textColor: green
summary: Deletes an existing author from the Catalog.
owners:
  - catalog-experience-team
schemaPath: schema.json
operation:
  method: DELETE
  path: /api/v1/authors/{id}
  statusCodes: ["204", "404"]
sidebar:
  badge: "DELETE"
---

`DeleteAuthor` permanently deletes an author record from [[service|catalog-api]] (`DELETE /catalog/api/v1/authors/{id}`) and returns `204 No Content`. Deletion is rejected with `400 Bad Request` when any active book references the author.

## Overview

| Property                           | Value                                                                                                                              |
| :--------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------- |
| **Bounded Context**                | Catalog                                                                                                                            |
| **Owner Service**                  | [[service\|catalog-api]]                                                                                                           |
| **Protocol / Format**              | HTTP `DELETE`, path parameter only, empty response (`204 No Content`)                                                              |
| **Gateway Endpoint**               | `DELETE /catalog/api/v1/authors/{id}` (service path `/api/v1/authors/{id}`)                                                        |
| **Authentication & Authorization** | Microsoft Entra ID JWT — `business_user` policy (role `business_user` or `admin` and scopes `catalog_read`, `catalog_write`)       |
| **Idempotency / Concurrency**      | Not idempotent across retries; repeating a completed delete returns `404 Not Found`; no `x-request-id` header is enforced          |
| **Rate Limit / Caching**           | Global concurrency (`100`) and fixed-window (`30 req/min`) limiters plus per-user token bucket; invalidates author and book caches |
| **Contract Version**               | `1.0.0` (`ApiVersions.V1`)                                                                                                         |

## Request & Response Contract

### Path Parameters

| Name | Type              | Required | Constraints                                           | Description                               |
| :--- | :---------------- | :------- | :---------------------------------------------------- | :---------------------------------------- |
| `id` | `string` (`uuid`) | Yes      | Valid UUID; must not be referenced by any active book | Unique identifier of the author to delete |

## Behavior & Side Effects

- **Referential integrity guard:** Rejects deletion with `400 Bad Request` (`"Author has books and cannot be deleted"`) if any active (non-soft-deleted) book references the author.
- **Hard delete:** Permanently removes the [[entity|author]] record (no soft delete). If a soft-deleted book still references the author, the database restrict constraint causes `500 Internal Server Error`.
- **Cache invalidation:** Clears `catalog:authors:v1` and invalidates `book` and `books:list` cache tags.
- **Vector index queueing:** Database triggers enqueue any linked book IDs for asynchronous vector reconciliation by [[service|catalog-ingestion]].

## Error Responses

| Status / Code               | Condition                                                                                                        | Client Recovery Action                                                         |
| :-------------------------- | :--------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------- |
| `400 Bad Request`           | Author is still linked to one or more active books, or `{id}` is not a valid UUID                                | Reassign or delete linked books first, or fix the UUID; do not retry unchanged |
| `401 Unauthorized`          | Missing, expired, or invalid Entra ID JWT                                                                        | Acquire a valid Entra ID access token and retry                                |
| `403 Forbidden`             | Token lacks role `business_user` or `admin`, or lacks scopes `catalog_read` and `catalog_write`                  | Request the required Entra ID app role and scopes                              |
| `404 Not Found`             | No author exists with the supplied `{id}`                                                                        | Verify the UUID; treat as already absent only if your workflow allows it       |
| `429 Too Many Requests`     | Rate limit quota exceeded (`Retry-After` header included)                                                        | Wait for the `Retry-After` interval before retrying                            |
| `500 Internal Server Error` | Database restrict constraint failure (e.g., soft-deleted book reference) or unhandled error (`traceId` included) | Inspect service logs using `traceId`                                           |

## Related Documentation

- [[service|catalog-api]] — Service overview, routing, and authorization policies.
- [[entity|author]] — Author entity model.
- [[command|CreateAuthor]] — Create a new author record.
- [[command|UpdateAuthor]] — Rename an existing author.

<NodeGraph />

<SchemaViewer file="schema.json" title="Delete author schema" maxHeight="500" search="true" />


 ## Raw Schema:schema.json

{
	"$schema": "https://json-schema.org/draft/2020-12/schema",
	"title": "DeleteAuthor",
	"description": "Path identifier for the author to delete.",
	"type": "string",
	"format": "uuid"
}
