Skip to main content

New student and class registration API

Learn how to use the Teach ’n Go API to automate student registration, enrollment, and class management seamlessly.

Abdullah Al-Hussein avatar
Written by Abdullah Al-Hussein
Updated this week

If you’re managing a high volume of students, manually adding and enrolling them into classes can take a lot of time.

Good news — you can now automate the student registration process in Teach ’n Go using our Student Registration API.

This API allows your system to automatically add students, record their details, and enroll them into classes using your school’s data flow — saving hours of manual work every week.


Step 1: Authenticate with your API key

Before you start, you’ll need an API key for authentication. Here’s how to find or create one:

  1. Go to your School Settings page.

  2. Click on the Developers tab.

  3. Create a new API Key.

You can use this key in two ways:

  • Header: X-API-KEY: your_api_key_here

  • Query parameter: ?apikey=your_api_key_here

Step 2: Send the Student Registration request

Endpoint details

Request URL

Method

POST

Content Type

JSON

This endpoint creates a new student in your school’s database and optionally enrolls them in one or more classes.

Example request body

{
"fname":"test",
"lname":"test",
"gender":"Male",
"registration_date":"2022-11-30",
"date_of_birth":"2022-11-30",
"identification_number":"1004",
"preferred_payment_method":"1",
"discount_percentage":"10",
"mobile_phone_code":"91",
"mobile_phone":"9429291772",
"home_phone_code":"0265",
"home_phone":"2521772",
"email_address":"test@test.com",
"street_name_and_number":"",
"flat_floor":"",
"area":"",
"city":"",
"postcode":"",
"country_code":"",
"general_notes":"",
"medical_notes":"",
// Add TnG IDs as array
"courses":[],
// Add TnG IDs as array
"events":[],
"custom_fields": {
// Text box example
"Nationality":"Indian",
// Check box example
"is Document submitted?":true,
// Drop down value for multiple and single selection example
"Mother tongue":["English","Hindi","Spanish"],
// Date box example
"Date":"2023-06-16"
},
"enrolment_date":"2022-11-30"
}

Important: If a student’s email already exists in your Teach ’n Go account, a new student won’t be created.Instead, that existing student will automatically be enrolled into the specified class.

Step 3: Review API responses

✅ Success

{
"status": "success",
"message": "student inserted successfully",
"data": {
"id": "144515"
}
}

⚠️ Validation error

{
"status": "fail",
"message": "validation Error",
"errors": {
"fname": [
"Enter a first name"
]
}
}

🚫 Unauthorized

{
"status": "fail",
"message": "unauthorized user"
}

If you receive an unauthorised error, double-check your API key and ensure it’s correctly included in your request header or query string.

Variable reference list

Here’s a quick reference for all the variables supported in the request body:

Variable

Type

Required

Example / Possible values

fname

Text

✅ Yes

John

lname

Text

✅ Yes

Doe

gender

Text

Male / Female / Not specified

registration_date

Date (YYYY-MM-DD)

2022-11-30

date_of_birth

Date (YYYY-MM-DD)

2010-03-15

identification_number

Text

STU1001

preferred_payment_method

Numeric

1=Cash, 2=Cheque, 3=Credit Card, 4=Bank Transfer, 5=Direct Debit

discount_percentage

Float

10

mobile_phone_code

Numeric

91

mobile_phone

Numeric

9429291772

email_address

Text

courses

Array

[57651, 57630]

enrolment_date

Date

2022-11-30

Get a list of active or scheduled classes

To find the class IDs you can use in your registration requests, use this API:

Example response

Success

{
"status": "success",
"message": " course list retrieved",
"data": {
"1": {
"57651": "English level 2",
"57653": "Maths level 1"
},
"2": {
"57630": "French level 3",
"57645": "class"
}
}
}

Data glossary:

  • 1 → Scheduled classes

  • 2 → Active classes

Common use cases

  • Sync student data from your website or CRM directly into Teach ’n Go.

  • Automate class enrollment when a student signs up for a course online.

  • Integrate your own student portal or registration form with Teach ’n Go’s back office.

FAQs

1. Can I update an existing student with this API?

No. If the email already exists, the API will enroll the student in the provided class instead of creating a new record.

2. Can I test the API in a sandbox environment?

Currently, the API connects to your live Teach ’n Go account. We recommend testing with sample data first.

3. Is there a rate limit for API requests?

Yes — to maintain system stability, requests are limited per minute. If exceeded, you’ll receive a “rate limit exceeded” message.

4. Can I retrieve students programmatically?

Yes — see the Teach ’n Go API documentation for endpoints to list students, teachers, and classes.

Conclusion

By automating student registration with the Teach ’n Go API, you can eliminate repetitive admin work, reduce errors, and ensure every new student is added and enrolled instantly.

Start by generating your API key, testing your first registration request, and integrating it into your existing workflow.

Did this answer your question?