API reference

The endpoints, their parameters, and the exact shape of the responses.

All requests go to https://api.canagentsbuyfromyou.com. Bodies are JSON, and so are responses — with one exception, the HTML report.

Authentication

By API key, in the Authorization header, with the Bearer prefix.

http
Authorization: Bearer ar_live_xxxxxxxxxxxx

The header is optional when creating an audit: without it, the audit runs anonymously, with tighter limits. But if it's present and invalid, the request fails outright — never a silent fallback to anonymous. A revoked key should be visible, not guessed at.

POST /audits

Creates an audit and queues it. Returns 201 without waiting for it to run.

FieldTypeDefaultPurpose
businessstring— (required)URL of the store to audit. Passed to the engine verbatim.
optionsobject{}Execution parameters — detailed below.
metadataobjectnullCI provenance. Never read by the engine, only stored alongside the audit.

options

FieldTypeDefaultPurpose
agent_simulationbooleanfalseEnables the language-model agent simulation. Consumes your monthly quota.
general_scanbooleanfalseRuns the general agent-readiness scan (17 signals, 4 categories) alongside the two commerce checks, and populates general_readiness in the result. Opt-in even when you're eligible — see below, it isn't guaranteed just because you ask.
sample_sizeinteger12Number of products sampled for catalog quality.
countrystring"FR"Market the catalog is queried under.
language"fr" | "en""en"Language of the recommendations and the HTML report.

general_scan: who actually gets it

Asking for general_scan: true doesn't guarantee it runs. The command line and the playground set it to true for you by default — that's a client-side default, not the API's; a direct call must opt in explicitly. Once requested, eligibility depends on how you're calling:

CallerAllowanceIf exceeded or not eligible
Anonymous (no API key)3 requests/hour per IP addressgeneral_scan is silently reset to false — the audit still runs, commerce-only
AuthenticatedCurrently limited to accounts in an internal beta (not yet self-serve), up to 20 requests/hourSame silent fallback — an account outside the beta never gets it, whatever the rate
Never a 429 for this one
Unlike the account-wide rate limit (60 requests/hour, which does return 429), exceeding — or simply not qualifying for — the general_scan allowance never fails the request. The audit is created and runs, just without the general_readiness layer. Read back options.general_scan on the finished job to see what actually ran, not what you asked for.
An unknown field fails loudly
Any unknown field is rejected with a 422, at the root level as well as inside options. This is deliberate: a language placed next to options instead of inside it used to be silently ignored, producing a report in the wrong language with nothing to signal it. A malformed body must fail loudly.

metadata

Three optional string fields: commit_sha, branch, ci_run_url. They tie an audit to whatever triggered it and show up as-is in the dashboard history. The command line fills them in automatically.

json
{
  "business": "https://my-store.com",
  "options": { "agent_simulation": true, "language": "en" },
  "metadata": {
    "commit_sha": "a1b2c3d",
    "branch": "main",
    "ci_run_url": "https://github.com/org/repo/actions/runs/42"
  }
}

GET /audits/{id}

The audit's state and, once finished, its full result.

statusMeaning
pendingQueued, not picked up yet.
runningCurrently executing.
doneFinished. result is populated.
failedThe audit couldn't complete. error describes why.
json
{
  "id": "b3f1e2a0-...",
  "status": "done",
  "result": {
    "business": "https://my-store.com",
    "overall_score": 92,
    "checks": [
      { "check_id": "ucp_discovery", "status": "pass", "score": 100, "recommendation": "..." },
      { "check_id": "catalog_quality", "status": "pass", "score": 95, "recommendation": "..." }
    ],
    "general_readiness": {
      "tier": "agent_ready",
      "n_signals": 6,
      "n_categories": 3,
      "evidence": {
        "continuous_score": 61.4,
        "signals_present": { "llms_txt": 53.3, "content_signals_policy": 5.2, "api_catalog": 3.5 },
        "signals": {
          "llms_txt": { "general_category": "discoverability", "state": "present" },
          "oauth_authorization_server": { "general_category": "api_auth_mcp", "state": "absent" }
        }
      }
    }
  },
  "agent_brief": "# Audit of https://my-store.com\n...",
  "metadata": { "commit_sha": "a1b2c3d", "branch": "main", "ci_run_url": "..." }
}

Each check carries its own status, score and recommendation — actionable text, written to be read by whoever will fix it. The agent_brief field, present only when something still needs fixing, is that same material reshaped into a Markdown instruction you can paste straight into a coding assistant.

general_readiness is null unless general_scan actually ran (see the options table above — it silently degrades, so don't assume it's there just because you asked). evidence.signals has one entry per signal measured — 17 in total, trimmed here to two for readability, each carrying at least general_category and state. Its 4 categories:

