Developer Portal · Ask API

Ask API and sandbox

Conversational AI over the RRM Research Library. Answers are grounded in the RRM Research Library and return citations. A no-auth sandbox returns a canned response so you can test your client first.

Endpoint

POST https://rrmacademy.org/api/ask

The base URL is https://rrmacademy.org, not the MCP host. Send a JSON body. A GET to the same path returns machine-readable capability metadata, unauthenticated and cacheable for an hour.

Request body

FieldTypeRequiredNotes
message string Yes min 2; max 500 characters; The question to ask the RRM Library AI

The POST needs a signed-in session cookie (from /api/auth/login); without one it answers 401. The sandbox needs none.

curl -X POST https://rrmacademy.org/api/ask \
  -H "Cookie: session=YOUR_SESSION_COOKIE" \
  -H "Content-Type: application/json" \
  -d '{ "message": "What is NaProTechnology?" }'

Response body

FieldTypeRequiredNotes
answer string Yes AI-generated answer scoped to RRM Library content
citations array Yes Library pages the answer is grounded in. Each item has a url and an optional title.
fallback boolean No true when no relevant library content was found and a fallback message is returned

Streaming (SSE)

Set Accept: text/event-stream to receive a Server-Sent Events stream. The stream carries two events: data: <AskResponse JSON>, then data: [DONE]. Send it on a POST that carries your signed-in session cookie (from /api/auth/login); without one the endpoint answers 401. The sandbox endpoint offers the same variant through the same header.

curl -N -X POST https://rrmacademy.org/api/ask \
  -H "Cookie: session=YOUR_SESSION_COOKIE" \
  -H "Content-Type: application/json" \
  -H "Accept: text/event-stream" \
  -d '{ "message": "What is NaProTechnology?" }'

Try it without a key

No-auth test surface. POST any (or no) body to receive a canned, deterministic AskResponse-shaped reply with no LLM invocation, no rate limit, and no data mutation. Use it to validate client parsing before integrating with the authenticated /api/ask endpoint. Set Accept: text/event-stream for the SSE variant.

  • Endpoint: POST https://rrmacademy.org/api/ask/sandbox
  • Authentication: none. No API key.
  • Safe to repeat: yes. Test only.
  • Marker: every sandbox response carries an X-Sandbox: true header.
curl -X POST https://rrmacademy.org/api/ask/sandbox -H 'Content-Type: application/json' -d '{"message":"What is RRM?"}'

The sandbox is also described under info.x-sandbox in the OpenAPI spec. Host: rrmacademy.org.

Errors

Errors use one envelope on every endpoint:

FieldRequiredNotes
error Yes Machine-readable error code
message No Human-readable error detail
  • 401: Missing or invalid session cookie. Sign in at /api/auth/login and send the session cookie, or use the sandbox.
  • 429: Rate limit exceeded. Free accounts: 3/day. Members and staff: 20/day. Counters reset at midnight UTC.
  • 503: Upstream service unavailable

Rate limits

Rate limit exceeded. Free accounts: 3/day. Members and staff: 20/day. Counters reset at midnight UTC.

Authenticated API responses carry standard rate-limit headers so your client can pace itself without guessing:

  • RateLimit-Limit: requests allowed in the current window.
  • RateLimit-Remaining: requests left in the current window.
  • RateLimit-Reset: seconds until the window resets.

A 429 response means you have hit the limit. Back off and retry with exponential jitter. The no-auth sandbox is not rate limited.

Related developer pages