Ringostat
Log in

Authorization: which API to use

~4 min · Two transports — /rpc (API key) and /mcp (MCP session).

Ringostat offers two ways to call the API. The rule of thumb is simple:

  1. 1
    A one-off request from your backend → /rpc with the X-API-Key header. No session, one POST.
  2. 2
    An AI agent / MCP client → /mcp with the same key in the Authorization: Bearer header (or through OAuth): initialize → Mcp-Session-Id → tools/call. Methods are discovered with tools/list.
# /rpc — a single request
POST https://apiagent.ringostat.com/rpc
X-API-Key: <YOUR_API_KEY>
Content-Type: application/json

{ "jsonrpc":"2.0", "method":"getCampaignStatus",
  "params":{ "projectID":217, "campaignID":799 }, "id":1 }
# /mcp — handshake first, then methods
POST https://apiagent.ringostat.com/mcp
Authorization: Bearer <YOUR_API_KEY>
Content-Type: application/json
Accept: application/json, text/event-stream

{ "jsonrpc":"2.0","id":1,"method":"initialize",
  "params":{ "protocolVersion":"2025-06-18","capabilities":{},
    "clientInfo":{"name":"my-app","version":"1.0.0"} } }
# → read the Mcp-Session-Id header in the response
# 2) the same headers + Mcp-Session-Id:
#    { "jsonrpc":"2.0","method":"notifications/initialized" } → 202
# 3) tools/list and tools/call — with Mcp-Session-Id on every request

A response comes as application/json or as text/event-stream (data: lines; take the object with your request's id), so check the response Content-Type. With no Mcp-Session-Id or an unknown one the server answers 404: run initialize again.

Create the API key in the dashboard: project → Settings → API Keys (project admins only). One key works on both transports: X-API-Key on /rpc; Authorization: Bearer (or X-API-Key) on /mcp. /rpc does not accept Authorization: Bearer. A key opens only its own project. The full list of methods is in the “API” section.
AI clients with OAuth (Claude, ChatGPT, Cursor and others) need no key: add the server URL https://apiagent.ringostat.com/mcp and sign in to Ringostat when the client asks. Such access covers every project of the user who approved it.