Introduction
NextSchool Data API — GraphQL API for accessing school data
NextSchool Data API
The NextSchool Data API provides a GraphQL interface for accessing school data including students, teachers, and school information.
Base URL
| Environment | URL |
|---|---|
| Production | https://data.nextschool.io/ |
| Sandbox | https://sandbox.nextschool.io/ |
All API requests are sent as POST requests to the base URL. Use the sandbox environment for testing and development — it connects to a separate database so you can experiment without affecting production data.
Key Features
- GraphQL API — Request exactly the fields you need
- JWT Authentication — Secure access with short-lived access tokens and refresh tokens
- Multi-tenant — Data automatically scoped to your school
- Real-time Data — Access up-to-date student and staff records
Authentication
The API uses JWT-based authentication. You'll need to:
- Login with your credentials to get an access token and refresh token
- Include the access token in the
Authorizationheader of every request - Refresh the token when it expires (every 15 minutes)
Quick Example
curl -X POST https://data.nextschool.io/ \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-d '{"query": "{ students(limit: 5) { id fullName classroomName } }"}'Available Resources
| Resource | Description |
|---|---|
| Students | Student records with profiles, status, and classroom info |
| Teachers | Staff and teacher records with profiles and assignments |