> For the complete documentation index, see [llms.txt](https://suigar.gitbook.io/suigar-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://suigar.gitbook.io/suigar-docs/seo/subprojects/backend-api.md).

# Backend and API

Last reviewed: 2026-05-17

Applies to `backend/` and public API behavior that can affect discoverability, snippets, docs, or crawl safety.

## Role

The backend usually does not create search pages directly, but it affects SEO through public API data, error copy, redirects, metadata inputs, indexing data, analytics, and future automation.

## Rules

* Public errors must stay user-safe and must not leak service names, RPC details, stack traces, config keys, or internal fallbacks.
* API fields used for public metadata, blog content, docs, or generated pages must be stable and documented.
* Redirects and response status behavior should support clear canonical URLs when backend routes are involved.
* Do not expose admin/private API endpoints in public docs or sitemaps unless intentionally documented and safe.
* Measurement ingestion, Search Console exports, and SEO automation jobs should have explicit retention and ownership before becoming level 4 or 5 maturity.

## Future Automation Uses

* Store Search Console aggregates, analytics summaries, crawl reports, and editorial campaign metadata.
* Feed AI agents with query/page cohorts and measured outcomes.
* Track content refresh candidates and stale claim alerts.

## Next Improvements

* Define a safe SEO analytics import model before connecting external measurement data.
* Add public API documentation rules if any endpoints become acquisition or integration pages.