CategoryCovers
discoverabilityllms.txt, an agent/skills index, A2A and MCP server cards
content_accessibilityMarkdown negotiation, WebMCP
bot_access_controlContent-Signal policy, Web Bot Auth
api_auth_mcpOAuth discovery, the API catalogue (RFC 9727), auth.md, the Link header, DNS AID

GET /audits/{id}/report

The full HTML report, self-contained and shareable. Returns 404 until the audit reaches done.

Read access: anonymous audits and accounts

Account audits are protected
Anonymous audits remain readable without authentication. Account audits require an API key or an authorized session. To send a report to someone else, create a private, read-only, revocable share link in the Agency workspace; revocation blocks later requests.

Generated reports remain available while the member or share link is authorized, even if the site is archived or the subscription ends. To show the Agent Readiness tier publicly, the badge exposes it without the report.

MCP server

The MCP server exposes the four pillars separately: Agent Readiness, Agent Commerce, Agent Performance and Web Findability. The first two create an audit job; the latter two create their specialized run. Every operation is asynchronous and launch tools consume the corresponding quota.

text
https://api.canagentsbuyfromyou.com/mcp/
Streamable HTTP MCP endpoint. Authentication: Authorization: Bearer ar_live_…

Tool names and schemas are negotiated during the MCP handshake. The discovery card is published at /.well-known/mcp-server-card; never pass an API key as a tool argument.

To connect an MCP-compatible AI agent, add this server to the agent's MCP configuration with the endpoint above and a Bearer API key. The agent automatically negotiates the connection, discovers the available tools and chooses the right tool for the user's request. Keep the API key in the agent's secure configuration, never in a prompt or tool arguments. The eight available tools are:

ToolUsage
run_agent_readiness_scanLaunch the general Agent Readiness scan
run_agent_commerce_auditLaunch the Agent Commerce audit
run_agent_performance_auditLaunch Agent Performance, after auditing the domain
run_web_findability_auditLaunch Web Findability, after auditing the domain
get_agent_audit_resultRead an audit result by ID
get_agent_performance_resultRead the latest Agent Performance result for a domain
get_web_findability_resultRead the latest Web Findability result for a domain
get_account_usageRead the authenticated account plan and quotas

Connect with Codex

Set your key in the terminal environment, then add the server to ~/.codex/config.toml. Codex and its IDE extension share the same configuration:

bash
export CABFY_API_KEY="ar_live_…"
codex mcp list
Prepare the key and check MCP servers
text
[mcp_servers.cabfy]
url = "https://api.canagentsbuyfromyou.com/mcp/"
bearer_token_env_var = "CABFY_API_KEY"
~/.codex/config.toml

Connect with Claude Code

Set CABFY_API_KEY in your environment, then add this server to the .mcp.json file at the project root. The variable is resolved when the connection starts, so the key must not be committed:

bash
export CABFY_API_KEY="ar_live_…"
claude mcp list
Prepare the key and check MCP servers
json
{
  "mcpServers": {
    "cabfy": {
      "type": "http",
      "url": "https://api.canagentsbuyfromyou.com/mcp/",
      "headers": {
        "Authorization": "Bearer ${CABFY_API_KEY}"
      }
    }
  }
}
.mcp.json

In Claude Code, then use /mcp to verify the connection. For a personal configuration available across projects, add the server with claude mcp add --transport http --scope user and keep the key in your secret manager.

Launch tools are asynchronous. For Agent Readiness and Agent Commerce, pass only business, for example:

json
{
  "business": "https://my-store.com"
}
run_agent_readiness_scan

The server first returns an ID with pending status. Then call get_agent_audit_result with that ID until the status is done. Agent Performance and Web Findability require an existing Agent Readiness or Agent Commerce audit for the domain. Quotas and the active-site limit are enforced server-side, so a new URL may be rejected when the account has reached its site limit.

Account endpoints

The /account/* endpoints (profile, usage, keys, badges) exist. Profile and usage also accept an API key; account-management operations remain restricted to a dashboard session.

Machine-readable spec

A curated OpenAPI 3.1 description of these public endpoints is served at https://canagentsbuyfromyou.com/openapi.json, and referenced from https://canagentsbuyfromyou.com/.well-known/api-catalog as an RFC 9727 link set. It covers only what this page documents — audit creation, the two read endpoints, the health check and the public stats — and never the application's internal routes.

bash
curl -sS https://canagentsbuyfromyou.com/openapi.json | jq '.paths | keys'
The paths the spec describes, verbatim.

The authentication scheme itself — the Bearer key, the four error codes reachable with one, and pointers back to both resources above — is described at https://canagentsbuyfromyou.com/auth.md, in the plain-Markdown format an agent can read directly.