Skip to content
RELAYTO

RELAYTO developer docs

Every site published on RELAYTO has a public, read-only API, an MCP server and Markdown for AI agents, with no API key. To work in your own workspace, connect an agent to the RELAYTO MCP server.

Try it
npx relayto search "open enrollment" --site benefits.relayto.com

Read any site published on RELAYTO

Every site on a *.relayto.com address or on its publisher’s own domain answers the same public addresses for AI agents and crawlers. They serve only what any visitor can open without signing in; gated content is left out on purpose.

Replace <site> with the site’s host name, for example benefits.relayto.com.

https://<site>/llms.txt
The site’s hubs, documents and pages, each with a link to its Markdown.
<page URL>.md
Any page as Markdown.
Accept: text/markdown
Any page URL requested with this header answers in Markdown.
https://<site>/.well-known/ai-catalog.json
A catalog of these entry points for AI agents.
https://<site>/sitemap.xml
Every page URL.
Terminal
curl https://benefits.relayto.com/llms.txt
curl https://benefits.relayto.com/e/what-is-open-enrollment-4uoe8tjxhumq6.md
curl -H "Accept: text/markdown" https://benefits.relayto.com/e/what-is-open-enrollment-4uoe8tjxhumq6

The RELAYTO site API

Each site’s REST API searches and reads its pages, hubs and documents, with the text of each as Markdown. It is versioned and read-only, and needs no API key. Guides to every RELAYTO API: RELAYTO API, MCP server & SDK.

Worked example: the API reference and OpenAPI description of benefits.relayto.com.

Terminal
curl "https://benefits.relayto.com/api/site/v1/search?q=open%20enrollment&limit=1"
Response
{
  "query": "open enrollment",
  "data": [
    {
      "kind": "content",
      "slug": "what-is-open-enrollment-4uoe8tjxhumq6",
      "title": "What Is Open Enrollment?",
      "summary": "Your yearly window to choose or change your benefits.",
      "format": "video",
      "url": "https://benefits.relayto.com/e/what-is-open-enrollment-4uoe8tjxhumq6",
      "markdownUrl": "https://benefits.relayto.com/e/what-is-open-enrollment-4uoe8tjxhumq6.md",
      "apiUrl": "https://benefits.relayto.com/api/site/v1/contents/what-is-open-enrollment-4uoe8tjxhumq6",
      "updated": "2026-11-11T09:32:36Z"
    }
  ],
  "pagination": { "limit": 1, "hasMore": true, "nextCursor": "eyJvIjoxLCJzIjoiZWNjZDNkOTg0MzU2In0" },
  "links": {
    "self": "https://benefits.relayto.com/api/site/v1/search?q=open%20enrollment&limit=1",
    "next": "https://benefits.relayto.com/api/site/v1/search?q=open%20enrollment&limit=1&cursor=eyJvIjoxLCJzIjoiZWNjZDNkOTg0MzU2In0"
  }
}

Operations

Operations of the site API, relative to https://<site>/api/site/v1
MethodPathOperationReturns
GET/getSiteThe site and its API links
GET/searchsearchSiteSearch the site by keyword
GET/pageslistPagesThe site’s own pages
GET/hubslistHubsThe site’s hubs
GET/hubs/{hubSlug}getHubOne hub
GET/hubs/{hubSlug}/itemslistHubItemsThe items in a hub
GET/contentslistContentsThe documents in the site’s library
GET/contents/{contentSlug}getContentA document or page with its text
POST/exportscreateExportStart an export of several documents
GET/exports/{exportId}getExportAn export job and its result

Details

Base URL
https://<site>/api/site/v1
OpenAPI
https://<site>/openapi.json, OpenAPI 3.1
Reference
https://<site>/developers, with every operation, parameter and error code
Authentication
None: no API key, no sign-up. Every operation reads; the one POST, createExport, only starts a job that collects the text of several documents.
Pagination
limit (1 to 50, default 10) and an opaque cursor: pass pagination.nextCursor until pagination.hasMore is false.
Errors
Every 4xx and 5xx answer is an RFC 9457 problem (application/problem+json) with a stable code and a hint on what to do next.
Rate limits
120 requests per 60 seconds per client IP. Every answer carries RateLimit and RateLimit-Policy headers; a 429 adds Retry-After.
Versioning
The major version is in the path. Changes within v1 are additive only, and a version that is retired keeps working for at least 6 months after it is deprecated.
Sandbox
https://<site>/api/site/sandbox/v1 answers every operation with fixed sample data in the same shapes, for testing an integration.
A 404, as application/problem+json
{
  "type": "https://benefits.relayto.com/developers#error-not_found",
  "title": "Not found",
  "status": 404,
  "detail": "There is no content \"no-such-document\" on this site.",
  "instance": "/api/site/v1/contents/no-such-document",
  "code": "not_found",
  "hint": "Check the slug with searchSite, listContents or listHubs."
}

The relayto SDK and CLI

The official TypeScript SDK and CLI for the site API, on npm as relayto. No runtime dependencies; Node.js 20.3 or later. The SDK follows cursors with async iterators, throws typed errors and retries a 429 after Retry-After.

Every command, method and error class: packages/relayto on GitHub.

Terminal
npx relayto search "open enrollment" --site benefits.relayto.com
npx relayto hubs --site benefits.relayto.com
npx relayto get https://benefits.relayto.com/e/what-is-open-enrollment-4uoe8tjxhumq6
npx relayto site --site benefits.relayto.com
Terminal
npm install relayto
TypeScript
import { RelaytoSite } from 'relayto';

const site = new RelaytoSite('benefits.relayto.com');

// One page of search results
const results = await site.search('open enrollment', { limit: 3 });
for (const item of results.data) console.log(item.title, item.url);

// Every hub, following the cursors
for await (const hub of site.allHubs()) console.log(hub.title, hub.url);

// A document with its text as Markdown
const doc = await site.getContent('what-is-open-enrollment-4uoe8tjxhumq6');
console.log(doc.access === 'open' ? doc.markdown : `Description only: ${doc.url}`);

RELAYTO MCP servers

Every published site has its own public MCP server for reading it. RELAYTO’s platform server works in your workspace after you sign in.

  • Every published site

    https://<site>/mcp

    Public and read-only, no sign-in. Tools: search_content, list_hubs, get_content. MCP Registry: com.relayto/site-content.

    Terminal
    # Claude Code: one site's MCP server
    claude mcp add --transport http benefits https://benefits.relayto.com/mcp
    
    # A client that only starts local (stdio) servers
    npx -y relayto-mcp --site benefits.relayto.com
  • Your RELAYTO workspace

    https://mcp.relayto.com/mcp

    Sign in with your RELAYTO account, and your agent can search, publish, organize, share and measure content with your permissions: 31 tools. MCP Registry: com.relayto/mcp.

    Set up the RELAYTO MCP server

Agent skills, rules and plugin

Skills teach an agent the common RELAYTO jobs. In Claude Code, the plugin installs the platform MCP server and the skills together.

Agent rules for coding tools are in the same repository: AGENTS.md, .claude/CLAUDE.md, .cursor/rules/, .windsurf/rules/ and .github/copilot-instructions.md.

Terminal
npx skills add relayto/relayto-mcp
Claude Code
/plugin install relayto --marketplace relayto/relayto-mcp