Skip to content
Esc
↑↓navigate↵open⌘Jpreview
On this page

API and machine-readable files

Where to find the varsafe OpenAPI specification, the REST API reference, llms.txt and the MCP manifest.

CLI v7.9.3

varsafe publishes its public surface in formats a program can read directly. Point a client generator, an HTTP client or an AI agent at these files instead of scraping the docs.

REST API

What Where
API base URL https://api.varsafe.dev
OpenAPI 3.1 specification varsafe.dev/openapi.json, also served by the API at api.varsafe.dev/openapi.json
Rendered API reference, one page per operation, with curl, JavaScript and Python samples docs.varsafe.dev/api
curl -sH "Authorization: Bearer $VARSAFE_API_TOKEN" https://api.varsafe.dev/me/verify

Authentication. Send Authorization: Bearer <token>, usually an API token. Routes do not all accept the same credentials: each operation’s security field says which it takes. Operations a CLI login may call list the scopes it needs under x-varsafe-cli-scopes. Team administration (members, tokens, audit exports) needs a signed-in dashboard session and does not accept a token.

Responses. Every operation’s success and error bodies are described by JSON Schemas under components.schemas, so a generated client gets typed results. Objects list the properties sent today; ignore any you do not recognise, because a later release may add one.

Errors. Errors return { "statusCode", "code", "message" }, plus field when one input is at fault. Branch on code; message is for people and may change.

{ "statusCode": 401, "code": "HTTP_ERROR", "message": "Unauthorized" }

Rate limits. 10 requests per second, 50 per 10 seconds and 200 per minute without a credential; five times that with one. A throttled request gets 429.

MCP and OAuth

What Where
MCP endpoint (streamable HTTP) https://api.varsafe.dev/mcp
MCP manifest: where the endpoint lives, how to authorize, the scopes and the tools varsafe.dev/.well-known/mcp.json
OAuth protected-resource metadata (RFC 9728) api.varsafe.dev/.well-known/oauth-protected-resource
OAuth authorization-server metadata (RFC 8414) api.varsafe.dev/.well-known/oauth-authorization-server

An MCP client needs no configuration beyond the endpoint URL. An unauthenticated request gets 401 with a WWW-Authenticate header pointing at the protected-resource metadata, and the client discovers the rest from there. The endpoint’s authentication errors use the OAuth shape { "statusCode", "error", "error_description" } rather than the API’s. To connect an agent, see the MCP guide.

Files for AI agents

What Where
What varsafe is, when to use it, and links to every interface on this page varsafe.dev/llms.txt
An index of every documentation page, including the API reference docs.varsafe.dev/llms.txt
The full documentation as a single Markdown file docs.varsafe.dev/llms-full.txt
Any documentation page, as Markdown Its URL with .md appended, for example docs.varsafe.dev/getting-started.md