{"openapi":"3.0.3","info":{"title":"Zayley","version":"1.0.0","description":"Read-only international schools guide. Facts come from school websites or licensed sources. Fees and reviews are never invented.\nsearch: Search (live) /search — Search published schools by city, country, curriculum, age and fee.\ncompare-schools: Compare schools (live) /compare — Side-by-side comparison of up to four schools.\ncompare-cities: Compare cities (live) /compare/dubai-vs-singapore — City-versus-city pages such as Dubai and Singapore.\ncompare-curricula: Compare curricula (live) /compare/ib-vs-british — Curriculum-versus-curriculum pages, including IB and British.\ntrue-cost: True cost (live) /schools/gems-world-academy-dubai — Published tuition only. Enrolment, levies, uniform, bus and trips stay blank until a source states them.\nmatch: Match (live) /match — Shortlist by age, curriculum, budget, language and city, with a reason for each match. Not a quality ranking.\ncurriculum-switcher: Curriculum continuity (live) /plan — Usual year names from ages 3 to 18 when a family moves between curricula.\nrelocation: Relocation guides (live) /relocating/london-to-dubai — City-to-city guides that name official sources and do not invent visa rules.\nfees-index: Fees index (live) /fees — Published fees in a city, lowest first. A city is listed only when at least five fees are published, and the index is published only when at least ten such cities exist.\nadmissions: Admissions calendar (live) /admissions/dubai — Dates stay blank until a source states them. These pages are not indexed.\nbest-of: Best-of lists (live) /best/dubai/ib — Lists ordered by published curriculum data, not by a quality score.\nanswers: Fee answers (live) /answers/dubai — FAQ pages on what a city costs, using only published fees.\ntracker: Admissions tracker (live) /my-schools — Save schools and your own dates in this browser. A shortlist stays in this browser. Fee and places alerts store an email and a confirm token. Mail is not sent unless ALERTS_SEND_ENABLED=1, and no paid mail service is used.\nreviews: Reviews (live) /schools/gems-world-academy-dubai — Parent reviews and questions are queued until approved. They are never paid.\ninsights: Search demand (live) /insights — Anonymous counts of searches that matched no school, by city, curriculum and fee band.\ntutor-waitlist: AI tutor plans (live) /tutors/pricing — Monthly $9.99, yearly $79, family $19.99 a month for up to 3 students, or Pro $19.99 a month for 75 questions a day. 100 extra questions cost $4.99. Each paid plan starts with a 7-day free trial. The free taster is 10 questions a day, no card. The schools guide stays free.\nai-tutor: AI tutor (live) /tutors/pricing — Plans are a free taster (10 questions a day), $9.99 a month, $79 a year, $19.99 a month for up to 3 students, and Pro at $19.99 a month. Question packs: 100 for $4.99. MCP tools tutor_plans and start_tutor_subscription. Agent checkout is POST /api/agent/checkout. Card numbers are refused.\ndataset: Bulk dataset (live) /data — Paginated school records. Each row keeps its source, licence and last_verified date.\nsystems: Schools by curriculum (live) /systems — Hubs for British, American, IB, French, German, Spanish, Dutch, Japanese, Chinese, Swiss, Italian, Korean and Canadian schools, with a country page for each.","license":{"name":"Source named on each row. UK official statistics are Open Government Licence v3.0.","url":"https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/"},"contact":{"name":"Zayley","email":"hello@zayley.com","url":"https://zayley.com/contact"}},"servers":[{"url":"https://zayley.com/"}],"paths":{"/api/stripe/portal":{"post":{"operationId":"manageBilling","summary":"Open a Stripe Customer Portal session. Requires TUTOR_BILLING_ENABLED=1 and STRIPE_SECRET_KEY.","responses":{"200":{"description":"Portal URL"},"403":{"description":"Billing is off"}}}},"/api/agent/checkout":{"post":{"operationId":"startTutorSubscription","summary":"Start an AI Tutor subscription for an agent. Body: plan (monthly|yearly|family|pro|pack_100), optional email, optional promo. FOUNDING is yearly only. Card numbers are refused. 503 when TUTOR_BILLING_ENABLED is not 1. When STRIPE_SECRET_KEY is set, creates a Stripe Checkout Session (subscription, 7-day trial, lookup keys zayley_tutor_monthly/_yearly/_family/_pro; pack_100 is a one-off payment, lookup key zayley_tutor_pack_100, metadata source=agent). Otherwise returns the live STRIPE_LINK_* URL. A shared payment token spt_ returns 402 and the checkout URL unless STRIPE_AGENTIC_ENABLED=1.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["plan"],"properties":{"plan":{"type":"string","enum":["monthly","yearly","family","pro","pack_100"]},"email":{"type":"string"},"promo":{"type":"string"},"shared_payment_token":{"type":"string"}}}}}},"responses":{"200":{"description":"checkout_url, session_id, expires_at, plan, price_usd, trial_days. Phase 1 has a payment link and a null session_id."},"400":{"description":"Invalid plan, email, promo, or raw card data."},"402":{"description":"Shared payment token received while STRIPE_AGENTIC_ENABLED is not 1. Body includes checkout_url."},"409":{"description":"Email already has an active or trialing tutor subscription."},"429":{"description":"Rate limit for this IP."},"502":{"description":"Stripe refused the request."},"503":{"description":"Billing is off, or Stripe is not configured."}}}},"/api/agent/checkout/{session_id}":{"get":{"operationId":"tutorCheckoutStatus","summary":"Checkout Session status for an agent. Requires TUTOR_BILLING_ENABLED=1 and STRIPE_SECRET_KEY.","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"status, payment_status, plan, customer_email, checkout_url, expires_at."},"404":{"description":"Unknown session."},"429":{"description":"Rate limit for this IP."},"503":{"description":"Billing is off, or Stripe is not configured."}}}},"/api/v1/tutor/plans":{"get":{"operationId":"tutorPlans","summary":"AI tutor plan names, USD prices, 7-day trial, and checkout URLs","responses":{"200":{"description":"Plans. checkout_url is null when the Stripe link is unset or is a test link in production."}}}},"/mcp":{"post":{"operationId":"mcp","summary":"MCP tools/call. Tools return published facts and aggregates of approved data only. They include search_schools, get_school, compare_schools, fee_data, reviews_for_school, tutor_plans and tutor_topic_counts.","responses":{"200":{"description":"JSON-RPC result"}}}},"/api/v1/schools":{"get":{"operationId":"searchSchools","summary":"Search published schools","parameters":[{"name":"q","in":"query","schema":{"type":"string"}},{"name":"city","in":"query","schema":{"type":"string"}},{"name":"country","in":"query","schema":{"type":"string"}},{"name":"curriculum","in":"query","schema":{"type":"string"}},{"name":"system","in":"query","schema":{"type":"string"}},{"name":"age","in":"query","schema":{"type":"string"}},{"name":"language","in":"query","schema":{"type":"string"}},{"name":"boarding","in":"query","schema":{"type":"string"}},{"name":"fee","in":"query","schema":{"type":"string"}},{"name":"fee_min","in":"query","schema":{"type":"number"}},{"name":"fee_max","in":"query","schema":{"type":"number"}},{"name":"limit","in":"query","description":"Page size. Defaults to 24. Maximum 48.","schema":{"type":"integer","default":24,"maximum":48}},{"name":"offset","in":"query","description":"Number of matches to skip. Maximum 960. Use next_cursor from the response to read past that.","schema":{"type":"integer","default":0,"maximum":960}},{"name":"cursor","in":"query","description":"Opaque next_cursor from the previous page. Continues in country, city, name, slug order and ignores offset.","schema":{"type":"string"}}],"responses":{"200":{"description":"Matching schools"}}}},"/api/v1/schools/{slug}":{"get":{"operationId":"getSchool","summary":"One school by slug","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"School"},"404":{"description":"Not found"}}}},"/api/v1/compare":{"get":{"operationId":"compareSchools","summary":"Up to four schools by stable slug","parameters":[{"name":"ids","in":"query","required":true,"description":"Comma-separated slugs. The slug is the stable id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Schools in the requested order, each with source, licence and last_verified"}}}},"/api/v1/systems":{"get":{"operationId":"listSystems","summary":"Curriculum systems and how many published schools match each one","responses":{"200":{"description":"British, American, IB, French, German, Spanish, Dutch, Japanese, Chinese, Swiss, Italian, Korean and Canadian"}}}},"/api/v1/dataset":{"get":{"operationId":"bulkDataset","summary":"Paginated school dataset. Keep each record's source, licence and last_verified.","parameters":[{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer"}}],"responses":{"200":{"description":"A page of schools and next_cursor"}}}},"/api/v1/match":{"get":{"operationId":"matchSchools","summary":"Shortlist with reasons. Not a quality ranking.","parameters":[{"name":"city","in":"query","schema":{"type":"string"}},{"name":"country","in":"query","schema":{"type":"string"}},{"name":"curriculum","in":"query","schema":{"type":"string"}},{"name":"age","in":"query","schema":{"type":"string"}},{"name":"language","in":"query","schema":{"type":"string"}},{"name":"budget","in":"query","schema":{"type":"number"}}],"responses":{"200":{"description":"Schools and why each one matched"}}}},"/api/v1/continuity":{"get":{"operationId":"continuityPlan","summary":"Usual year name for an age and curriculum","parameters":[{"name":"age","in":"query","schema":{"type":"string"}},{"name":"from","in":"query","schema":{"type":"string"}},{"name":"fromCity","in":"query","schema":{"type":"string"}},{"name":"toCity","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Year names and sources"}}}},"/api/v1/insights":{"get":{"operationId":"searchDemand","summary":"Anonymous unmet-search counts","responses":{"200":{"description":"Cities, curricula and fee bands"}}}},"/api/v1/relocation":{"get":{"operationId":"relocationGuides","summary":"Relocation guides for a city","parameters":[{"name":"city","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Guide links"}}}},"/api/v1/alerts":{"post":{"operationId":"saveAlert","summary":"Store a fee or places alert and a confirm token. Email is not sent unless ALERTS_SEND_ENABLED=1, and no mail provider is called.","responses":{"200":{"description":"Stored, unconfirmed"},"403":{"description":"Missing email or school"}}}},"/for-ai-agents":{"get":{"operationId":"agentTerms","summary":"Usage terms and attribution requirements for automated use.","responses":{"200":{"description":"HTML terms"}}}},"/api/v1/questions":{"post":{"operationId":"askSchoolQuestion","summary":"Queue a parent question. Never paid.","responses":{"200":{"description":"Queued"}}}},"/api/v1/schools/{slug}/cost":{"get":{"operationId":"trueCost","summary":"Published tuition. Other costs are null.","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Cost lines"}}}},"/api/v1/curriculum":{"get":{"operationId":"curriculumContinuity","summary":"Year-group names from ages 3 to 18","parameters":[{"name":"age","in":"query","schema":{"type":"integer"}}],"responses":{"200":{"description":"Rows and the public sources they follow"}}}}}}