[{"data":1,"prerenderedAt":1497},["ShallowReactive",2],{"api-nav":3,"api-spec:index":362,"api-spec:op:get-wallet":677,"api-permissions-guide":955,"api-reference-doc:get-wallet":956},[4,28,57,104,124,328,342],{"id":5,"title":6,"links":7,"groups":27},"start","Start here",[8,11,15,18,21,24],{"title":9,"to":10},"Overview","\u002Fapi",{"title":12,"to":13,"status":14},"Quickstart","\u002Fapi\u002Fquickstart","available",{"title":16,"to":17,"status":14},"Environments","\u002Fapi\u002Fenvironments",{"title":19,"to":20,"status":14},"Authentication","\u002Fapi\u002Fauthentication",{"title":22,"to":23,"status":14},"Organizations","\u002Fapi\u002Forganizations",{"title":25,"to":26,"status":14},"Permissions","\u002Fapi\u002Fpermissions",[],{"id":29,"title":30,"links":31,"groups":56},"concepts","Concepts",[32,35,38,41,44,47,50,53],{"title":33,"to":34,"status":14},"Requests and responses","\u002Fapi\u002Frequests-and-responses",{"title":36,"to":37,"status":14},"Identifiers","\u002Fapi\u002Fidentifiers",{"title":39,"to":40,"status":14},"Pagination","\u002Fapi\u002Fpagination",{"title":42,"to":43},"Errors","\u002Fapi\u002Ferrors",{"title":45,"to":46,"status":14},"Rate limits","\u002Fapi\u002Frate-limits",{"title":48,"to":49,"status":14},"Retries","\u002Fapi\u002Fretries-and-idempotency",{"title":51,"to":52,"status":14},"Security","\u002Fapi\u002Fsecurity",{"title":54,"to":55,"status":14},"Versioning","\u002Fapi\u002Fversioning",[],{"id":58,"title":59,"links":60,"groups":103},"resources","Guides",[61,64,67,70,73,76,79,82,85,88,91,94,97,100],{"title":62,"to":63,"status":14},"Students","\u002Fapi\u002Fguides\u002Fstudents",{"title":65,"to":66,"status":14},"Bulk registration","\u002Fapi\u002Fguides\u002Fbulk-registration",{"title":68,"to":69,"status":14},"Passwords","\u002Fapi\u002Fguides\u002Fpasswords",{"title":71,"to":72,"status":14},"Supervisors","\u002Fapi\u002Fguides\u002Fsupervisors",{"title":74,"to":75,"status":14},"Reference data","\u002Fapi\u002Fguides\u002Freference-data",{"title":77,"to":78,"status":14},"API account","\u002Fapi\u002Fguides\u002Fapi-account",{"title":80,"to":81,"status":14},"Sign-in links","\u002Fapi\u002Fguides\u002Fsign-in-links",{"title":83,"to":84,"status":14},"Exams","\u002Fapi\u002Fguides\u002Fexams",{"title":86,"to":87,"status":14},"Applications","\u002Fapi\u002Fguides\u002Fapplications",{"title":89,"to":90,"status":14},"Settling payments","\u002Fapi\u002Fguides\u002Fsettling-payments",{"title":92,"to":93,"status":14},"Wallet","\u002Fapi\u002Fguides\u002Fwallet",{"title":95,"to":96,"status":14},"Group challenges","\u002Fapi\u002Fguides\u002Fgroup-challenges",{"title":98,"to":99,"status":14},"Certificates and reports","\u002Fapi\u002Fguides\u002Fcertificates-and-reports",{"title":101,"to":102,"status":14},"Build your own client","\u002Fapi\u002Fclients\u002Fbuild-your-own",[],{"id":105,"title":106,"links":107,"groups":123},"tutorials","Tutorials",[108,111,114,117,120],{"title":109,"to":110,"status":14},"Register and apply","\u002Fapi\u002Ftutorials\u002Fregister-and-apply",{"title":112,"to":113,"status":14},"Send a student to the olympiad's site","\u002Fapi\u002Ftutorials\u002Fsend-student-to-panel",{"title":115,"to":116,"status":14},"Change an application","\u002Fapi\u002Ftutorials\u002Fchange-an-application",{"title":118,"to":119,"status":14},"Collect results","\u002Fapi\u002Ftutorials\u002Fcollect-results",{"title":121,"to":122,"status":14},"Token handling","\u002Fapi\u002Ftutorials\u002Ftoken-handling",[],{"id":125,"title":126,"links":127,"groups":134},"reference","Reference",[128,131],{"title":129,"to":130},"All endpoints","\u002Fapi\u002Freference",{"title":132,"to":133},"Sandbox console","\u002Fapi\u002Fconsole",[135,144,154,163,187,227,233,251,282,298],{"tag":136,"slug":137,"links":138},"Health","health",[139],{"title":140,"to":141,"method":142,"deprecated":143},"Check that the API is up","\u002Fapi\u002Freference\u002Fget-health","GET",false,{"tag":77,"slug":145,"links":146},"api-account",[147,151],{"title":148,"to":149,"method":150,"deprecated":143},"Revoke the token you send, before it expires","\u002Fapi\u002Freference\u002Frevoke-token","POST",{"title":152,"to":153,"method":142,"deprecated":143},"Fetch the API account your token belongs to","\u002Fapi\u002Freference\u002Fget-current-api-account",{"tag":92,"slug":155,"links":156},"wallet",[157,160],{"title":158,"to":159,"method":142,"deprecated":143},"Read your wallet: credits granted, spent and remaining","\u002Fapi\u002Freference\u002Fget-wallet",{"title":161,"to":162,"method":142,"deprecated":143},"List your wallet history","\u002Fapi\u002Freference\u002Flist-wallet-entries",{"tag":74,"slug":164,"links":165},"reference-data",[166,169,172,175,178,181,184],{"title":167,"to":168,"method":142,"deprecated":143},"List the countries a student can be registered in","\u002Fapi\u002Freference\u002Flist-countries",{"title":170,"to":171,"method":142,"deprecated":143},"Fetch one country by its id","\u002Fapi\u002Freference\u002Fget-country",{"title":173,"to":174,"method":142,"deprecated":143},"List the subdivisions (states) of a country","\u002Fapi\u002Freference\u002Flist-country-subdivisions",{"title":176,"to":177,"method":142,"deprecated":143},"List the grades a student can be registered with","\u002Fapi\u002Freference\u002Flist-grades",{"title":179,"to":180,"method":142,"deprecated":143},"Fetch one grade by its id","\u002Fapi\u002Freference\u002Fget-grade",{"title":182,"to":183,"method":142,"deprecated":143},"List the organizations and their ids","\u002Fapi\u002Freference\u002Flist-organizations",{"title":185,"to":186,"method":142,"deprecated":143},"Fetch one organization by its id","\u002Fapi\u002Freference\u002Fget-organization",{"tag":62,"slug":188,"links":189},"students",[190,193,196,199,202,205,208,212,215,218,221,224],{"title":191,"to":192,"method":142,"deprecated":143},"List your students","\u002Fapi\u002Freference\u002Flist-students",{"title":194,"to":195,"method":150,"deprecated":143},"Register a student","\u002Fapi\u002Freference\u002Fregister-student",{"title":197,"to":198,"method":150,"deprecated":143},"Check a registration without registering the student","\u002Fapi\u002Freference\u002Fcheck-student-registration",{"title":200,"to":201,"method":150,"deprecated":143},"Register many students at once","\u002Fapi\u002Freference\u002Fcreate-student-import",{"title":203,"to":204,"method":142,"deprecated":143},"Follow a batch of students you sent","\u002Fapi\u002Freference\u002Fget-student-import",{"title":206,"to":207,"method":142,"deprecated":143},"Fetch one of your students","\u002Fapi\u002Freference\u002Fget-student",{"title":209,"to":210,"method":211,"deprecated":143},"Update one of your students","\u002Fapi\u002Freference\u002Fupdate-student","PUT",{"title":213,"to":214,"method":211,"deprecated":143},"Set the sign-in password of one of your students","\u002Fapi\u002Freference\u002Fset-student-password",{"title":216,"to":217,"method":142,"deprecated":143},"List your students who can use this organization","\u002Fapi\u002Freference\u002Flist-org-students",{"title":219,"to":220,"method":142,"deprecated":143},"Fetch one of your students, if they can use this organization","\u002Fapi\u002Freference\u002Fget-org-student",{"title":222,"to":223,"method":211,"deprecated":143},"Update one of your students and give them access to this organization","\u002Fapi\u002Freference\u002Fupdate-org-student",{"title":225,"to":226,"method":211,"deprecated":143},"Link one of your students to a supervisor on this organization","\u002Fapi\u002Freference\u002Flink-student-supervisor",{"tag":80,"slug":228,"links":229},"sign-in-links",[230],{"title":231,"to":232,"method":150,"deprecated":143},"Create a single-use sign-in link for one of your students","\u002Fapi\u002Freference\u002Fcreate-signin-link",{"tag":83,"slug":234,"links":235},"exams",[236,239,242,245,248],{"title":237,"to":238,"method":142,"deprecated":143},"List the exams open for applications","\u002Fapi\u002Freference\u002Flist-exams",{"title":240,"to":241,"method":142,"deprecated":143},"List an organization’s exam categories","\u002Fapi\u002Freference\u002Flist-exam-categories",{"title":243,"to":244,"method":142,"deprecated":143},"Fetch one exam category","\u002Fapi\u002Freference\u002Fget-exam-category",{"title":246,"to":247,"method":142,"deprecated":143},"List the exams one of your students can apply to","\u002Fapi\u002Freference\u002Flist-available-exams",{"title":249,"to":250,"method":142,"deprecated":143},"Fetch one exam that is open for applications","\u002Fapi\u002Freference\u002Fget-exam",{"tag":86,"slug":252,"links":253},"applications",[254,257,260,263,266,269,272,275,279],{"title":255,"to":256,"method":142,"deprecated":143},"List your students’ applications in this organization","\u002Fapi\u002Freference\u002Flist-applications",{"title":258,"to":259,"method":150,"deprecated":143},"Enter one of your students for an exam","\u002Fapi\u002Freference\u002Fcreate-application",{"title":261,"to":262,"method":142,"deprecated":143},"List your students’ applications for one exam","\u002Fapi\u002Freference\u002Flist-exam-applications",{"title":264,"to":265,"method":142,"deprecated":143},"List one of your students’ applications in this organization","\u002Fapi\u002Freference\u002Flist-student-applications",{"title":267,"to":268,"method":150,"deprecated":143},"Pay several applications from your wallet","\u002Fapi\u002Freference\u002Fpay-applications-from-wallet",{"title":270,"to":271,"method":142,"deprecated":143},"Fetch one of your students’ applications","\u002Fapi\u002Freference\u002Fget-application",{"title":273,"to":274,"method":211,"deprecated":143},"Move one of your students’ applications to another exam","\u002Fapi\u002Freference\u002Fmove-application",{"title":276,"to":277,"method":278,"deprecated":143},"Withdraw one of your students from an exam","\u002Fapi\u002Freference\u002Fdelete-application","DELETE",{"title":280,"to":281,"method":150,"deprecated":143},"Pay one application from your wallet","\u002Fapi\u002Freference\u002Fpay-application-from-wallet",{"tag":283,"slug":284,"links":285},"Documents","documents",[286,289,292,295],{"title":287,"to":288,"method":142,"deprecated":143},"Download a certificate file","\u002Fapi\u002Freference\u002Fdownload-certificate",{"title":290,"to":291,"method":142,"deprecated":143},"List one of your students’ released certificates","\u002Fapi\u002Freference\u002Flist-student-certificates",{"title":293,"to":294,"method":142,"deprecated":143},"Download a result report file","\u002Fapi\u002Freference\u002Fdownload-report",{"title":296,"to":297,"method":142,"deprecated":143},"List one of your students’ released result reports","\u002Fapi\u002Freference\u002Flist-student-reports",{"tag":95,"slug":299,"links":300},"group-challenges",[301,304,307,310,313,316,319,322,325],{"title":302,"to":303,"method":142,"deprecated":143},"List the group challenges an organization runs","\u002Fapi\u002Freference\u002Flist-group-challenges",{"title":305,"to":306,"method":142,"deprecated":143},"Fetch one group challenge","\u002Fapi\u002Freference\u002Fget-group-challenge",{"title":308,"to":309,"method":142,"deprecated":143},"List the groups your students are in for a group challenge","\u002Fapi\u002Freference\u002Flist-group-challenge-groups",{"title":311,"to":312,"method":142,"deprecated":143},"Fetch one group, with its steps and files","\u002Fapi\u002Freference\u002Fget-group-challenge-group",{"title":314,"to":315,"method":142,"deprecated":143},"List what has happened in one group","\u002Fapi\u002Freference\u002Flist-group-challenge-activity",{"title":317,"to":318,"method":150,"deprecated":143},"Send a group’s finished work for one of your students","\u002Fapi\u002Freference\u002Fsubmit-group-challenge-work",{"title":320,"to":321,"method":150,"deprecated":143},"Submit one step of a group for one of your students","\u002Fapi\u002Freference\u002Fsubmit-group-challenge-step",{"title":323,"to":324,"method":142,"deprecated":143},"List your students’ eligibility and groups for a group challenge","\u002Fapi\u002Freference\u002Flist-group-challenge-students",{"title":326,"to":327,"method":142,"deprecated":143},"Fetch one of your students’ eligibility and group for a group challenge","\u002Fapi\u002Freference\u002Fget-group-challenge-student",{"id":329,"title":330,"links":331,"groups":341},"agents","AI agents",[332,335,338],{"title":333,"to":334},"AI connections","\u002Fapi\u002Fmcp",{"title":336,"to":337},"What it can do","\u002Fapi\u002Fmcp\u002Ftools",{"title":339,"to":340},"Agent skills","\u002Fapi\u002Fskills",[],{"id":343,"title":344,"links":345,"groups":361},"help","Help",[346,349,352,355,358],{"title":347,"to":348,"status":14},"Glossary","\u002Fapi\u002Fglossary",{"title":350,"to":351,"status":14},"FAQ","\u002Fapi\u002Ffaq",{"title":353,"to":354,"status":14},"Troubleshooting","\u002Fapi\u002Ftroubleshooting",{"title":356,"to":357,"status":14},"Support","\u002Fapi\u002Fsupport",{"title":359,"to":360},"Changelog","\u002Fapi\u002Fchangelog",[],{"title":363,"version":364,"description":365,"baseUrl":366,"groups":367},"Main Team API","1.7.1","Register your students, enter them for exams, follow their applications, download their certificates and reports, and sign them in to an olympiad’s site.\n\nEvery operation except the health check needs a bearer token: a JWT you sign yourself with HS256 and your account’s `apiSecret`. Put your `apiKey` in both the `kid` header and the `sub` claim, and set `iat` and `exp` at most 3600 seconds apart. Every authentication failure answers the same `401 unauthorized`.","https:\u002F\u002Fapi.main-team.org",[368,379,394,408,449,514,522,552,602,627],{"tag":136,"slug":137,"description":369,"guide":17,"operations":370},"Whether the API is up. No token needed, so it is the first call to make against an environment.",[371],{"operationId":372,"slug":373,"method":142,"path":374,"tag":136,"summary":140,"deprecated":143,"public":375,"permission":376,"scope":377,"order":378},"getHealth","get-health","\u002Fv1\u002Fhealth",true,null,"public",1,{"tag":77,"slug":145,"description":380,"guide":78,"operations":381},"The account your token belongs to, and revoking a token before it expires.",[382,389],{"operationId":383,"slug":384,"method":150,"path":385,"tag":77,"summary":148,"deprecated":143,"public":143,"permission":386,"scope":387,"order":388},"revokeToken","revoke-token","\u002Fv1\u002Fapi-account\u002Frevoke-token","api\u002F*:$org:$ID","flat",2,{"operationId":390,"slug":391,"method":142,"path":392,"tag":77,"summary":152,"deprecated":143,"public":143,"permission":386,"scope":387,"order":393},"getCurrentApiAccount","get-current-api-account","\u002Fv1\u002Fapi-account\u002Fvalidate-me",3,{"tag":92,"slug":155,"description":395,"guide":93,"operations":396},"The credits Main Team gave you, for each olympiad, and the history of every credit added and spent. One credit pays one priced application; the payment operations are under Applications.",[397,403],{"operationId":398,"slug":399,"method":142,"path":400,"tag":92,"summary":158,"deprecated":143,"public":143,"permission":401,"scope":387,"order":402},"getWallet","get-wallet","\u002Fv1\u002Fwallet","wallet\u002Fread:$org:$ID",4,{"operationId":404,"slug":405,"method":142,"path":406,"tag":92,"summary":161,"deprecated":143,"public":143,"permission":401,"scope":387,"order":407},"listWalletEntries","list-wallet-entries","\u002Fv1\u002Fwallet\u002Fentries",5,{"tag":74,"slug":164,"description":409,"guide":75,"operations":410},"Countries, grades and organizations. A student’s `country` and `grade` take these `_id`s, and so does every `:organizationId` in a path.",[411,417,422,427,433,438,444],{"operationId":412,"slug":413,"method":142,"path":414,"tag":74,"summary":167,"deprecated":143,"public":143,"permission":415,"scope":387,"order":416},"listCountries","list-countries","\u002Fv1\u002Fcountry","country\u002Fread:$org:$ID",6,{"operationId":418,"slug":419,"method":142,"path":420,"tag":74,"summary":170,"deprecated":143,"public":143,"permission":415,"scope":387,"order":421},"getCountry","get-country","\u002Fv1\u002Fcountry\u002F{id}",7,{"operationId":423,"slug":424,"method":142,"path":425,"tag":74,"summary":173,"deprecated":143,"public":143,"permission":415,"scope":387,"order":426},"listCountrySubdivisions","list-country-subdivisions","\u002Fv1\u002Fcountry\u002F{id}\u002Fsubdivision",8,{"operationId":428,"slug":429,"method":142,"path":430,"tag":74,"summary":176,"deprecated":143,"public":143,"permission":431,"scope":387,"order":432},"listGrades","list-grades","\u002Fv1\u002Fgrade","grade\u002Fread:$org:$ID",9,{"operationId":434,"slug":435,"method":142,"path":436,"tag":74,"summary":179,"deprecated":143,"public":143,"permission":431,"scope":387,"order":437},"getGrade","get-grade","\u002Fv1\u002Fgrade\u002F{id}",10,{"operationId":439,"slug":440,"method":142,"path":441,"tag":74,"summary":182,"deprecated":143,"public":143,"permission":442,"scope":387,"order":443},"listOrganizations","list-organizations","\u002Fv1\u002Forganization","organization\u002Fread:$org:$ID",11,{"operationId":445,"slug":446,"method":142,"path":447,"tag":74,"summary":185,"deprecated":143,"public":143,"permission":442,"scope":387,"order":448},"getOrganization","get-organization","\u002Fv1\u002Forganization\u002F{id}",12,{"tag":62,"slug":188,"description":450,"guide":63,"operations":451},"Registering your students, reading and updating them, setting a password, and what each organization holds for them. You only ever see the students your account registered.",[452,458,463,468,473,478,483,488,494,500,505,509],{"operationId":453,"slug":454,"method":142,"path":455,"tag":62,"summary":191,"deprecated":143,"public":143,"permission":456,"scope":387,"order":457},"listStudents","list-students","\u002Fv1\u002Fstudent","student\u002Fread:$org:$ID",13,{"operationId":459,"slug":460,"method":150,"path":455,"tag":62,"summary":194,"deprecated":143,"public":143,"permission":461,"scope":387,"order":462},"registerStudent","register-student","student\u002Fcreate:$org:$ID",14,{"operationId":464,"slug":465,"method":150,"path":466,"tag":62,"summary":197,"deprecated":143,"public":143,"permission":461,"scope":387,"order":467},"checkStudentRegistration","check-student-registration","\u002Fv1\u002Fstudent\u002Fcheck",15,{"operationId":469,"slug":470,"method":150,"path":471,"tag":62,"summary":200,"deprecated":143,"public":143,"permission":461,"scope":387,"order":472},"createStudentImport","create-student-import","\u002Fv1\u002Fstudent\u002Fimport",16,{"operationId":474,"slug":475,"method":142,"path":476,"tag":62,"summary":203,"deprecated":143,"public":143,"permission":461,"scope":387,"order":477},"getStudentImport","get-student-import","\u002Fv1\u002Fstudent\u002Fimport\u002F{importId}",17,{"operationId":479,"slug":480,"method":142,"path":481,"tag":62,"summary":206,"deprecated":143,"public":143,"permission":456,"scope":387,"order":482},"getStudent","get-student","\u002Fv1\u002Fstudent\u002F{studentId}",18,{"operationId":484,"slug":485,"method":211,"path":481,"tag":62,"summary":209,"deprecated":143,"public":143,"permission":486,"scope":387,"order":487},"updateStudent","update-student","student\u002Fupdate:$org:$ID",19,{"operationId":489,"slug":490,"method":211,"path":491,"tag":62,"summary":213,"deprecated":143,"public":143,"permission":492,"scope":387,"order":493},"setStudentPassword","set-student-password","\u002Fv1\u002Fstudent\u002F{studentId}\u002Fpassword","auth\u002Fsignin:$org:$ID",20,{"operationId":495,"slug":496,"method":142,"path":497,"tag":62,"summary":216,"deprecated":143,"public":143,"permission":456,"scope":498,"order":499},"listOrgStudents","list-org-students","\u002Fv1\u002F{organizationId}\u002Fstudent","organization",21,{"operationId":501,"slug":502,"method":142,"path":503,"tag":62,"summary":219,"deprecated":143,"public":143,"permission":456,"scope":498,"order":504},"getOrgStudent","get-org-student","\u002Fv1\u002F{organizationId}\u002Fstudent\u002F{studentId}",22,{"operationId":506,"slug":507,"method":211,"path":503,"tag":62,"summary":222,"deprecated":143,"public":143,"permission":486,"scope":498,"order":508},"updateOrgStudent","update-org-student",23,{"operationId":510,"slug":511,"method":211,"path":512,"tag":62,"summary":225,"deprecated":143,"public":143,"permission":486,"scope":498,"order":513},"linkStudentSupervisor","link-student-supervisor","\u002Fv1\u002F{organizationId}\u002Fstudent\u002F{studentId}\u002Fsupervisor",24,{"tag":80,"slug":228,"description":515,"guide":81,"operations":516},"Links that sign one of your students into an olympiad’s site. Each works once and expires two minutes after it is issued.",[517],{"operationId":518,"slug":519,"method":150,"path":520,"tag":80,"summary":231,"deprecated":143,"public":143,"permission":492,"scope":498,"order":521},"createSigninLink","create-signin-link","\u002Fv1\u002F{organizationId}\u002Fauth\u002Fsignin",25,{"tag":83,"slug":234,"description":523,"guide":84,"operations":524},"The exam categories and exams an organization runs, and the ones one of your students can apply to.",[525,531,537,542,547],{"operationId":526,"slug":527,"method":142,"path":528,"tag":83,"summary":237,"deprecated":143,"public":143,"permission":529,"scope":498,"order":530},"listExams","list-exams","\u002Fv1\u002F{organizationId}\u002Fexam","exam\u002Fread:$org:$ID",26,{"operationId":532,"slug":533,"method":142,"path":534,"tag":83,"summary":240,"deprecated":143,"public":143,"permission":535,"scope":498,"order":536},"listExamCategories","list-exam-categories","\u002Fv1\u002F{organizationId}\u002Fexam-category","exam-category\u002Fread:$org:$ID",27,{"operationId":538,"slug":539,"method":142,"path":540,"tag":83,"summary":243,"deprecated":143,"public":143,"permission":535,"scope":498,"order":541},"getExamCategory","get-exam-category","\u002Fv1\u002F{organizationId}\u002Fexam-category\u002F{categoryId}",28,{"operationId":543,"slug":544,"method":142,"path":545,"tag":83,"summary":246,"deprecated":143,"public":143,"permission":529,"scope":498,"order":546},"listAvailableExams","list-available-exams","\u002Fv1\u002F{organizationId}\u002Fexam\u002Favailable\u002F{studentId}",29,{"operationId":548,"slug":549,"method":142,"path":550,"tag":83,"summary":249,"deprecated":143,"public":143,"permission":529,"scope":498,"order":551},"getExam","get-exam","\u002Fv1\u002F{organizationId}\u002Fexam\u002F{examId}",30,{"tag":86,"slug":252,"description":553,"guide":87,"operations":554},"Entering your students for exams: creating, reading, moving and deleting their applications, and paying them from your wallet.",[555,561,566,571,576,582,587,592,597],{"operationId":556,"slug":557,"method":142,"path":558,"tag":86,"summary":255,"deprecated":143,"public":143,"permission":559,"scope":498,"order":560},"listApplications","list-applications","\u002Fv1\u002F{organizationId}\u002Fapplication","application\u002Fread:$org:$ID",31,{"operationId":562,"slug":563,"method":150,"path":558,"tag":86,"summary":258,"deprecated":143,"public":143,"permission":564,"scope":498,"order":565},"createApplication","create-application","application\u002Fcreate:$org:$ID",32,{"operationId":567,"slug":568,"method":142,"path":569,"tag":86,"summary":261,"deprecated":143,"public":143,"permission":559,"scope":498,"order":570},"listExamApplications","list-exam-applications","\u002Fv1\u002F{organizationId}\u002Fapplication\u002Fexam-applications\u002F{examId}",33,{"operationId":572,"slug":573,"method":142,"path":574,"tag":86,"summary":264,"deprecated":143,"public":143,"permission":559,"scope":498,"order":575},"listStudentApplications","list-student-applications","\u002Fv1\u002F{organizationId}\u002Fapplication\u002Fstudent-applications\u002F{studentId}",34,{"operationId":577,"slug":578,"method":150,"path":579,"tag":86,"summary":267,"deprecated":143,"public":143,"permission":580,"scope":498,"order":581},"payApplicationsFromWallet","pay-applications-from-wallet","\u002Fv1\u002F{organizationId}\u002Fapplication\u002Fwallet-pay","application\u002Fpay:$org:$ID",35,{"operationId":583,"slug":584,"method":142,"path":585,"tag":86,"summary":270,"deprecated":143,"public":143,"permission":559,"scope":498,"order":586},"getApplication","get-application","\u002Fv1\u002F{organizationId}\u002Fapplication\u002F{applicationId}",36,{"operationId":588,"slug":589,"method":211,"path":585,"tag":86,"summary":273,"deprecated":143,"public":143,"permission":590,"scope":498,"order":591},"moveApplication","move-application","application\u002Fupdate:$org:$ID",37,{"operationId":593,"slug":594,"method":278,"path":585,"tag":86,"summary":276,"deprecated":143,"public":143,"permission":595,"scope":498,"order":596},"deleteApplication","delete-application","application\u002Fdelete:$org:$ID",38,{"operationId":598,"slug":599,"method":150,"path":600,"tag":86,"summary":280,"deprecated":143,"public":143,"permission":580,"scope":498,"order":601},"payApplicationFromWallet","pay-application-from-wallet","\u002Fv1\u002F{organizationId}\u002Fapplication\u002F{applicationId}\u002Fwallet-pay",39,{"tag":283,"slug":284,"description":603,"guide":99,"operations":604},"Your students’ certificates and reports: listing them and downloading the files.",[605,611,616,622],{"operationId":606,"slug":607,"method":142,"path":608,"tag":283,"summary":287,"deprecated":143,"public":143,"permission":609,"scope":498,"order":610},"downloadCertificate","download-certificate","\u002Fv1\u002F{organizationId}\u002Fcertificate\u002Fdownload\u002F{certificateId}","certificate\u002Fread:$org:$ID",40,{"operationId":612,"slug":613,"method":142,"path":614,"tag":283,"summary":290,"deprecated":143,"public":143,"permission":609,"scope":498,"order":615},"listStudentCertificates","list-student-certificates","\u002Fv1\u002F{organizationId}\u002Fcertificate\u002F{userId}",41,{"operationId":617,"slug":618,"method":142,"path":619,"tag":283,"summary":293,"deprecated":143,"public":143,"permission":620,"scope":498,"order":621},"downloadReport","download-report","\u002Fv1\u002F{organizationId}\u002Freport\u002Fdownload\u002F{reportId}","report\u002Fread:$org:$ID",42,{"operationId":623,"slug":624,"method":142,"path":625,"tag":283,"summary":296,"deprecated":143,"public":143,"permission":620,"scope":498,"order":626},"listStudentReports","list-student-reports","\u002Fv1\u002F{organizationId}\u002Freport\u002F{userId}",43,{"tag":95,"slug":299,"description":628,"guide":96,"operations":629},"Online group challenges your students take part in: the challenges, which of your students can join, the groups they are in, each step and its files, what happened in a group, and submitting on your student’s behalf.",[630,636,641,646,651,656,662,667,672],{"operationId":631,"slug":632,"method":142,"path":633,"tag":95,"summary":302,"deprecated":143,"public":143,"permission":634,"scope":498,"order":635},"listGroupChallenges","list-group-challenges","\u002Fv1\u002F{organizationId}\u002Fgroup-challenge","group-challenge\u002Fread:$org:$ID",44,{"operationId":637,"slug":638,"method":142,"path":639,"tag":95,"summary":305,"deprecated":143,"public":143,"permission":634,"scope":498,"order":640},"getGroupChallenge","get-group-challenge","\u002Fv1\u002F{organizationId}\u002Fgroup-challenge\u002F{challengeId}",45,{"operationId":642,"slug":643,"method":142,"path":644,"tag":95,"summary":308,"deprecated":143,"public":143,"permission":634,"scope":498,"order":645},"listGroupChallengeGroups","list-group-challenge-groups","\u002Fv1\u002F{organizationId}\u002Fgroup-challenge\u002F{challengeId}\u002Fgroup",46,{"operationId":647,"slug":648,"method":142,"path":649,"tag":95,"summary":311,"deprecated":143,"public":143,"permission":634,"scope":498,"order":650},"getGroupChallengeGroup","get-group-challenge-group","\u002Fv1\u002F{organizationId}\u002Fgroup-challenge\u002F{challengeId}\u002Fgroup\u002F{groupId}",47,{"operationId":652,"slug":653,"method":142,"path":654,"tag":95,"summary":314,"deprecated":143,"public":143,"permission":634,"scope":498,"order":655},"listGroupChallengeActivity","list-group-challenge-activity","\u002Fv1\u002F{organizationId}\u002Fgroup-challenge\u002F{challengeId}\u002Fgroup\u002F{groupId}\u002Factivity",48,{"operationId":657,"slug":658,"method":150,"path":659,"tag":95,"summary":317,"deprecated":143,"public":143,"permission":660,"scope":498,"order":661},"submitGroupChallengeWork","submit-group-challenge-work","\u002Fv1\u002F{organizationId}\u002Fgroup-challenge\u002F{challengeId}\u002Fgroup\u002F{groupId}\u002Ffinal-submit","group-challenge\u002Fsubmit:$org:$ID",49,{"operationId":663,"slug":664,"method":150,"path":665,"tag":95,"summary":320,"deprecated":143,"public":143,"permission":660,"scope":498,"order":666},"submitGroupChallengeStep","submit-group-challenge-step","\u002Fv1\u002F{organizationId}\u002Fgroup-challenge\u002F{challengeId}\u002Fgroup\u002F{groupId}\u002Fstep\u002F{stepId}\u002Fsubmit",50,{"operationId":668,"slug":669,"method":142,"path":670,"tag":95,"summary":323,"deprecated":143,"public":143,"permission":634,"scope":498,"order":671},"listGroupChallengeStudents","list-group-challenge-students","\u002Fv1\u002F{organizationId}\u002Fgroup-challenge\u002F{challengeId}\u002Fstudent",51,{"operationId":673,"slug":674,"method":142,"path":675,"tag":95,"summary":326,"deprecated":143,"public":143,"permission":634,"scope":498,"order":676},"getGroupChallengeStudent","get-group-challenge-student","\u002Fv1\u002F{organizationId}\u002Fgroup-challenge\u002F{challengeId}\u002Fstudent\u002F{studentId}",52,{"operationId":398,"slug":399,"method":142,"path":400,"tag":92,"summary":158,"deprecated":143,"public":143,"permission":401,"scope":387,"order":402,"description":678,"permissions":679,"errors":680,"guide":376,"parameters":703,"requestBody":376,"responses":704,"successStatus":953,"kind":954,"paginated":143,"baseUrl":366,"tagDescription":395,"sandbox":375},"The wallet is not self-service: Main Team opens it only after an agreement and on your request (ask your Main Team contact or info@main-team.org), and Main Team then tells you how many credits you have for each olympiad. Without one this answers `403` `wallet_not_enabled`; bank transfer stays the default way to pay.\n\nYour wallet holds the credits Main Team gave you, counted separately for each olympiad. A credit is a convenience: the application is marked paid at once, and the amount is still due to Main Team and settled afterwards by bank transfer. One credit pays one priced application (`createApplication` with `walletPay`, `payApplicationFromWallet`, `payApplicationsFromWallet`); a free exam never uses one.\n\nThe answer lists every olympiad, zeros included, with `granted`, `spent`, `remaining` and what the spent credits paid for in cents of that organization’s `currency` (`USD` for neo, `EUR` otherwise), plus credit `totals`. Money is never summed across currencies.\n\nA wallet that is closed still answers, with `enabled: false`, so its history stays readable. An account that never had one answers `403` `wallet_not_enabled`.",[401],[681,685,690,695,699],{"code":682,"status":683,"when":684},"unauthorized",401,"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.",{"code":686,"message":687,"status":688,"when":689},"forbidden","Insufficient role permissions",403,"The token is valid, but no role on your account allows `wallet\u002Fread` on `mto` (the target of operations without `:organizationId` in their path), or a role denies it.",{"code":686,"details":691,"message":693,"status":688,"when":694},{"reason":692},"wallet_not_enabled","No wallet is enabled for your account. Ask your Main Team contact to open one.","Your account has no wallet, or it is closed. A wallet is not self-service: Main Team opens it only after an agreement and on your request (ask your Main Team contact or info@main-team.org). `error.details.reason` is `wallet_not_enabled`.",{"code":696,"status":697,"when":698},"too_many_requests",429,"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.",{"code":700,"status":701,"when":702},"internal_error",500,"Something failed on our side. Retry later, and quote `request_id` if it goes on.",[],{"200":705,"401":832,"403":880,"429":905,"500":931},{"content":706,"description":820,"headers":821},{"application\u002Fjson":707},{"schema":708},{"allOf":709},[710,750],{"x-ref":711,"description":712,"properties":713,"required":747,"type":745},"#\u002Fcomponents\u002Fschemas\u002FSuccessEnvelope","How every successful JSON response is wrapped. `data` is the result, and each operation declares its shape; list operations add `pagination`. `GET \u002Fv1\u002Fapi-account\u002Fvalidate-me` is the one operation that answers without this envelope.",{"success":714,"message":718,"pagination":722},{"description":715,"enum":716,"example":375,"type":717},"Always `true` on a success.",[375],"boolean",{"description":719,"example":720,"type":721},"A sentence saying what happened, written for a person. Branch on the status and on `data`, not on this.","Request completed successfully.","string",{"allOf":723,"description":746},[724],{"x-ref":725,"description":726,"properties":727,"required":740,"type":745},"#\u002Fcomponents\u002Fschemas\u002FPaginationMeta","Where one page sits in the whole list.",{"page":728,"limit":731,"total":734,"totalPages":738},{"description":729,"example":378,"minimum":378,"type":730},"The page returned, counting from 1.","number",{"description":732,"example":493,"maximum":733,"minimum":378,"type":730},"Items per page: the `limit` you sent, 20 if you sent none, and never more than 100.",100,{"description":735,"example":736,"minimum":737,"type":730},"Items across every page.",57,0,{"description":739,"example":393,"minimum":737,"type":730},"Pages at this `limit`: `total \u002F limit`, rounded up.",[741,742,743,744],"page","limit","total","totalPages","object","On list operations only.",[748,749],"success","message",{"properties":751,"required":818,"type":745},{"message":752,"data":754},{"example":753,"type":721},"Wallet fetched successfully.",{"x-ref":755,"description":756,"properties":757,"required":814,"type":745},"#\u002Fcomponents\u002Fschemas\u002FWalletResponse","Your wallet: the credits Main Team gave you, how many you spent and how many remain, for each olympiad.",{"enabled":758,"enabledAt":760,"organizations":764,"totals":798},{"description":759,"example":375,"type":717},"`false` while the wallet is closed. A closed wallet can still be read, but pays nothing.",{"description":761,"example":762,"format":763,"nullable":375,"type":721},"When it was switched on.","2026-09-01T09:30:00.000Z","date-time",{"description":765,"items":766,"type":797},"One entry per organization, zeros included.",{"x-ref":767,"description":768,"properties":769,"required":790,"type":745},"#\u002Fcomponents\u002Fschemas\u002FWalletOrganizationResponse","One organization’s credits in your wallet.",{"organization":770,"organizationId":773,"currency":776,"granted":781,"spent":783,"remaining":785,"spentAmount":787},{"description":771,"example":772,"type":721},"The organization’s slug.","stem",{"description":774,"example":775,"type":721},"The organization’s `_id`, as `:organizationId` takes it.","64b7f0c2a1d3e4f5a6b7c8d9",{"description":777,"enum":778,"example":779,"type":721},"The currency this organization charges in, and so what `spentAmount` is counted in: `USD` for neo, `EUR` for the others.",[779,780],"EUR","USD",{"description":782,"example":666,"type":730},"Credits granted to your account for this organization, in total.",{"description":784,"example":432,"type":730},"Credits spent so far: one per paid application.",{"description":786,"example":615,"type":730},"`granted` minus `spent`: what you can still spend.",{"description":788,"example":789,"type":730},"What the spent credits paid for, in cents of `currency` (a coding application at the bundle price counts what it was settled at).",45000,[498,791,792,793,794,795,796],"organizationId","currency","granted","spent","remaining","spentAmount","array",{"allOf":799,"description":813},[800],{"x-ref":801,"description":802,"properties":803,"required":812,"type":745},"#\u002Fcomponents\u002Fschemas\u002FWalletTotalsResponse","Credit totals across the organizations. Credits only: money is never summed across currencies.",{"granted":804,"spent":807,"remaining":809},{"description":805,"example":806,"type":730},"Credits granted, all organizations.",120,{"description":808,"example":487,"type":730},"Credits spent, all organizations.",{"description":810,"example":811,"type":730},"Credits left, all organizations.",101,[793,794,795],"The credit totals across the organizations.",[815,816,817],"enabled","organizations","totals",[819],"data","Success: `message` is \"Wallet fetched successfully.\".",{"X-RateLimit-Limit":822,"X-RateLimit-Remaining":826,"X-RateLimit-Reset":829},{"description":823,"schema":824},"Requests your account may make to this operation per window (100).",{"type":825},"integer",{"description":827,"schema":828},"Requests left in the current window.",{"type":825},{"description":830,"schema":831},"Seconds until the current window ends.",{"type":825},{"content":833,"description":879},{"application\u002Fjson":834},{"examples":835,"schema":842},{"unauthorized":836},{"summary":682,"value":837},{"error":838},{"code":682,"documentation_url":839,"message":840,"request_id":841},"https:\u002F\u002Fhub.main-team.org\u002Fapi\u002Ferrors#unauthorized","Authentication is required or the provided credentials are invalid.","0b5c6d0e-8f7a-4b1c-9d2e-3f4a5b6c7d8e",{"x-ref":843,"description":844,"properties":845,"required":877,"type":745},"#\u002Fcomponents\u002Fschemas\u002FErrorEnvelope","How every error response is wrapped.",{"error":846},{"x-ref":847,"description":848,"properties":849,"required":873,"type":745},"#\u002Fcomponents\u002Fschemas\u002FErrorDetail","What went wrong.",{"code":850,"message":862,"documentation_url":865,"request_id":869,"details":871},{"description":851,"enum":852,"example":856,"type":721},"A stable machine code: branch on this. Each one is explained at `documentation_url`.",[853,854,855,682,686,856,857,858,859,860,696,700,861],"invalid_email","bad_request","subdivision_required","not_found","conflict","payload_too_large","unsupported_media_type","unprocessable_entity","service_unavailable",{"description":863,"example":864,"type":721},"Written for a person, and may change: never branch on it.","Not found!",{"description":866,"example":867,"format":868,"type":721},"Where this code is explained.","https:\u002F\u002Fhub.main-team.org\u002Fapi\u002Ferrors#not_found","uri",{"description":870,"example":841,"type":721},"This request’s id, also sent as the `X-Request-Id` response header: the one you sent, when it was acceptable, or else one the API made. Quote it when you report a problem.",{"additionalProperties":375,"description":872,"type":745},"Present 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 `details` you do not recognise.",[874,749,875,876],"code","documentation_url","request_id",[878],"error","`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.",{"content":881,"description":904},{"application\u002Fjson":882},{"examples":883,"schema":892},{"forbidden":884,"forbidden_2":888},{"summary":689,"value":885},{"error":886},{"code":686,"documentation_url":887,"message":687,"request_id":841},"https:\u002F\u002Fhub.main-team.org\u002Fapi\u002Ferrors#forbidden",{"summary":694,"value":889},{"error":890},{"code":686,"details":891,"documentation_url":887,"message":693,"request_id":841},{"reason":692},{"x-ref":843,"description":844,"properties":893,"required":903,"type":745},{"error":894},{"x-ref":847,"description":848,"properties":895,"required":902,"type":745},{"code":896,"message":898,"documentation_url":899,"request_id":900,"details":901},{"description":851,"enum":897,"example":856,"type":721},[853,854,855,682,686,856,857,858,859,860,696,700,861],{"description":863,"example":864,"type":721},{"description":866,"example":867,"format":868,"type":721},{"description":870,"example":841,"type":721},{"additionalProperties":375,"description":872,"type":745},[874,749,875,876],[878],"- `forbidden`: The token is valid, but no role on your account allows `wallet\u002Fread` on `mto` (the target of operations without `:organizationId` in their path), or a role denies it.\n- `forbidden`: Your account has no wallet, or it is closed. A wallet is not self-service: Main Team opens it only after an agreement and on your request (ask your Main Team contact or info@main-team.org). `error.details.reason` is `wallet_not_enabled`.",{"content":906,"description":926,"headers":927},{"application\u002Fjson":907},{"examples":908,"schema":914},{"too_many_requests":909},{"summary":696,"value":910},{"error":911},{"code":696,"documentation_url":912,"message":913,"request_id":841},"https:\u002F\u002Fhub.main-team.org\u002Fapi\u002Ferrors#too_many_requests","Too many requests to this operation. Wait the number of seconds in Retry-After, then try again.",{"x-ref":843,"description":844,"properties":915,"required":925,"type":745},{"error":916},{"x-ref":847,"description":848,"properties":917,"required":924,"type":745},{"code":918,"message":920,"documentation_url":921,"request_id":922,"details":923},{"description":851,"enum":919,"example":856,"type":721},[853,854,855,682,686,856,857,858,859,860,696,700,861],{"description":863,"example":864,"type":721},{"description":866,"example":867,"format":868,"type":721},{"description":870,"example":841,"type":721},{"additionalProperties":375,"description":872,"type":745},[874,749,875,876],[878],"`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.",{"Retry-After":928},{"description":929,"schema":930},"Seconds to wait before sending again; a request sent sooner is refused too.",{"type":825},{"content":932,"description":952},{"application\u002Fjson":933},{"examples":934,"schema":940},{"internal_error":935},{"summary":700,"value":936},{"error":937},{"code":700,"documentation_url":938,"message":939,"request_id":841},"https:\u002F\u002Fhub.main-team.org\u002Fapi\u002Ferrors#internal_error","An unexpected error occurred.",{"x-ref":843,"description":844,"properties":941,"required":951,"type":745},{"error":942},{"x-ref":847,"description":848,"properties":943,"required":950,"type":745},{"code":944,"message":946,"documentation_url":947,"request_id":948,"details":949},{"description":851,"enum":945,"example":856,"type":721},[853,854,855,682,686,856,857,858,859,860,696,700,861],{"description":863,"example":864,"type":721},{"description":866,"example":867,"format":868,"type":721},{"description":870,"example":841,"type":721},{"additionalProperties":375,"description":872,"type":745},[874,749,875,876],[878],"`internal_error`: Something failed on our side. Retry later, and quote `request_id` if it goes on.","200","envelope",{"path":26},{"id":957,"title":158,"apiPath":400,"body":958,"deprecated":143,"description":1490,"extension":1491,"meta":1492,"method":142,"navigation":375,"operationId":398,"order":1493,"path":159,"permission":401,"public":143,"seo":1494,"stem":1495,"summary":158,"tag":92,"__hash__":1496},"apiReference\u002Fapi\u002Freference\u002Fget-wallet.md",{"type":959,"value":960,"toc":1488},"minimark",[961,1484],[962,963,964,1014,1207],"api-code-group",{},[965,966,972],"pre",{"className":967,"code":968,"filename":969,"language":970,"meta":971,"style":971},"language-bash shiki shiki-themes github-light-high-contrast github-dark-high-contrast","# $TOKEN: a short-lived token you minted with your API key and secret\ncurl -sS 'https:\u002F\u002Fapi.main-team.org\u002Fv1\u002Fwallet' \\\n  -H \"Authorization: Bearer $TOKEN\"\n","curl","bash","",[874,973,974,982,999],{"__ignoreMap":971},[975,976,978],"span",{"class":977,"line":378},"line",[975,979,981],{"class":980},"sLBg1","# $TOKEN: a short-lived token you minted with your API key and secret\n",[975,983,984,987,991,995],{"class":977,"line":388},[975,985,969],{"class":986},"soyes",[975,988,990],{"class":989},"s-5SL"," -sS",[975,992,994],{"class":993},"sT6z2"," 'https:\u002F\u002Fapi.main-team.org\u002Fv1\u002Fwallet'",[975,996,998],{"class":997},"sHUrx"," \\\n",[975,1000,1001,1004,1007,1011],{"class":977,"line":393},[975,1002,1003],{"class":989},"  -H",[975,1005,1006],{"class":993}," \"Authorization: Bearer ",[975,1008,1010],{"class":1009},"suds8","$TOKEN",[975,1012,1013],{"class":993},"\"\n",[965,1015,1020],{"className":1016,"code":1017,"filename":1018,"language":1019,"meta":971,"style":971},"language-js shiki shiki-themes github-light-high-contrast github-dark-high-contrast","const token = process.env.TOKEN; \u002F\u002F a short-lived token you minted with your API key and secret\n\nconst res = await fetch('https:\u002F\u002Fapi.main-team.org\u002Fv1\u002Fwallet', {\n  headers: {\n    Authorization: `Bearer ${token}`,\n  },\n});\nconst body = await res.json();\nif (!res.ok) throw new Error(`${res.status} ${body.error.code}: ${body.error.message}`);\nconsole.log(body.data);\n","Node.js","js",[874,1021,1022,1045,1050,1075,1080,1097,1102,1107,1127,1196],{"__ignoreMap":971},[975,1023,1024,1027,1030,1033,1036,1039,1042],{"class":977,"line":378},[975,1025,1026],{"class":997},"const",[975,1028,1029],{"class":989}," token",[975,1031,1032],{"class":997}," =",[975,1034,1035],{"class":1009}," process.env.",[975,1037,1038],{"class":989},"TOKEN",[975,1040,1041],{"class":1009},"; ",[975,1043,1044],{"class":980},"\u002F\u002F a short-lived token you minted with your API key and secret\n",[975,1046,1047],{"class":977,"line":388},[975,1048,1049],{"emptyLinePlaceholder":375},"\n",[975,1051,1052,1054,1057,1059,1062,1066,1069,1072],{"class":977,"line":393},[975,1053,1026],{"class":997},[975,1055,1056],{"class":989}," res",[975,1058,1032],{"class":997},[975,1060,1061],{"class":997}," await",[975,1063,1065],{"class":1064},"sKwhi"," fetch",[975,1067,1068],{"class":1009},"(",[975,1070,1071],{"class":993},"'https:\u002F\u002Fapi.main-team.org\u002Fv1\u002Fwallet'",[975,1073,1074],{"class":1009},", {\n",[975,1076,1077],{"class":977,"line":402},[975,1078,1079],{"class":1009},"  headers: {\n",[975,1081,1082,1085,1088,1091,1094],{"class":977,"line":407},[975,1083,1084],{"class":1009},"    Authorization: ",[975,1086,1087],{"class":993},"`Bearer ${",[975,1089,1090],{"class":1009},"token",[975,1092,1093],{"class":993},"}`",[975,1095,1096],{"class":1009},",\n",[975,1098,1099],{"class":977,"line":416},[975,1100,1101],{"class":1009},"  },\n",[975,1103,1104],{"class":977,"line":421},[975,1105,1106],{"class":1009},"});\n",[975,1108,1109,1111,1114,1116,1118,1121,1124],{"class":977,"line":426},[975,1110,1026],{"class":997},[975,1112,1113],{"class":989}," body",[975,1115,1032],{"class":997},[975,1117,1061],{"class":997},[975,1119,1120],{"class":1009}," res.",[975,1122,1123],{"class":1064},"json",[975,1125,1126],{"class":1009},"();\n",[975,1128,1129,1132,1135,1138,1141,1144,1147,1150,1152,1155,1158,1161,1164,1167,1170,1172,1174,1176,1178,1181,1183,1185,1187,1189,1191,1193],{"class":977,"line":432},[975,1130,1131],{"class":997},"if",[975,1133,1134],{"class":1009}," (",[975,1136,1137],{"class":997},"!",[975,1139,1140],{"class":1009},"res.ok) ",[975,1142,1143],{"class":997},"throw",[975,1145,1146],{"class":997}," new",[975,1148,1149],{"class":1064}," Error",[975,1151,1068],{"class":1009},[975,1153,1154],{"class":993},"`${",[975,1156,1157],{"class":1009},"res",[975,1159,1160],{"class":993},".",[975,1162,1163],{"class":1009},"status",[975,1165,1166],{"class":993},"} ${",[975,1168,1169],{"class":1009},"body",[975,1171,1160],{"class":993},[975,1173,878],{"class":1009},[975,1175,1160],{"class":993},[975,1177,874],{"class":1009},[975,1179,1180],{"class":993},"}: ${",[975,1182,1169],{"class":1009},[975,1184,1160],{"class":993},[975,1186,878],{"class":1009},[975,1188,1160],{"class":993},[975,1190,749],{"class":1009},[975,1192,1093],{"class":993},[975,1194,1195],{"class":1009},");\n",[975,1197,1198,1201,1204],{"class":977,"line":437},[975,1199,1200],{"class":1009},"console.",[975,1202,1203],{"class":1064},"log",[975,1205,1206],{"class":1009},"(body.data);\n",[965,1208,1213],{"className":1209,"code":1210,"filename":1211,"language":1212,"meta":971,"style":971},"language-php shiki shiki-themes github-light-high-contrast github-dark-high-contrast","\u003C?php\n$token = getenv('TOKEN'); \u002F\u002F a short-lived token you minted with your API key and secret\n\n$ch = curl_init('https:\u002F\u002Fapi.main-team.org\u002Fv1\u002Fwallet');\ncurl_setopt_array($ch, [\n    CURLOPT_HTTPHEADER => [\n        'Authorization: Bearer ' . $token,\n    ],\n    CURLOPT_RETURNTRANSFER => true,\n]);\n$response = curl_exec($ch);\nif ($response === false) {\n    throw new RuntimeException(curl_error($ch));\n}\n$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);\n$body = json_decode($response, true);\nif ($status >= 400) {\n    $error = $body['error'];\n    throw new RuntimeException(\"$status {$error['code']}: {$error['message']}\");\n}\nprint_r($body['data']);\n","PHP","php",[874,1214,1215,1223,1244,1248,1264,1272,1283,1294,1299,1311,1316,1329,1345,1363,1368,1386,1404,1419,1435,1467,1471],{"__ignoreMap":971},[975,1216,1217,1220],{"class":977,"line":378},[975,1218,1219],{"class":997},"\u003C?",[975,1221,1222],{"class":989},"php\n",[975,1224,1225,1228,1231,1234,1236,1239,1242],{"class":977,"line":388},[975,1226,1227],{"class":1009},"$token ",[975,1229,1230],{"class":997},"=",[975,1232,1233],{"class":989}," getenv",[975,1235,1068],{"class":1009},[975,1237,1238],{"class":993},"'TOKEN'",[975,1240,1241],{"class":1009},"); ",[975,1243,1044],{"class":980},[975,1245,1246],{"class":977,"line":393},[975,1247,1049],{"emptyLinePlaceholder":375},[975,1249,1250,1253,1255,1258,1260,1262],{"class":977,"line":402},[975,1251,1252],{"class":1009},"$ch ",[975,1254,1230],{"class":997},[975,1256,1257],{"class":989}," curl_init",[975,1259,1068],{"class":1009},[975,1261,1071],{"class":993},[975,1263,1195],{"class":1009},[975,1265,1266,1269],{"class":977,"line":407},[975,1267,1268],{"class":989},"curl_setopt_array",[975,1270,1271],{"class":1009},"($ch, [\n",[975,1273,1274,1277,1280],{"class":977,"line":416},[975,1275,1276],{"class":989},"    CURLOPT_HTTPHEADER",[975,1278,1279],{"class":997}," =>",[975,1281,1282],{"class":1009}," [\n",[975,1284,1285,1288,1291],{"class":977,"line":421},[975,1286,1287],{"class":993},"        'Authorization: Bearer '",[975,1289,1290],{"class":997}," .",[975,1292,1293],{"class":1009}," $token,\n",[975,1295,1296],{"class":977,"line":426},[975,1297,1298],{"class":1009},"    ],\n",[975,1300,1301,1304,1306,1309],{"class":977,"line":432},[975,1302,1303],{"class":989},"    CURLOPT_RETURNTRANSFER",[975,1305,1279],{"class":997},[975,1307,1308],{"class":989}," true",[975,1310,1096],{"class":1009},[975,1312,1313],{"class":977,"line":437},[975,1314,1315],{"class":1009},"]);\n",[975,1317,1318,1321,1323,1326],{"class":977,"line":443},[975,1319,1320],{"class":1009},"$response ",[975,1322,1230],{"class":997},[975,1324,1325],{"class":989}," curl_exec",[975,1327,1328],{"class":1009},"($ch);\n",[975,1330,1331,1333,1336,1339,1342],{"class":977,"line":448},[975,1332,1131],{"class":997},[975,1334,1335],{"class":1009}," ($response ",[975,1337,1338],{"class":997},"===",[975,1340,1341],{"class":989}," false",[975,1343,1344],{"class":1009},") {\n",[975,1346,1347,1350,1352,1355,1357,1360],{"class":977,"line":457},[975,1348,1349],{"class":997},"    throw",[975,1351,1146],{"class":997},[975,1353,1354],{"class":989}," RuntimeException",[975,1356,1068],{"class":1009},[975,1358,1359],{"class":989},"curl_error",[975,1361,1362],{"class":1009},"($ch));\n",[975,1364,1365],{"class":977,"line":462},[975,1366,1367],{"class":1009},"}\n",[975,1369,1370,1373,1375,1378,1381,1384],{"class":977,"line":467},[975,1371,1372],{"class":1009},"$status ",[975,1374,1230],{"class":997},[975,1376,1377],{"class":989}," curl_getinfo",[975,1379,1380],{"class":1009},"($ch, ",[975,1382,1383],{"class":989},"CURLINFO_RESPONSE_CODE",[975,1385,1195],{"class":1009},[975,1387,1388,1391,1393,1396,1399,1402],{"class":977,"line":472},[975,1389,1390],{"class":1009},"$body ",[975,1392,1230],{"class":997},[975,1394,1395],{"class":989}," json_decode",[975,1397,1398],{"class":1009},"($response, ",[975,1400,1401],{"class":989},"true",[975,1403,1195],{"class":1009},[975,1405,1406,1408,1411,1414,1417],{"class":977,"line":477},[975,1407,1131],{"class":997},[975,1409,1410],{"class":1009}," ($status ",[975,1412,1413],{"class":997},">=",[975,1415,1416],{"class":989}," 400",[975,1418,1344],{"class":1009},[975,1420,1421,1424,1426,1429,1432],{"class":977,"line":482},[975,1422,1423],{"class":1009},"    $error ",[975,1425,1230],{"class":997},[975,1427,1428],{"class":1009}," $body[",[975,1430,1431],{"class":993},"'error'",[975,1433,1434],{"class":1009},"];\n",[975,1436,1437,1439,1441,1443,1445,1448,1451,1454,1457,1460,1462,1465],{"class":977,"line":487},[975,1438,1349],{"class":997},[975,1440,1146],{"class":997},[975,1442,1354],{"class":989},[975,1444,1068],{"class":1009},[975,1446,1447],{"class":993},"\"",[975,1449,1450],{"class":1009},"$status",[975,1452,1453],{"class":993}," {",[975,1455,1456],{"class":1009},"$error",[975,1458,1459],{"class":993},"['code']}: {",[975,1461,1456],{"class":1009},[975,1463,1464],{"class":993},"['message']}\"",[975,1466,1195],{"class":1009},[975,1468,1469],{"class":977,"line":493},[975,1470,1367],{"class":1009},[975,1472,1473,1476,1479,1482],{"class":977,"line":499},[975,1474,1475],{"class":989},"print_r",[975,1477,1478],{"class":1009},"($body[",[975,1480,1481],{"class":993},"'data'",[975,1483,1315],{"class":1009},[1485,1486,1487],"style",{},"html pre.shiki code .sLBg1, html code.shiki .sLBg1{--shiki-default:#66707B;--shiki-dark:#BDC4CC}html pre.shiki code .soyes, html code.shiki .soyes{--shiki-default:#702C00;--shiki-dark:#FFB757}html pre.shiki code .s-5SL, html code.shiki .s-5SL{--shiki-default:#023B95;--shiki-dark:#91CBFF}html pre.shiki code .sT6z2, html code.shiki .sT6z2{--shiki-default:#032563;--shiki-dark:#ADDCFF}html pre.shiki code .sHUrx, html code.shiki .sHUrx{--shiki-default:#A0111F;--shiki-dark:#FF9492}html pre.shiki code .suds8, html code.shiki .suds8{--shiki-default:#0E1116;--shiki-dark:#F0F3F6}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sKwhi, html code.shiki .sKwhi{--shiki-default:#622CBC;--shiki-dark:#DBB7FF}",{"title":971,"searchDepth":388,"depth":393,"links":1489},[],"The wallet is not self-service: Main Team opens it only after an agreement and on your request (ask your Main Team contact or info@main-team.org), and Main Tea…","md",{},"4",{"title":158,"description":1490},"api\u002Freference\u002Fget-wallet","NAtuwEfqhcW7ROjX3e-e1tNKcBWymjV7l1OgntdCdLA",1795776468487]