Public REST API

Preferium AI Edge exposes a token-authenticated public REST API so customers can read their SEO data and trigger optimizations programmatically. The full machine- readable contract is the OpenAPI 3.1 spec served live at https://api.preferium.com/v1/openapi.json — this page is the human summary.

Base URL + authentication

Limits

Read endpoints (public:read)

Method + pathReturns
GET /v1/domainsThe tenant’s domains
GET /v1/domains/{hostname}/pagesPages crawled for a domain
GET /v1/domains/{hostname}/milestonesLLM-citation milestones for a domain
GET /v1/pages/{id}A single page
GET /v1/pages/{id}/optimizationsA page’s per-element AI optimizations
GET /v1/llm-visibility/{hostname}LLM brand-visibility scores (Phase 13)
GET /v1/audit/{hostname}Site-audit issues
GET /v1/keywordsTracked keywords + SERP data
GET /v1/serpSERP rankings

Write endpoints (public:write, Pro/Enterprise)

Method + pathEffect
POST /v1/pages/{id}/optimizations/generateRe-run AI optimization for a page (deducts 1 credit)
POST /v1/pages/{id}/optimizations/deployDeploy selected per-element optimizations to the edge (title/description/h1/jsonld)

MCP server

The same read/write surface is available as a Model Context Protocol server (10 tools — 8 reads + optimize_page + deploy_optimization) for AI-agent clients, authenticated with the same API tokens. Registry distribution (registry.modelcontextprotocol.io, name com.preferium/ai-edge) is planned post-launch.

Errors

Errors are JSON { "error": "<code>", "detail": "<message>" } with a conventional HTTP status (400 invalid input, 401 unauthenticated, 402 insufficient credits, 403 wrong scope/plan, 404 not found, 429 rate-limited). The OpenAPI spec is the authoritative per-endpoint schema.