Overview
Read-only JSON endpoint that returns your school's teachers and staff in one list, including the custom fields defined for them.
Teachers and staff are separate records in Teach 'n Go but share one set of custom fields, so a field such as Staff Type can be filled in on either. This endpoint returns both and tells you which is which.
Authentication
Authenticate with the school's API key. Pass it either way:
Header: X-API-KEY: <school_api_key>
Query: ?apikey=<school_api_key>
The key identifies the school. Responses are automatically scoped to that school; there is no school_id parameter. We recommend the header form: keys passed in a URL can end up in server or proxy logs.
Endpoint
GET or POST /api/v1/staff
Parameters are accepted in the query string or the request body.
Parameters
Param | Type | Notes |
| string |
|
| integer | One record id. Must be sent together with |
| integer |
|
| string | Matches name, email or mobile number. |
| integer | Records per page. Default 20, maximum 100. |
| integer | Page number. Default 1. |
An id on its own is rejected. Teachers and staff are numbered independently, so the same id can exist in both. Send type alongside it to say which one you mean.
Archived teachers and staff are never returned.
Example
curl -H "X-API-KEY: YOUR_KEY" "https://app.teachngo.com/api/v1/staff?type=teacher&active=1&per_page=50"
Response
{
"status": "success",
"totalRecords": 42,
"limit": 50,
"page": 1,
"totalPages": 1,
"next": null,
"previous": null,
"data": [
{
"id": 1001,
"fname": "John",
"lname": "Doe",
"email_address": "john@example.com",
"mobile_phonecode": "353",
"mobile_phone": "861234567",
"area": "Example Area",
"city": "Example City",
"postcode": "A00 B1C2",
"country_code": "IE",
"active": true,
"archived": false,
"user_id": 501,
"custom_fields": {"Staff Type": "Tutor"},
"created": "2020-06-24 18:32",
"type": "teacher"
}
]
}
Field reference
Field | Meaning |
|
|
| The record's Teach 'n Go id — unique within its own type, not across both |
| Your school's teacher and staff custom fields, keyed by field name |
| Whether the record is marked active |
| The linked portal login, or |
| Your own staff reference, if used |
| Address components, also joined into |
| Teachers only — this field is absent from staff records |
| When the record was added |
The two types do not carry identical fields. Teachers have skype_id; staff do not. A field that does not exist on a record is left out of that record rather than returned empty, so read defensively.
Custom fields
Teacher and staff custom fields are defined once and apply to both. Go to Settings → School settings → Edit school and open the Custom teacher / staff fields tab.
They come back in custom_fields keyed by the field name exactly as you typed it, so a field named Staff Type reads as custom_fields["Staff Type"]. Renaming a field in the app changes the key here too.
Validation error
{
"status": "failed",
"data": [],
"message": "type must be either teacher or staff"
}
Pagination and errors
The response wraps the records in totalRecords, limit, page, totalPages, next and previous. See API error codes and pagination.