Docs home

Updating a Student

Updates a learner's profile. This is the same endpoint as "Update Student Info": send the learner's full profile, because fields you leave out can be cleared.

POST/organization/students/{user_id}
Updating a Student
curl --request POST \
  --url 'https://<your-api-host>/nuSource/api/v1/organization/students/{user_id}' \
  --header 'APIKEY: <your-api-key>' \
  --header 'ORGID: <your-org-id>' \
  --form 'JSONString={"email":"johnwick@edmingle.com","name":"John10 wick","contact_number":"9963652858","contact_number_country_id":103,"contact_number_dial_code":"+91","contact_number_2":"9878987898","contact_number_2_dial_code":"+91","contact_number_2_country_id":103,"user_username":"johnWick110","birthday":1577903400,"about":"","custom_fields":[]}'
{
  "code": 200,
  "message": "Success"
}

Access: Institute admins, plus custom roles that can manage learners.

Path parameters
user_idintegerrequired
ID of the learner, e.g. organization/students/43974.

Request body: form-data with one field, JSONString, containing this JSON. File-type custom fields can be attached as extra form-data parts (JPEG, PNG, GIF or PDF, up to 5 MB).

BodyJSONString
emailstringOne of email or contact_number
Email.
contact_numberstringOne of email or contact_number
Mobile number.
Country of contact_number (country_code_id from "Countries List"). Default 103 (India).
namestring
Full name. Letters, spaces, apostrophes and dots only.
Username, up to 50 characters. Must be unique.
Registration number in the organization given by organization_id.
Organization whose registration number to set. Defaults to your ORGID organization.
Second mobile number.
Country of contact_number_2. Default 103.
Name parts.
genderinteger
0 not specified, 1 male, 2 female.
birthdayUnix timestamp
Date of birth.
stateinteger
State ID from the list of Indian states. Any other value is rejected.
Guardian name. Required if you send a guardian email or phone. Creates the guardian account if the learner has none.
Guardian email and mobile number.
Country of u_parent_contact.
Your own ID for the learner. Must be unique in your institute.
The five spare profile fields.
languagestring
Interface language code. Default en.
timezonestring
Time zone offset. Defaults to India time.
Custom field values: objects with field_id, field_value and field_type (1 text, 2 number, 3 dropdown, 4 date, 5 file upload). For file fields, attach the file as a form-data part.
Your institute ID. Defaults to the institute of your ORGID organization.
Response200application/json
codeinteger
Example: 200
messagestring
Example: Success

Notes:

  • This overwrites the profile. Fields you leave out are not all kept: email, contact_number, contact_number_2, the guardian email and phone, birthday, registration_number, standard, cf_1 to cf_5, language, timezone and country are cleared or reset to defaults when missing. Read the learner first ("Retrieve a Student") and send every field back.
  • Errors: "Invalid user ID" (you or the learner are not in that institute), "Please provide at least one contact information", "Please enter a valid primary mobile number.", "Please provide parent name", "Username already exists", "Please select a state from the given options.".
  • Triggers the institute's profile-edit and user-updated webhooks.
  • Rate limit: 30 requests per minute; going over locks you out for 30 minutes.

Updated yesterday

Ask AI