Skip to content

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.

https://api-prod.mileslearning.net/graphql

The 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.

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>

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/upload
  • file: the file itself, as a multipart part (up to 50 MB)
  • uploadType: what the file is for. CONTENTIMAGE for files used inside learning content, AVATAR for profile pictures, or another of the schema’s UploadType values.
  • aiGenerated: optional. Pass true when the file is AI-generated content. It can also be changed later with the updateFileReferences mutation.

The response is the created FileReference as JSON. Reference its id wherever mutations accept a file.

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.

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 @deprecated marker 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