Teachify Admin API Documentation
Note: The Teachify 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 Teachify 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
Teachify’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 Teachify Admin API requires an API key that is associated with a specific school and authorized application.
-
Request an API Key:
- Contact Teachify 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
-
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
- Teachify 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 subdomain createdAt }}
Pagination
Most list queries in the Teachify Admin API use cursor-based pagination to efficiently handle large datasets. Paginated responses typically include:
nodes
: Array of items for the current pagepageInfo
: Metadata about the current page, including:hasNextPage
: Boolean indicating if more pages existendCursor
: 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 Teachify Admin API:
- Queries: Available query operations
- Overview: Introduction to queries
- Pagination: Working with paginated responses
- Filtering: Filtering query results
- Resources:
- Courses: Course queries
- Events: Event queries
- Students: Student queries
- Assignments: Assignment queries
- Mutations: Available mutation operations
- Best Practices: Guidelines for effective API usage