Rapid TestAPI catalog (JSON)

API documentation

Use MCP to connect an AI client to your Rapid Test account. The web API also provides public health and authorization discovery endpoints.

Question content for LLM clients

Read get_authoring_guide before creating questions and use validate_question for a dry run. Both accept existing banks:read or banks:write. Exact format and JSON examples.

Use RichDocument v1 JSON, not Markdown/HTML. Tables use table blocks with arrays of inline nodes per cell. Formulas use raw LaTeX in math nodes. Code blocks are literal source, not tables or diagrams.

For images, create an empty bank, upload actual PNG/JPEG/WebP bytes with upload_image as standard base64 without a data URI prefix (maximum 1 MiB decoded), then put the returned id in image.asset_id. Do not invent image bytes or substitute ASCII diagrams. Validation reports structural errors and layout warnings; it does not verify answer correctness, formula rendering or asset ownership. Existing bank writes still enforce permissions and asset ownership.

MCP API

MCP Server Card — public discovery metadata using the requested SEP-1649 draft format. Supports tools; resources and prompts are not available. Discovery does not replace OAuth or MCP initialization.

Endpoint: https://mcp.rapidtest.uz/mcp

OpenAPI transport specification · OAuth resource metadata

  1. Configure ChatGPT or Claude with the endpoint above and OAuth authentication. For Claude, select its published identity; no client secret is required. Only these providers' exact metadata and callback URLs are accepted; dynamic registration is not supported.
  2. Discover the authorization server, use S256 PKCE, and sign in to Rapid Test. The user approves the requested scopes.
  3. Initialize the MCP connection and call tools/list for current tools and input schemas. Use tools/call to execute an authorized operation.

The transport is stateless Streamable HTTP with JSON responses. Send both application/json and text/event-stream in Accept, and the negotiated MCP protocol version after initialization. An MCP SDK handles these details.

Permissions

banks:read / banks:write
Read your question banks and answer keys; create, edit and archive banks and questions, and manage temporary previews.
assets:read / assets:write
Read and upload question images.
exams:read / exams:write
Read quizzes and get their links and QR images; create and edit drafts, publish and close quizzes. Source-bank operations also require banks:read.
groups:read / groups:write
Read your groups and members; create or rename groups and assign completed quiz participants.
groups:notify
Queue a quiz link for delivery to your group through Telegram. Preview recipients first and obtain user intent to send. Members must start the bot; delivery status is asynchronous.
results:read
Read results and statistics for your own quizzes and generate private reports.

Author operations require an active Free/RT2 plan and verified phone. Access remains restricted to the authorized owner and tenant. Read current revisions before editing; reuse an idempotency key only for the same request. Temporary preview links include answers: share them only as intended. Private report downloads require the owner's web session.

MCP requests are limited to 7 MiB. Tool arguments may contain at most 200,000 object members and array elements combined. Larger structured question batches must be split into smaller writes using current revisions; the existing 100-question and 64 KiB per-question limits still apply.

API and MCP body reads allow 15 seconds without new bytes and 120 seconds total. The handler returns HTTP 408 for an incomplete body (MCP: REQUEST_BODY_TIMEOUT); the HTTP runtime may instead close the incomplete connection before delivering that response. A progressing upload can last longer than 15 seconds. No tool or content write runs before its body is complete. Retry safely with the same write idempotency key; OAuth reconnection is not required.

Each authenticated account shares 240 MCP HTTP requests and 120 tool executions per fixed UTC minute across its LLM connections. HTTP 429 includes Retry-After; tool errors use REQUEST_RATE_LIMIT with details.retry_after. Wait before retrying; OAuth reconnection does not reset the budget. The authenticated account/tool limits do not pool users by IP and do not apply to student quiz pages. Fixed-window boundary bursts remain possible.

Syntactically valid credentials also pass pre-auth edge admission (approximately 600 lookups/credential and 6000/network per 60 seconds, separately per Cloudflare location). This availability guard does not authenticate users or replace D1 revocation checks. Edge 429: Retry-After 60; missing/unavailable guard 503: Retry-After 60. Shared-network abuse may affect others; no strict global or billing guarantee. Missing or malformed credentials keep HTTP 401 without an authentication database query. These checks do not cache authentication results.

Access tokens are valid only for this MCP resource. Never send a Telegram bot token as an API credential. Manage or revoke grants in MCP connections. Existing grants do not gain new scopes automatically.

Quiz lifecycle (web and MCP): edit or delete only when no attempt has started, including unfinished attempts. Editing an unused published quiz returns it to draft; publish again at the same link. Archive closes new admission but preserves attempts, results and student result links. Restore returns to the active list without reopening admission. MCP tools: delete_exam, archive_exam, restore_exam with exams:write and expected_revision; update_exam also needs banks:read. Web uses POST /api/v1/exams/{operation}. list_exams defaults to archived:false; use archived:true for the archive. Deleted quizzes cannot be restored; creation history and quota remain.

Result lists return attempt_numbers: only attempt numbers with existing assessments for the selected quiz and audience, independent of pagination. In-progress attempts without results are excluded.

Next attempt: POST /api/v1/exams/{id}/next-attempt with expected_revision increases the limit by one (up to 5) for all participants and reopens a closed quiz at its existing link. Owner session, CSRF, author plan and verified phone are required. Published questions, prior answers and results remain unchanged. This is a first-party web feature, not an MCP tool.

