# Prompt: Create API Endpoint

Use to add a single endpoint without UI.

---

Add the endpoint:

- **Method + route:** `<METHOD> <path>` (e.g. `POST /api/documents`)
- **Domain:** `<domain>`
- **Request shape:** <fields + types>
- **Response shape (data field of ApiResponse):** <T>
- **Authz:** policy `<name>` and/or permission `<perm>`
- **Audit action:** `<entity>.<verb>` (omit for read-only)

Follow .NET conventions in `CLAUDE.md` + the `auth-flow` and `audit-log-instrumentation` skills as relevant. Add the Zod contract in `packages/api-contracts/`. Add a validator test.

Run `dotnet build && dotnet test` after.
