Loopwise Docs
Admin API

Loopwise Admin API

GraphQL API for third-party applications to access school data

Note: The Loopwise Admin API is currently under development and not yet available for public use. This documentation is provided for preview purposes only. We will announce when the API is ready for integration.

Overview

The Loopwise Admin API provides programmatic access to school data and operations through a GraphQL interface. This API allows third-party applications to perform operations similar to those available in the school admin dashboard, including accessing course information, student data, and performing administrative actions.

Endpoint

Loopwise's GraphQL endpoint is:

https://teachify.io/admin/graphql

The endpoint supports GraphQL introspection, allowing you to explore the full schema.

Authentication

Obtaining an API Key

Access to the Loopwise Admin API requires an API key that is associated with a specific school and authorized application.

  1. Request an API Key:

    • Contact Loopwise support to request an API key for your application
    • API keys are issued on a per-school basis
    • You will need to provide information about your application and its intended use
  2. API Key Security:

    • Keep your API key secure
    • Do not share it in client-side code or public repositories
    • Each API key is specific to a school-application pair
    • Loopwise monitors API usage and may revoke keys that are misused

Using the API Key

Include the API key in all API requests using the X-Teachify-API-Key HTTP header:

curl \
  -X POST \
  -H "Content-Type: application/json" \
  -H "X-Teachify-API-Key: <Your API Key>" \
  --data '{ "query": "{ courses { nodes { id name } } }" }' \
  https://teachify.io/admin/graphql

Getting Started

GraphQL Clients

We recommend using a GraphQL client to explore and interact with the API. Popular options include:

These tools allow you to browse the schema, build queries, and test your requests with proper authentication.

Basic Query Example

To get started, here's a simple query to retrieve basic information about the authenticated school:

query SchoolInfo {
  school {
    id
    name
    createdAt
  }
}

Pagination

Most list queries in the Loopwise Admin API use cursor-based pagination to efficiently handle large datasets. Paginated responses typically include:

  • nodes: Array of items for the current page
  • pageInfo: Metadata about the current page, including:
    • hasNextPage: Boolean indicating if more pages exist
    • endCursor: Cursor to use for fetching the next page

Example of paginated query:

query Courses($first: Int, $after: String) {
  courses(first: $first, after: $after) {
    nodes {
      id
      name
    }
    pageInfo {
      hasNextPage
      endCursor
    }
  }
}

Error Handling

The API returns standard GraphQL errors in the following format:

{
  "errors": [
    {
      "message": "Error message description",
      "locations": [{ "line": 2, "column": 3 }],
      "path": ["fieldName"]
    }
  ]
}

Common error scenarios include:

  • Authentication failures
  • Rate limiting
  • Invalid input parameters
  • Resource not found
  • Permission denied

Next Steps

Explore the following sections to learn more about using the Loopwise Admin API:

On this page