# anh.pw

> Personal publishing site, digital garden, and notes workspace by Brian Cao (Cao Hồng Anh).

## Public Content & Markdown Negotiation

Any public post (`/posts/<slug>`), quote (`/quotes/<slug>`), or public note (`/notes/<id>`) supports clean Markdown with YAML frontmatter via `Accept: text/markdown` or `?format=md`.

- [Public Feed JSON](https://anh.pw/api/feed.json): Cursor-paginated feed of public posts, articles, links, quotes, images, code, and videos (`?type=&tag=&q=&lang=&limit=&cursor=`).
- [Public Search JSON](https://anh.pw/api/search.json): Search published content and tags (`?q=...`).
- [Public Notes JSON / Markdown](https://anh.pw/api/public-notes.json): 2 public notes (`?tag=&space=&search=&limit=&offset=&format=md`).
- [Post JSON](https://anh.pw/api/post/<slug>.json): Full public post payload including raw Markdown and translations.
- [About](https://anh.pw/about?format=md) · [Affiliate](https://anh.pw/affiliate?format=md) · [Legal](https://anh.pw/legal?format=md): Site pages.

## Authenticated Agent Management API

AI assistants and automation tools can manage private/public Notes (Memos), Articles/Posts, Media, Tags, Pages, Comments, Reserved Paths, AI Prompts, and Site Settings over HTTPS.

- **Authentication:** Create a Bearer API token at `https://anh.pw/dash/tokens` (or `https://anh.pw/dash/`), then send `Authorization: Bearer <token>` (or `X-API-Key: <token>`).
- **Live Operating Guide (start here):** `GET https://anh.pw/api/agent/help` (supports `?format=markdown` or `Accept: text/markdown`).
- **OpenAPI 3.1 Specification:** `GET https://anh.pw/api/agent/openapi.json` (Bearer auth required).
- **Notes / Memos API:** `GET|POST https://anh.pw/api/agent/notes`, `GET|PATCH|DELETE https://anh.pw/api/agent/notes/:id`, `POST https://anh.pw/api/agent/notes/:id/promote`, `GET|POST https://anh.pw/api/agent/notes/spaces`, `GET https://anh.pw/api/agent/notes/attachments` (also aliased at `/api/agent/memos/*`).
- **Content & Publishing API:** `GET|POST https://anh.pw/api/agent/content`, `GET https://anh.pw/api/agent/content/search`, `GET|PATCH|DELETE https://anh.pw/api/agent/content/:id`, `POST https://anh.pw/api/agent/content/:id/publish`, `PUT|DELETE https://anh.pw/api/agent/content/:id/translations/:locale`.
- **Media, Tags, Pages, Comments & Site:** `/api/agent/media`, `/api/agent/media/import-url`, `/api/agent/tags`, `/api/agent/pages`, `/api/agent/comments`, `/api/agent/reserved-paths`, `/api/agent/prompts`, `/api/agent/overview`, `/api/agent/analytics`, `/api/agent/settings`, `/api/agent/unfurl`.

## Recent Public Posts

- [Tạo bàn cờ và mời bạn bè cùng chơi trên Vietcotuong.com](https://anh.pw/posts/tao-ban-co-va-moi-ban-be-cung-choi-tren-vietcotuong-com) (`post`): Hướng dẫn tạo bàn cờ riêng tư và gửi link mời bạn bè cùng chơi trên Vietcotuong.com mà người được mời không cần đăng ký tài khoản.
- [Nhúng game trên bất cứ website nào của bạn](https://anh.pw/posts/nhung-game-tren-bat-cu-website-nao-cua-ban-tinh-nang-moi-cua-vietcotuong-com) (`post`): vietcotuong.com vừa ra mắt tính năng nhúng game: chỉ cần dán một liên kết là bạn đã có ngay bàn cờ tương tác trên website của mình. Cùng xem
- [Hello World](https://anh.pw/posts/1786088866117-hello-world) (`post`): First Post
