API

The Instruqt GraphQL API can be used to automate actions on the Instruqt platform, some examples:

  • Create track invites.

  • Adding members to a team.

API Endpoint

The API endpoint for Instruqt is: https://play.instruqt.com/graphql.

GraphQL has a single endpoint, so no matter what operation you perform, this endpoint remains the same.

API Authorization

To use the API you need to create an API token for your organization:

  1. Go to your team page on play.instruqt.com.

  2. Select the API tab.

  3. Generate an API token.

Pass the API token by adding the Authorization: Bearer <token> HTTP header, where you replace <token> with your team's API token.

Forming GraphQL Calls

All calls to the API are made using HTTP POST requests. The actual query/mutation is specified as a JSON-encoded body. As an example, here is a query that lists the id and slug of all public tracks:

cat >query.json <<EOF
{
"query": "query {
tracks {
id
slug
}
}"
}
EOF
​
curl -H "Authorization: Bearer <token>" -X POST -d @query.json https://play.instruqt.com/graphql

API Reference

The complete API is documented at: https://api-docs.instruqt.com.

Explore the API interactively

To explore the API interactively, we recommend using the GraphQL Playground. The Playground is GraphQL IDE that you can install as a desktop app. You can use the API endpoint and your organization API token to interact with our API.