Register a student
- Bearer token
- Permission
student/create - Core record
Creates a student under your account. From then on the student is one of yours: you can read and update them, send them a sign-in link, and apply them to exams.
What to look up first
countryis the_idof a country fromlistCountries. A name or an ISO code is refused.gradeis the_idof a grade fromlistGrades, or its name,1to12.cityandschoolare an_idor a name. There is no list of cities or schools: send the names your records hold. A city or school name that is not in our list yet is added automatically; look first withcheckStudentRegistrationto catch a typo. A new name may be at most 80 characters for a city and 120 for a school, without<or>. An_idthat matches nothing is refused with 400, and so is acountryorgradethat matches nothing: those are never added.
What is set for you
username: the country’s two-letter code, a letter and a number, such asXXB1045with a real code in place ofXX. You cannot choose it, and it is how the student signs in and how support finds the account.fullName, fromfirstNameandlastName.activatedPlatformsThisSeason:["common"]unless you send a list.emailConfirmed:false. Only the student can confirm their address.
A password is optional, and needs a second permission. Sending password needs auth/signin on mto as well as student/create; without it the request is refused with 403 before anything is read or written. It is never returned, and a registration that carries one takes a second or more longer. Leave it out to sign the student in with createSigninLink instead, or set one later with setStudentPassword.
Not idempotent. Registering an email address one of your students already has is refused with 409, and the message ends with that student’s _id, so a replayed batch can fetch the student rather than create a second one. An address another account registered is refused with 409 as well, without an id.
Entering the student for exams at the same time. exams is a list of { organizationId, examId } (at most 10; organizationId is the organization’s _id, as in listOrganizations). Each exam is checked by the rules createApplication applies (open, grade, country, state, language, and no second exam of one category on one sitting), and the student, their record in each organization named, the applications and their payments are written in ONE all-or-nothing step. With walletPay: true every priced exam is paid from your wallet, one credit each, in that same step: if the wallet cannot cover it nothing is created, not even the student. walletPay always needs an enabled wallet, even when every exam is free, and application/create (and application/pay) on every organization named; without them the whole request is 403 before anything is read. Without walletPay the applications are created unpaid. The answer then also carries applications (and wallet). A body without exams and walletPay registers the student exactly as before.
The answer has country, city, school and grade as ids; getStudent resolves them. An organization the request names an exam of holds the student’s record at once. For any other the record is written when you first call createApplication there, or when the student first signs in.
Request body
firstNamestringrequiredThe student’s first name. Printed on certificates and reports, followed by
lastName.example
JanelastNamestringrequiredThe student’s surname. Printed on certificates and reports after
firstName. It cannot be empty.example
DoebirthstringrequiredDate of birth as
DD/MM/YYYY, and a date that exists:31/02/2008is refused. An ISO date such as2008-05-14is refused.pattern
^(0[1-9]|[12]\d|3[01])\/(0[1-9]|1[0-2])\/\d{4}$example14/05/2008sexstringrequiredOne of
m,forn.one of
mfnexample
femailstringrequiredThe student’s email address, stored in lower case. An address belongs to one student on the whole platform, so one already registered, by your account or another, is refused with 409.
format
emailexamplejane.doe@example.comemail2stringLeave this out. Any value but an empty one is refused with 400.
phonestringA phone number, stored as you send it. No format is checked. On an update,
""clears it.example
+1 555 0100countrystringrequiredThe
_idof a country, fromlistCountries(GET /v1/country). An id only: a name or an ISO code is refused. Its two-letter code starts the student’susername.pattern
^[0-9a-fA-F]{24}$example6650a1b2c3d4e5f6a7b8c9d1subdivisionstringThe
_idof a subdivision (a state) ofcountry, fromlistCountrySubdivisions, or its full ISO 3166-2 code such asUS-CA. Required for a country whose students must have one: a United States student needs a state, and registration without it is refused with 400subdivision_required. Optional for every other country. A subdivision of another country is refused with 400. It never changes theusername.example
6650a1b2c3d4e5f6a7b8c9f2gradestringrequiredThe
_idof a grade, fromlistGrades(GET /v1/grade), or its name,1to12. Either way the grade’s_idis what is stored. One that matches no grade is refused with 400, and so is the Graduated grade (GRADUATED), which no partner may set unless the student already holds it. The grade decides which exams the student is offered.example
10schoolstringrequiredThe
_idof a school, or its name. There is no list of schools: send the name your records hold. A school name that is not in our list yet is added automatically; check first withcheckStudentRegistration(willCreate.school) to catch a typo. A new name may be at most 120 characters, without<or>. An_idthat matches no school is refused with 400.example
Springfield High SchoolcitystringrequiredThe
_idof a city, or its name. There is no list of cities: send the name your records hold. A city name that is not in our list yet is added automatically; check first withcheckStudentRegistration(willCreate.city). A new name may be at most 80 characters, without<or>. An_idthat matches no city is refused with 400.example
SpringfieldpasswordstringThe student’s sign-in password. Accepted only from an account that holds
auth/signinonmto; from any other the registration is refused with 403. At least 5 characters, the minimum the sign-up form applies, and at most 72 bytes, and not containing the student’s own name or email address. Never returned by any operation. Omit it to register the student without one.min length
5examplecorrect horse battery stapleactivatedPlatformsThisSeasonarray of stringThe organizations the student takes part in this season, by
slug(aslistOrganizationsgives it, ormto, which every student is on), orcommonfor every organization. Registration sets["common"]when you leave it out;nullis refused with 400. At most 6 entries.each one of
commonstemhilinguaneogmathcodingmax items
6example["common"]examsarray of StudentExamChoiceExams to enter the new student for, at most 10. Each one is checked by the rules
createApplicationapplies, and the application is created in the same all-or-nothing write as the student. Pending (unpaid) unlesswalletPayistrue.max items
102 fields of each item
organizationIdstringrequiredThe
_idof the organization the exam belongs to, fromlistOrganizations. Not its name or slug.example
64b7f0c2a1d3e4f5a6b7c8d9examIdstringrequiredThe exam’s
_id: a leafexamIdoflistAvailableExams, or an_idfromlistExams. It must be an exam the student could be entered for.example
6650a1b2c3d4e5f6a7b8c9e1
walletPaybooleanPay every priced exam in
examsfrom your wallet, one credit each, in the same all-or-nothing write. Needs an enabled wallet (opened by Main Team only after an agreement and on your request, never through the API) and theapplication/paypermission on each organization, even when no credit ends up being needed. Leave it out, orfalse, and the applications are created unpaid.example
false
Responses
201 Created
Created: message is "User registered successfully.".
Body
successbooleanrequiredAlways
trueon a success.one of
truemessagestringrequiredexample
User registered successfully.dataobject · RegisteredStudentResponserequiredThe student as
registerStudentstores them, and, when the request carriedexams, the applications created with them.23 fields of data
_idstringrequiredThe student’s id: what every
studentIdpath parameter and body field takes.example
6650a1b2c3d4e5f6a7b8c9d0mainIdstringOnly on an organization’s own record of a student, which
linkStudentSupervisoranswers with: there it is the student’s id, and_idis the organization’s own. Absent on every other operation.example
6650a1b2c3d4e5f6a7b8c9d0usernamestringrequiredIssued at registration, never chosen by you: the country’s two-letter code, a letter, then a number. It is how the student signs in and how support refers to the account.
example
XXB1045firstNamestringrequiredThe student’s first name.
example
JanelastNamestringrequiredThe student’s surname.
example
DoefullNamestringrequiredfirstNameandlastNamejoined by a space, kept in step when either changes.example
Jane DoeemailstringrequiredThe student’s email address, in lower case.
example
jane.doe@example.comemailConfirmedbooleanrequiredWhether the student has confirmed
email. It startsfalse, only the student can make ittrue, and changingemailsets it back tofalse. Once it istrue,setStudentPasswordis refused: the account is the student’s.example
falsephonestringA phone number, as you sent it.
example
+1 555 0100birthstringDate of birth,
DD/MM/YYYY.example
14/05/2008sexstringm,forn.one of
mfnexample
fcountrystringThe id of the student’s country.
example
6650a1b2c3d4e5f6a7b8c9d1subdivisionstringThe id of the student’s subdivision (a state), where they have one.
example
6650a1b2c3d4e5f6a7b8c9f2citystringThe id of the student’s city. A city you sent by name is stored as the id it resolved to.
example
6650a1b2c3d4e5f6a7b8c9d2schoolstringThe id of the student’s school. A school you sent by name is stored as the id it resolved to.
example
6650a1b2c3d4e5f6a7b8c9d3gradestringThe id of the student’s grade. A grade you sent by name is stored as the id it resolved to.
example
6650a1b2c3d4e5f6a7b8c9d4supervisorstringThe id of the student’s supervisor, when one is attached.
example
6650a1b2c3d4e5f6a7b8c9d5partnerstringThe id of the student’s partner, when one is attached.
example
6650a1b2c3d4e5f6a7b8c9d6activatedPlatformsThisSeasonarray of stringrequiredThe organizations the student is active on this season, by
slug;commonmeans every organization. Registration setscommonunless you send a list. The organization-scoped student operations see a student only when this lists that organization orcommon, and updating a student through one adds that organization.example
["common"]createdAtstringrequiredWhen the student was registered.
format
date-timeexample2026-09-01T09:30:00.000ZupdatedAtstringrequiredWhen the record last changed.
format
date-timeexample2026-09-02T14:05:00.000Zapplicationsarray of RegisteredApplicationResponseOne entry per
examsentry, in the order you sent them. Only when the request carriedexams.5 fields of each item
organizationIdstringrequiredThe
_idof the organization the application is in.example
64b7f0c2a1d3e4f5a6b7c8d9organizationstringrequiredThe organization’s slug.
example
stemapplicationIdstringrequiredThe application’s
_id; use it with the application operations.example
6650a1b2c3d4e5f6a7b8c9e5examIdstringrequiredThe exam the student was entered for.
example
6650a1b2c3d4e5f6a7b8c9e1paymentobject · RegisteredPaymentResponserequiredWhat the application’s payment came to.
4 fields of payment
statusstringrequiredpaidfor an exam paid from the wallet and for a free exam;pendingotherwise.one of
paidpendingexample
paidamountnumberrequiredCents. After the coding bundle price, where it applies.
example
5000currencystringrequiredUSDfor neo,EURotherwise.example
EURreferencestringThe code of the wallet payment (
payment.referenceon the application reads), when a credit paid it.example
stx-18c2f0a9d3e4a1b2c3
walletobject · RegisteredWalletResponseOnly when the request carried
walletPay: true.3 fields of wallet
chargednumberrequiredApplications paid with a credit.
example
1referencestringThe code the whole wallet payment of this call shares.
example
stx-18c2f0a9d3e4a1b2c3remainingobjectrequiredCredits left per organization that was charged.
example
{"stem":41}
Headers
X-RateLimit-LimitintegerRequests your account may make to this operation per window (100).
X-RateLimit-RemainingintegerRequests left in the current window.
X-RateLimit-ResetintegerSeconds until the current window ends.
Example
{
"success": true,
"message": "User registered successfully.",
"data": {
"_id": "6650a1b2c3d4e5f6a7b8c9d0",
"mainId": "6650a1b2c3d4e5f6a7b8c9d0",
"username": "XXB1045",
"firstName": "Jane",
"lastName": "Doe",
"fullName": "Jane Doe",
"email": "jane.doe@example.com",
"emailConfirmed": false,
"phone": "+1 555 0100",
"birth": "14/05/2008",
"sex": "f",
"country": "6650a1b2c3d4e5f6a7b8c9d1",
"subdivision": "6650a1b2c3d4e5f6a7b8c9f2",
"city": "6650a1b2c3d4e5f6a7b8c9d2",
"school": "6650a1b2c3d4e5f6a7b8c9d3",
"grade": "6650a1b2c3d4e5f6a7b8c9d4",
"supervisor": "6650a1b2c3d4e5f6a7b8c9d5",
"partner": "6650a1b2c3d4e5f6a7b8c9d6",
"activatedPlatformsThisSeason": [
"common"
],
"createdAt": "2026-09-01T09:30:00.000Z",
"updatedAt": "2026-09-02T14:05:00.000Z",
"applications": [
{
"organizationId": "64b7f0c2a1d3e4f5a6b7c8d9",
"organization": "stem",
"applicationId": "6650a1b2c3d4e5f6a7b8c9e5",
"examId": "6650a1b2c3d4e5f6a7b8c9e1",
"payment": {
"status": "paid",
"amount": 5000,
"currency": "EUR",
"reference": "stx-18c2f0a9d3e4a1b2c3"
}
}
],
"wallet": {
"charged": 1,
"reference": "stx-18c2f0a9d3e4a1b2c3",
"remaining": {
"stem": 41
}
}
}
}400 Bad request
bad_request: The body is not valid JSON, breaks a field’s rules, or has a field this operation does not accept ("property <name> should not exist").bad_request:countryis not the_idof a countrylistCountrieslists, or the country has no two-letter code to begin a username with.bad_request:gradematches nothing (no grade has that_idor name), or acityorschool_idmatches nothing, or a newcityorschoolname is too long (at most 80 and 120 characters) or contains<or>.bad_request:subdivisionis neither the_idof a subdivision nor a full ISO 3166-2 code, matches nothing, is hidden, or belongs to another country thancountry.subdivision_required:countryneeds asubdivision(itssubdivisionRequiredistrue: the United States) and the body has none.bad_request:lastNameis missing or empty.bad_request:birthis notDD/MM/YYYY, or is not a date that exists, such as31/02/2008.bad_request:passwordis shorter than 5 characters, longer than 72 bytes, or contains the student’s own name or email address.bad_request: An entry ofexamsis not an exam of its organization, or is not one this student could be entered for (closed, wrong grade, country or state, no language), or two entries take the same sitting. The message starts with the entry,exams[1].examId. Nothing was written.
When
bad_requestThe body is not valid JSON, breaks a field’s rules, or has a field this operation does not accept ("property <name> should not exist").
bad_requestcountryis not the_idof a countrylistCountrieslists, or the country has no two-letter code to begin a username with.bad_requestgradematches nothing (no grade has that_idor name), or acityorschool_idmatches nothing, or a newcityorschoolname is too long (at most 80 and 120 characters) or contains<or>.bad_requestsubdivisionis neither the_idof a subdivision nor a full ISO 3166-2 code, matches nothing, is hidden, or belongs to another country thancountry.subdivision_requiredcountryneeds asubdivision(itssubdivisionRequiredistrue: the United States) and the body has none.bad_requestlastNameis missing or empty.bad_requestbirthis notDD/MM/YYYY, or is not a date that exists, such as31/02/2008.bad_requestpasswordis shorter than 5 characters, longer than 72 bytes, or contains the student’s own name or email address.bad_requestAn entry of
examsis not an exam of its organization, or is not one this student could be entered for (closed, wrong grade, country or state, no language), or two entries take the same sitting. The message starts with the entry,exams[1].examId. Nothing was written.
Example
{
"error": {
"code": "bad_request",
"documentation_url": "https://hub.main-team.org/api/errors#bad_request",
"message": "The request was malformed or contained invalid parameters.",
"request_id": "0b5c6d0e-8f7a-4b1c-9d2e-3f4a5b6c7d8e"
}
}Fields of the error body
errorobject · ErrorDetailrequiredWhat went wrong.
5 fields of error
codestringrequiredA stable machine code: branch on this. Each one is explained at
documentation_url.one of
invalid_emailbad_requestsubdivision_requiredunauthorizedforbiddennot_foundconflictpayload_too_largeunsupported_media_typeunprocessable_entitytoo_many_requestsinternal_errorservice_unavailableexample
not_foundmessagestringrequiredWritten for a person, and may change: never branch on it.
example
Not found!documentation_urlstringrequiredWhere this code is explained.
format
uriexamplehttps://hub.main-team.org/api/errors#not_foundrequest_idstringrequiredThis request’s id, also sent as the
X-Request-Idresponse header: the one you sent, when it was acceptable, or else one the API made. Quote it when you report a problem.example
0b5c6d0e-8f7a-4b1c-9d2e-3f4a5b6c7d8edetailsobjectPresent only where an operation says so, and then with the shape that operation documents — the rows it could not accept, say. Treat it as absent everywhere else, and ignore a
detailsyou do not recognise.
401 Unauthorized
unauthorized: The token is missing or malformed, is not signed with your account’s apiSecret, breaks the iat and exp rules, has expired or been revoked, or its account is not active. All of these answer the same.
When
unauthorizedThe token is missing or malformed, is not signed with your account’s
apiSecret, breaks theiatandexprules, has expired or been revoked, or its account is not active. All of these answer the same.
Example
{
"error": {
"code": "unauthorized",
"documentation_url": "https://hub.main-team.org/api/errors#unauthorized",
"message": "Authentication is required or the provided credentials are invalid.",
"request_id": "0b5c6d0e-8f7a-4b1c-9d2e-3f4a5b6c7d8e"
}
}Fields of the error body
errorobject · ErrorDetailrequiredWhat went wrong.
5 fields of error
codestringrequiredA stable machine code: branch on this. Each one is explained at
documentation_url.one of
invalid_emailbad_requestsubdivision_requiredunauthorizedforbiddennot_foundconflictpayload_too_largeunsupported_media_typeunprocessable_entitytoo_many_requestsinternal_errorservice_unavailableexample
not_foundmessagestringrequiredWritten for a person, and may change: never branch on it.
example
Not found!documentation_urlstringrequiredWhere this code is explained.
format
uriexamplehttps://hub.main-team.org/api/errors#not_foundrequest_idstringrequiredThis request’s id, also sent as the
X-Request-Idresponse header: the one you sent, when it was acceptable, or else one the API made. Quote it when you report a problem.example
0b5c6d0e-8f7a-4b1c-9d2e-3f4a5b6c7d8edetailsobjectPresent only where an operation says so, and then with the shape that operation documents — the rows it could not accept, say. Treat it as absent everywhere else, and ignore a
detailsyou do not recognise.
403 Forbidden
forbidden: The token is valid, but no role on your account allowsstudent/createonmto(the target of operations without:organizationIdin their path), or a role denies it.forbidden:passwordwas sent, and your account does not holdauth/signinonmto. Nothing was written.forbidden:examsorwalletPaywas sent, and your account lacksapplication/create(or, forwalletPay,application/pay) on an organization named;error.details.reasonispermission_missinganderror.details.organizationslists what is missing. OrwalletPaywastrueand no wallet is enabled for your account:error.details.reasoniswallet_not_enabled. Nothing was written.
When
forbiddenThe token is valid, but no role on your account allows
student/createonmto(the target of operations without:organizationIdin their path), or a role denies it.forbiddenpasswordwas sent, and your account does not holdauth/signinonmto. Nothing was written.forbiddenexamsorwalletPaywas sent, and your account lacksapplication/create(or, forwalletPay,application/pay) on an organization named;error.details.reasonispermission_missinganderror.details.organizationslists what is missing. OrwalletPaywastrueand no wallet is enabled for your account:error.details.reasoniswallet_not_enabled. Nothing was written.
Example
{
"error": {
"code": "forbidden",
"documentation_url": "https://hub.main-team.org/api/errors#forbidden",
"message": "Insufficient role permissions",
"request_id": "0b5c6d0e-8f7a-4b1c-9d2e-3f4a5b6c7d8e"
}
}Fields of the error body
errorobject · ErrorDetailrequiredWhat went wrong.
5 fields of error
codestringrequiredA stable machine code: branch on this. Each one is explained at
documentation_url.one of
invalid_emailbad_requestsubdivision_requiredunauthorizedforbiddennot_foundconflictpayload_too_largeunsupported_media_typeunprocessable_entitytoo_many_requestsinternal_errorservice_unavailableexample
not_foundmessagestringrequiredWritten for a person, and may change: never branch on it.
example
Not found!documentation_urlstringrequiredWhere this code is explained.
format
uriexamplehttps://hub.main-team.org/api/errors#not_foundrequest_idstringrequiredThis request’s id, also sent as the
X-Request-Idresponse header: the one you sent, when it was acceptable, or else one the API made. Quote it when you report a problem.example
0b5c6d0e-8f7a-4b1c-9d2e-3f4a5b6c7d8edetailsobjectPresent only where an operation says so, and then with the shape that operation documents — the rows it could not accept, say. Treat it as absent everywhere else, and ignore a
detailsyou do not recognise.
409 Conflict
conflict: One of your students already has this email address. The message ends with that student’s_id.conflict: Another account registered this email address. The message does not say whose it is. Also the answer when an organization named inexamsalready holds the address.conflict:walletPaywastrueand the wallet holds fewer credits than the priced exams need.error.details.reasonisinsufficient_creditsanderror.details.organizationslists each organization withneeded,availableandshort. Nothing was written: no student, no application.
When
conflictOne of your students already has this email address. The message ends with that student’s
_id.conflictAnother account registered this email address. The message does not say whose it is. Also the answer when an organization named in
examsalready holds the address.conflictwalletPaywastrueand the wallet holds fewer credits than the priced exams need.error.details.reasonisinsufficient_creditsanderror.details.organizationslists each organization withneeded,availableandshort. Nothing was written: no student, no application.
Example
{
"error": {
"code": "conflict",
"documentation_url": "https://hub.main-team.org/api/errors#conflict",
"message": "A student with that email is already registered to this account (6650a1b2c3d4e5f6a7b8c9d0).",
"request_id": "0b5c6d0e-8f7a-4b1c-9d2e-3f4a5b6c7d8e"
}
}Fields of the error body
errorobject · ErrorDetailrequiredWhat went wrong.
5 fields of error
codestringrequiredA stable machine code: branch on this. Each one is explained at
documentation_url.one of
invalid_emailbad_requestsubdivision_requiredunauthorizedforbiddennot_foundconflictpayload_too_largeunsupported_media_typeunprocessable_entitytoo_many_requestsinternal_errorservice_unavailableexample
not_foundmessagestringrequiredWritten for a person, and may change: never branch on it.
example
Not found!documentation_urlstringrequiredWhere this code is explained.
format
uriexamplehttps://hub.main-team.org/api/errors#not_foundrequest_idstringrequiredThis request’s id, also sent as the
X-Request-Idresponse header: the one you sent, when it was acceptable, or else one the API made. Quote it when you report a problem.example
0b5c6d0e-8f7a-4b1c-9d2e-3f4a5b6c7d8edetailsobjectPresent only where an operation says so, and then with the shape that operation documents — the rows it could not accept, say. Treat it as absent everywhere else, and ignore a
detailsyou do not recognise.
413 Payload too large
payload_too_large: The body is larger than 100 kB.
When
payload_too_largeThe body is larger than 100 kB.
Example
{
"error": {
"code": "payload_too_large",
"documentation_url": "https://hub.main-team.org/api/errors#payload_too_large",
"message": "request entity too large",
"request_id": "0b5c6d0e-8f7a-4b1c-9d2e-3f4a5b6c7d8e"
}
}Fields of the error body
errorobject · ErrorDetailrequiredWhat went wrong.
5 fields of error
codestringrequiredA stable machine code: branch on this. Each one is explained at
documentation_url.one of
invalid_emailbad_requestsubdivision_requiredunauthorizedforbiddennot_foundconflictpayload_too_largeunsupported_media_typeunprocessable_entitytoo_many_requestsinternal_errorservice_unavailableexample
not_foundmessagestringrequiredWritten for a person, and may change: never branch on it.
example
Not found!documentation_urlstringrequiredWhere this code is explained.
format
uriexamplehttps://hub.main-team.org/api/errors#not_foundrequest_idstringrequiredThis request’s id, also sent as the
X-Request-Idresponse header: the one you sent, when it was acceptable, or else one the API made. Quote it when you report a problem.example
0b5c6d0e-8f7a-4b1c-9d2e-3f4a5b6c7d8edetailsobjectPresent only where an operation says so, and then with the shape that operation documents — the rows it could not accept, say. Treat it as absent everywhere else, and ignore a
detailsyou do not recognise.
415 Unsupported media type
unsupported_media_type: The body declares a charset that is not a UTF one (send UTF-8), or a Content-Encoding other than gzip, deflate or br.
When
unsupported_media_typeThe body declares a charset that is not a UTF one (send UTF-8), or a
Content-Encodingother than gzip, deflate or br.
Example
{
"error": {
"code": "unsupported_media_type",
"documentation_url": "https://hub.main-team.org/api/errors#unsupported_media_type",
"message": "unsupported charset \"ISO-8859-1\"",
"request_id": "0b5c6d0e-8f7a-4b1c-9d2e-3f4a5b6c7d8e"
}
}Fields of the error body
errorobject · ErrorDetailrequiredWhat went wrong.
5 fields of error
codestringrequiredA stable machine code: branch on this. Each one is explained at
documentation_url.one of
invalid_emailbad_requestsubdivision_requiredunauthorizedforbiddennot_foundconflictpayload_too_largeunsupported_media_typeunprocessable_entitytoo_many_requestsinternal_errorservice_unavailableexample
not_foundmessagestringrequiredWritten for a person, and may change: never branch on it.
example
Not found!documentation_urlstringrequiredWhere this code is explained.
format
uriexamplehttps://hub.main-team.org/api/errors#not_foundrequest_idstringrequiredThis request’s id, also sent as the
X-Request-Idresponse header: the one you sent, when it was acceptable, or else one the API made. Quote it when you report a problem.example
0b5c6d0e-8f7a-4b1c-9d2e-3f4a5b6c7d8edetailsobjectPresent only where an operation says so, and then with the shape that operation documents — the rows it could not accept, say. Treat it as absent everywhere else, and ignore a
detailsyou do not recognise.
429 Too many requests
too_many_requests: Your account has made more than 100 requests to this operation in the current 60-second window. Wait the seconds in Retry-After before sending again.
When
too_many_requestsYour account has made more than 100 requests to this operation in the current 60-second window. Wait the seconds in
Retry-Afterbefore sending again.
Headers
Retry-AfterintegerSeconds to wait before sending again; a request sent sooner is refused too.
Example
{
"error": {
"code": "too_many_requests",
"documentation_url": "https://hub.main-team.org/api/errors#too_many_requests",
"message": "Too many requests to this operation. Wait the number of seconds in Retry-After, then try again.",
"request_id": "0b5c6d0e-8f7a-4b1c-9d2e-3f4a5b6c7d8e"
}
}Fields of the error body
errorobject · ErrorDetailrequiredWhat went wrong.
5 fields of error
codestringrequiredA stable machine code: branch on this. Each one is explained at
documentation_url.one of
invalid_emailbad_requestsubdivision_requiredunauthorizedforbiddennot_foundconflictpayload_too_largeunsupported_media_typeunprocessable_entitytoo_many_requestsinternal_errorservice_unavailableexample
not_foundmessagestringrequiredWritten for a person, and may change: never branch on it.
example
Not found!documentation_urlstringrequiredWhere this code is explained.
format
uriexamplehttps://hub.main-team.org/api/errors#not_foundrequest_idstringrequiredThis request’s id, also sent as the
X-Request-Idresponse header: the one you sent, when it was acceptable, or else one the API made. Quote it when you report a problem.example
0b5c6d0e-8f7a-4b1c-9d2e-3f4a5b6c7d8edetailsobjectPresent only where an operation says so, and then with the shape that operation documents — the rows it could not accept, say. Treat it as absent everywhere else, and ignore a
detailsyou do not recognise.
500 Internal error
internal_error: Something failed on our side. Retry later, and quote request_id if it goes on.
When
internal_errorSomething failed on our side. Retry later, and quote
request_idif it goes on.
Example
{
"error": {
"code": "internal_error",
"documentation_url": "https://hub.main-team.org/api/errors#internal_error",
"message": "An unexpected error occurred.",
"request_id": "0b5c6d0e-8f7a-4b1c-9d2e-3f4a5b6c7d8e"
}
}Fields of the error body
errorobject · ErrorDetailrequiredWhat went wrong.
5 fields of error
codestringrequiredA stable machine code: branch on this. Each one is explained at
documentation_url.one of
invalid_emailbad_requestsubdivision_requiredunauthorizedforbiddennot_foundconflictpayload_too_largeunsupported_media_typeunprocessable_entitytoo_many_requestsinternal_errorservice_unavailableexample
not_foundmessagestringrequiredWritten for a person, and may change: never branch on it.
example
Not found!documentation_urlstringrequiredWhere this code is explained.
format
uriexamplehttps://hub.main-team.org/api/errors#not_foundrequest_idstringrequiredThis request’s id, also sent as the
X-Request-Idresponse header: the one you sent, when it was acceptable, or else one the API made. Quote it when you report a problem.example
0b5c6d0e-8f7a-4b1c-9d2e-3f4a5b6c7d8edetailsobjectPresent only where an operation says so, and then with the shape that operation documents — the rows it could not accept, say. Treat it as absent everywhere else, and ignore a
detailsyou do not recognise.