1 Partner REST API
For school platforms, mobile apps, websites and developers writing their own integration.
HTTPS + JSON · OAuth 2.0 · /api/partner/v1/
Use the Partner REST API to connect your own software, or use the Model Context Protocol (MCP) server to let authorised AI assistants discover Magicao's curriculum and practice tools.
Both paths use the same published content, authorised learners and Magicao answer checking.
For school platforms, mobile apps, websites and developers writing their own integration.
HTTPS + JSON · OAuth 2.0 · /api/partner/v1/
For ChatGPT connectors, supported LLM clients and AI agents that discover callable tools.
Streamable HTTP · OAuth + PKCE · /mcp
Contact Magicao with your organisation, intended use, requested permission scopes and an exact HTTPS OAuth redirect URL. Registration and approval are handled by an authorised operator.
Use a pre-approved client ID, authorisation code with PKCE S256 and a signed-in parent or teacher's explicit consent to access learners. Confidential-client secrets must stay on your server.
Ask for your approved API origin (and MCP origin, if needed). Do not assume the example addresses below are running. Use staging first, with a test adult account and non-sensitive example data.
Use catalogue-provided IDs; never guess grades, topics or learner IDs. Practice writes and answers require the right scopes, current learner access and consent.
These are example requests for an approved, deployed integration, not a public demo API.
Capabilities are public when the partner API is enabled; learner and catalogue requests need a valid token.
API_BASE="https://YOUR-API-HOST"
curl --fail-with-body "$API_BASE/api/partner/v1/capabilities"Use GET /oauth/authorize with response_type=code, your registered client_id, exact redirect_uri, approved scope, random state and a PKCE S256 challenge. After adult approval, your server exchanges the one-time code at POST /oauth/token. Do not paste tokens or client secrets into a chat or browser page.
Discovery (when MCP OAuth is enabled): GET /.well-known/oauth-authorization-server at the API issuer. Use the actual issuer returned in the metadata, not the example domain.
# Your backend has securely obtained MAGICAO_ACCESS_TOKEN.
curl --fail-with-body \
-H "Authorization: Bearer $MAGICAO_ACCESS_TOKEN" \
"$API_BASE/api/partner/v1/curricula?country_code=GB"
curl --fail-with-body \
-H "Authorization: Bearer $MAGICAO_ACCESS_TOKEN" \
"$API_BASE/api/partner/v1/curricula/england_national/levels"
curl --fail-with-body \
-H "Authorization: Bearer $MAGICAO_ACCESS_TOKEN" \
"$API_BASE/api/partner/v1/curricula/england_national/topics?level_id=year-3&subject=Maths"Obtain learner_id from GET /learners and topic_id from the topics endpoint. The learner's curriculum and level must match their saved profile.
curl --fail-with-body -X POST \
"$API_BASE/api/partner/v1/practice-sessions" \
-H "Authorization: Bearer $MAGICAO_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(python -c 'import uuid; print(uuid.uuid4())')" \
-d '{
"learner_id":"lrn_FROM_LEARNERS",
"curriculum_id":"england_national",
"level_id":"year-3",
"subject":"Maths",
"topic_id":"top_FROM_TOPICS",
"question_count":5,
"mode":"tutor"
}'A completed response includes the operation_id, session_id and public questions. Call GET /operations/{operation_id} only while status is pending; that call finishes the worksheet and includes the questions. Follow retry_after_seconds only when it is still running. Use GET /practice-sessions/{session_id} when you already have a session id. A repeated write should reuse its original UUID idempotency key.
After an adult approves the submission, send a new UUID idempotency key and the returned session/question IDs. The first recorded answer is final; partner attempts earn no XP or gift points.
curl --fail-with-body -X POST \
"$API_BASE/api/partner/v1/practice-sessions/SESSION_ID/answers" \
-H "Authorization: Bearer $MAGICAO_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(python -c 'import uuid; print(uuid.uuid4())')" \
-d '{"question_id":"QUESTION_ID","answer":"24"}'Routes below are relative to /api/partner/v1. OAuth routes live at the API issuer root.
| Method and path | What it does | Permission |
|---|---|---|
GET /capabilities | Discover API limits and features | Public when enabled |
GET /curricula | List published curricula | catalogue:read |
GET /curricula/{id}/levels | List published years or grades | catalogue:read |
GET /curricula/{id}/topics | Find topics using level_id and optional subject | catalogue:read |
GET /learners | List learner pseudonyms authorised for this partner | learners:read |
POST /practice-sessions | Create practice and return questions when ready | practice:write |
GET /operations/{id} | Finish a pending operation and return questions when ready | practice:read |
GET /practice-sessions/{id} | Read questions without hidden answer keys | practice:read |
POST /practice-sessions/{id}/answers | Check one answer and save the first attempt | practice:write |
GET /learners/{id}/progress | Read aggregate progress | progress:read |
The MCP server is a separate service, backed by the same Partner REST API.
A Magicao MCP connector is not automatically installed or publicly listed; available client setup options depend on the host.
Transport: Streamable HTTP
MCP endpoint: https://YOUR-MCP-HOST/mcp
OAuth issuer: https://YOUR-API-HOST
Auth: OAuth authorisation code + PKCE S256, approved client and exact resource audience.
{
"mcpServers": {
"magicao": {
"type": "streamable-http",
"url": "https://YOUR-MCP-HOST/mcp"
}
}
}Client configuration formats vary; some clients ask for only a URL. Protected resource metadata is served at /.well-known/oauth-protected-resource/mcp on the MCP host.
| MCP tool name | Purpose |
|---|---|
magicao_list_curricula | Find published curricula |
magicao_list_levels | Find available years or grades |
magicao_list_topics | Find published topics |
magicao_list_learners | List authorised learner IDs |
magicao_create_practice | Prepare practice and return questions when ready |
magicao_get_operation | Finish pending practice and return questions when ready |
magicao_get_practice | Retrieve practice questions |
magicao_submit_answer | Check an approved answer |
magicao_get_progress | Read aggregate progress |
“Use Magicao to find published Year 3 Maths topics.”
“Create five multiplication questions for my authorised learner.”
“Summarise the selected learner's Magicao progress.”
The assistant can only act after a successful connection with sufficient scopes. MCP results are not an invitation to override security checks or adult approval.
Idempotency-Key; do not send writes repeatedly without checking the operation.401, 403, 409, 422, 429 and 503 as documented by the API.Keep OAuth access tokens and client secrets on your server. Do not put them in browser code, logs or LLM prompts. Follow UK/EU privacy requirements and your safeguarding agreements for children's data.
No. Partners need explicit operator approval. Catalogue access requires an authorised token; learner data also requires consent from the eligible adult.
This page documents the source implementation. Public API/MCP hostnames are only available after deployment and configuration. Ask Magicao for a confirmed staging or production URL.
These integrations use existing published and verified question sets. They do not call a paid generative model just to list topics or build partner practice sessions.
Only through a supported custom MCP/plugin connection flow after client approval and Magicao adult account linking. No child sign-in or public Magicao ChatGPT listing is implied.
Only reviewed, published topics appear. An available country or school year does not guarantee that all its curriculum topics are published.
Use the Magicao contact page and describe your platform, redirect URI, expected use and required scopes. Never send client secrets or access tokens in a support message.