Group result publication: the signed-in owner selects a group, quiz and attempt number. POST /api/v1/assessment/enable_group_release enables publication of ready and future graded results; POST /api/v1/assessment/group_release_status returns progress. Omit group_id for all participants, or pass ungrouped:true for participants in none of the quiz owner’s groups. Do not combine these selectors. Both require session, CSRF and owner authorization. Manual answers stay private until reviewed. This first-party feature is not an MCP tool.

find_question_bank and list_exams support creation-date filters in web and MCP. Optional created_from/created_to are inclusive YYYY-MM-DD dates in Asia/Tashkent (UTC+05:00); a single day uses the same date for both. Filtering precedes pagination. sort accepts created_desc or created_asc; ties use id. Results expose created_at (Unix milliseconds) and has_more. Question banks use the immutable first revision timestamp; unavailable legacy dates are null, sorted last and excluded by date filters. Existing creation timestamps are never replaced by edit/publication dates.

Live monitoring: GET /api/v1/exams/{examId}/live returns only owner-scoped aggregate visitors, starts and completions. Poll every 2 seconds without overlapping requests; pause background/offline tabs. POST /api/v1/exam-links/{code}/visit records the signed-in participant once per quiz, with CSRF. Anonymous visits are excluded. Retakes do not duplicate people; completed-attempt totals are separate. D1 completion projections may briefly lag. These are first-party web endpoints, not MCP tools.

Relay quizzes

Relay entry has two link options for the same quiz: separate team links or one shared signed link. Owners receive shared_url; participants choose a team after signing in and explicitly submit {group: 1} to join. Shared-link state, actions, leave and assets resolve only that account’s active membership. Existing team links still work and cannot override their assigned team. Switching teams remains limited to before start.

Owners can edit team display names in any relay state through POST /api/v1/relays/{id}/group-names, with names and last loaded expected_names. A default numbered name appears as null in the board. Names are limited to 60 characters and must be unique. This changes labels on both invitation forms and scoreboards, without changing questions, group identities, scores, time or quota. Shared link signatures use a separate HMAC domain with the existing server signing key; rotating it invalidates shared links, and owners can retrieve newly signed ones. Group-specific links are unaffected.

First-party web feature: /api/v1/relays creates and lists owner-scoped relay quizzes; /api/v1/relays/{id} returns the live scoreboard and team links. Control starts all teams together or permanently stops the relay. Two to five teams share one immutable set of 1 to 300 automatically graded questions; manual questions are excluded. At least one participant per team must join before the teacher starts.

Before participants join, owners can edit the relay name, question bank, question count and team count through /api/v1/relays/{id}/edit. Existing team links are preserved for retained teams. Removed team links no longer work. Editing consumes no additional quota and is blocked after admission or start. Send the last loaded configuration as expected to prevent overwriting changes from another window.

After a quiz or relay starts, its owner can change only the display name using /api/v1/exams/{id}/name or /api/v1/relays/{id}/name. These endpoints reject additional fields and stale expected values. They preserve questions, timers, membership, links, publication status and results; no new attempt or quota charge is created.

Participants use private /r/{code} links and authenticated /api/v1/relay-links/{code}/join, state and action endpoints. Before start, a participant may POST an empty body to /api/v1/relay-links/{code}/leave, then explicitly join another team through its link. After start, switching is blocked. Leaving keeps the original quota reservation; rejoining does not charge again. Each account belongs to one team; up to 100 participants total. New questions arrive one at a time. Initial distribution is unique within a team; remaining unresolved questions can be assigned concurrently. Only the first fully correct answer counts. Replays do not duplicate scores. Team standings show cumulative counts and top-three names, never answer keys or other participant IDs.

Poll every 2 seconds without overlapping requests. Fullscreen needs a user click and a supporting browser/device. Leaving for at least 2 seconds skips the current unresolved question; browser event delivery and network availability limit detection. One relay consumes one quiz and each first participant join consumes one owner attempt quota. Relay scores remain in the relay monitor, separate from individual quiz results. These endpoints are not MCP tools. See OpenAPI for exact request/response contracts.

Web API

Base path: https://rapidtest.uz/api/

OpenAPI public discovery specification

This specification covers public discovery endpoints. The first-party application also uses authenticated session-based endpoints, which are not a general-purpose bearer-token REST API. Use MCP for automated content, group and quiz management. Protected web operations continue to require a valid session and applicable CSRF, ownership and plan checks.

The first-party administrator user directory uses GET /api/v1/admin/users and /api/v1/admin/users/{userId}. It requires an administrator session in the current tenant; it is unavailable through MCP. Responses include account/contact metadata and activity counts, never credentials. The list also returns tenant-wide summary counts (total, active_plans, mcp_active, bot_enabled), independent of search and pagination.

POST /api/v1/referrals creates or reads a personal referral link (session and CSRF). Only a new verified Telegram registration earns each party 30 days of RT2. Further referrals extend the bonus; existing subscriptions and monthly usage remain intact. Plan responses expose bonus_expires_at; effective RT2 expires automatically in web, MCP and quota enforcement.

GET /api/v1/my-results/trend returns only the signed-in user’s latest 500 published result summaries. The limited flag indicates truncation; results are ordered by attempt start time.

Estafeta egasining monitoring javobida barcha ishtirokchilar reytingi ham beriladi. Yangi yechimlar savol, ishtirokchi va vaqt bilan serverda saqlanadi; eski javoblarning muallifi taxmin qilinmaydi.

Quiz lists include per-attempt completed submission counts (attempt_counts). Only submitted attempts count; participant totals remain distinct people. Counts may briefly lag projection updates.