MILES API
This is the API section of the MILES documentation, written for developers who want to interact with MILES programmatically — or build systems that do. MILES provides a GraphQL API, the same one our own applications are built on. Here you’ll find the essentials to get started and how to stay informed.
Looking for help with the MILES app itself? The User Manual is the right place.
Endpoint
Section titled “Endpoint”https://api-prod.mileslearning.net/graphqlThe API speaks standard GraphQL over HTTP POST.
Introspection is enabled, so
the full, current schema is always available. You can point a common GraphQL client
like Altair at the endpoint to explore it
interactively.
Authentication
Section titled “Authentication”To run most operations against the endpoint, you need to authenticate
first. Sign in with the signinUser mutation (email and password) or with
signinUserWithAPIKey (API keys are managed inside the MILES app). Both return
a token that you pass along on subsequent requests:
Authorization: Bearer <token>Uploading files
Section titled “Uploading files”File uploads happen outside of GraphQL. Send them to the sibling endpoint as
multipart/form-data, authenticated with the same bearer token:
POST https://api-prod.mileslearning.net/uploadfile: the file itself, as a multipart part (up to 50 MB)uploadType: what the file is for.CONTENTIMAGEfor files used inside learning content,AVATARfor profile pictures, or another of the schema’sUploadTypevalues.aiGenerated: optional. Passtruewhen the file is AI-generated content. It can also be changed later with theupdateFileReferencesmutation.
The response is the created FileReference as JSON. Reference its id
wherever mutations accept a file.
Staying informed with GraphQL tooling
Section titled “Staying informed with GraphQL tooling”One of the nice things about GraphQL: since the schema is the source of
truth and introspection is open, everything on these pages is also available
to your tooling. Tools like
GraphQL Inspector
(graphql-inspector validate),
GraphQL Code Generator, or your IDE’s
GraphQL plugin can validate your queries against the live schema and point out deprecations automatically — during development, in CI or automated tests.
For changes the schema cannot express, there’s the API Changelog with an RSS feed.
Deprecation policy
Section titled “Deprecation policy”We don’t want to break your integration: existing operations and fields are never changed in place. When something evolves, we add a new version and deprecate the old one — only deprecated things are ever removed.
- The
@deprecatedmarker in the schema is the authoritative announcement. The Deprecations page and the API Changelog show the same information in a more readable form. - Not everything is a schema change: new requirements like changes to authentication, or network-level restrictions are announced in the API Changelog — for those, the changelog is the authoritative source.
- Between deprecation and removal there is time to migrate — more if the change means real work on your side, less if it’s trivial. We recommend migrating promptly; if you need longer, let us know.
- New operations, fields, optional arguments, and enum values ship without prior notice — in GraphQL, additions don’t break existing queries.
Want to build with MILES?
Connect your own systems, automate your workflows, and get learning data exactly where you need it — the MILES API gives you the same features that power our own applications.
We're happy to discuss your use case and support your integration along the way.
Get in touch