API Reference

Keypost exposes two APIs: the MCP proxy for tool calls, and webhooks for events.

Base URLs

ServiceURL
MCP Proxyhttps://{slug}.keypost.ai/mcp
Control Planehttps://keypost.ai/api
Statushttps://status.keypost.ai

Authentication

Keypost URLs use unguessable slugs (10-12 characters) for basic security. For additional authentication, configure an API key in your Keypost settings.

POST https://abc123xyz.keypost.ai/mcp
Authorization: Bearer your-api-key
Content-Type: application/json

MCP Protocol

Keypost implements the full Model Context Protocol specification. All standard methods are supported.

Request format

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "tool_name",
    "arguments": { ... }
  }
}

Success response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": { ... }
}

Error response

{
  "jsonrpc": "2.0",
  "id": 1,
  "error": {
    "code": -32001,
    "message": "Request denied by policy: ..."
  }
}

Error codes

CodeMeaning
-32001Policy denied
-32002Keypost not found
-32003Keypost disabled
-32004Upstream error
-32005Circuit breaker open
-32006Approval required

Rate limiting headers

When throttle policies are active, responses include rate limit headers:

X-RateLimit-Limit: 100
X-RateLimit-Remaining: 42
X-RateLimit-Reset: 1640995200

Status endpoints

Health and metrics are available at status.keypost.ai:

  • GET /health - Health check
  • GET /metrics - Prometheus metrics