{"openapi":"3.0.0","paths":{"/api-auth":{"get":{"operationId":"AppController_apiTestAuth","parameters":[],"responses":{"200":{"description":""}},"security":[{"X-API-KEY":[]}],"summary":"Returns school for api key","tags":["App","auth"]}},"/v1/users/grant-user-offer-by-mail":{"post":{"operationId":"UsersApiController_grantUserOfferByMail_v1","parameters":[],"requestBody":{"required":true,"description":"Grants a user access to an offer. If user not exists, user gets created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreatedDto"}}}},"400":{"description":"Missing arguments (check your api key)"},"401":{"description":"Api key provided but invalid"}},"security":[{"X-API-KEY":[]}],"summary":"Grants a user access to an offer by email","tags":["users"]}},"/v1/users/grant-user-offer-by-uid":{"post":{"operationId":"UsersApiController_grantUserOfferByUid_v1","parameters":[],"requestBody":{"required":true,"description":"Grants a user access to an offer by uid. The user must already exist in the school. Returns 400 if the uid is not found or the email does not match.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantOfferByUidDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreatedDto"}}}},"400":{"description":"Missing arguments (check your api key)"},"401":{"description":"Api key provided but invalid"}},"security":[{"X-API-KEY":[]}],"summary":"Grants a user access to an offer by uid","tags":["users"]}},"/v1/users/set-offer-state":{"post":{"operationId":"UsersApiController_setOfferState_v1","parameters":[],"requestBody":{"required":true,"description":"Sets the state of an offer for a user. <br>\n      If active is not supplied, the offer gets deleted from the user. <br>\n      If the user has multiple accesses with the same offer, all offers will be set to the same state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetOfferStateForUserDto"}}}},"responses":{"201":{"description":"Operation successfully finished","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetOfferStateForUserDto"}}}},"400":{"description":"Missing arguments (check your api key)"},"401":{"description":"Api key provided but invalid"}},"security":[{"X-API-KEY":[]}],"summary":"Sets the state of an offer for a user by email","tags":["users"]}},"/v1/users/set-offer-state-by-uid":{"post":{"operationId":"UsersApiController_setOfferStateByUid_v1","parameters":[],"requestBody":{"required":true,"description":"Sets the state of an offer for a user by uid. <br>\n      If active is not supplied, the offer gets deleted from the user. <br>\n      If the user has multiple accesses with the same offer, all offers will be set to the same state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetOfferStateForUserByUidDto"}}}},"responses":{"201":{"description":"Operation successfully finished","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetOfferStateForUserByUidDto"}}}},"400":{"description":"Missing arguments (check your api key)"},"401":{"description":"Api key provided but invalid"}},"security":[{"X-API-KEY":[]}],"summary":"Sets the state of an offer for a user by uid","tags":["users"]}},"/v1/users/set-order-state":{"post":{"operationId":"UsersApiController_setOrderState_v1","parameters":[],"requestBody":{"required":true,"description":"Sets the state of an offer with a orderId for a user. <br>\n      If active is not supplied, the offer gets deleted from the user. <br>\n      If the user has multiple accesses with the same orderId, all offers will be set to the same state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetOrderStateForUserDto"}}}},"responses":{"201":{"description":"Operation successfully finished","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetOrderStateForUserDto"}}}},"400":{"description":"Missing arguments (check your api key)"},"401":{"description":"Api key provided but invalid"}},"security":[{"X-API-KEY":[]}],"summary":"Sets the state of an offer with a orderId for a user by email","tags":["users"]}},"/v1/users/set-order-state-by-uid":{"post":{"operationId":"UsersApiController_setOrderStateByUid_v1","parameters":[],"requestBody":{"required":true,"description":"Sets the state of an offer with a orderId for a user. <br>\n      If active is not supplied, the offer gets deleted from the user. <br>\n      If the user has multiple accesses with the same orderId, all offers will be set to the same state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetOrderStateForUserByUidDto"}}}},"responses":{"201":{"description":"Operation successfully finished","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetOrderStateForUserByUidDto"}}}},"400":{"description":"Missing arguments (check your api key)"},"401":{"description":"Api key provided but invalid"}},"security":[{"X-API-KEY":[]}],"summary":"Sets the state of an offer with a orderId for a user","tags":["users"]}},"/v1/users/set-order-state-by-order-id":{"post":{"operationId":"UsersApiController_setOrderStateByOrderId_v1","parameters":[],"requestBody":{"required":true,"description":"Sets the state of all offers with a specific orderId for all users that have this orderId. <br>\n      If active is not supplied, the offers get deleted from the users. <br>\n      All users with the given orderId will be affected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetOrderStateByOrderIdDto"}}}},"responses":{"201":{"description":"Operation successfully finished","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetOrderStateByOrderIdDto"}}}},"400":{"description":"Missing arguments (check your api key)"},"401":{"description":"Api key provided but invalid"}},"security":[{"X-API-KEY":[]}],"summary":"Sets the state of all offers with a specific orderId across all users","tags":["users"]}},"/v1/users/set-offer-expires":{"patch":{"operationId":"UsersApiController_setOfferExpires_v1","parameters":[],"requestBody":{"required":true,"description":"Sets the expiration date for an offer for a user. <br>\n      When no value is provided, the offer expires at will be removed. <br>\n      The expiresAt field should be in ISO 8601 format (e.g., \"2025-09-26T13:33:27.197Z\") or null.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetOfferExpiresAtDto"}}}},"responses":{"200":{"description":"Operation successfully finished"},"400":{"description":"Missing arguments (check your api key)"},"401":{"description":"Api key provided but invalid"}},"security":[{"X-API-KEY":[]}],"summary":"Sets the expiration date for an offer for a user","tags":["users"]}},"/v1/users/list":{"get":{"operationId":"UsersApiController_findUsers_v1","parameters":[{"name":"lastLoadedId","required":false,"in":"query","description":"Page to continue loading at (located in response in next_page property)","schema":{"type":"string"}},{"name":"pageLength","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":10,"type":"number"}},{"name":"offerId","required":false,"in":"query","description":"Filter users by offerId","schema":{"type":"string"}},{"name":"courseId","required":false,"in":"query","description":"Filter users by courseId. Also populates progress[] of each user with the progress of this course; without this parameter progress[] is empty.","schema":{"type":"string"}},{"name":"active","required":false,"in":"query","description":"If not set returns all users. When set to true return just active. When set to false return just inactive","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Returns a page with users","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListUserResult"}}}},"400":{"description":"Missing arguments (check your api key)"},"401":{"description":"Api key provided but invalid"},"429":{"description":"Too many requests - only 4 requests per second allowed"}},"security":[{"X-API-KEY":[]}],"summary":"Returns a page with users","tags":["users"]}},"/v1/users/find-by-mail/{email}":{"get":{"operationId":"UsersApiController_findUserByMail_v1","parameters":[{"name":"email","required":true,"in":"path","description":"Email to search for","schema":{"format":"email","type":"string"}}],"responses":{"200":{"description":"Returns a user with the given email or null if not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"400":{"description":"Missing arguments (check your api key)"},"401":{"description":"Api key provided but invalid"},"429":{"description":"Too many requests - only 4 requests per second allowed"}},"security":[{"X-API-KEY":[]}],"summary":"Returns a user with the given email or null if not found","tags":["users"]}},"/v1/users/find-by-uid/{uid}":{"get":{"operationId":"UsersApiController_findUserByUid_v1","parameters":[{"name":"uid","required":true,"in":"path","description":"Uid to search for","schema":{"type":"string"}}],"responses":{"200":{"description":"Returns a user with the given uid or null if not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"400":{"description":"Missing arguments (check your api key)"},"401":{"description":"Api key provided but invalid"},"429":{"description":"Too many requests - only 4 requests per second allowed"}},"security":[{"X-API-KEY":[]}],"summary":"Returns a user with the given uid or null if not found","tags":["users"]}},"/v1/users/login-token/{uid}":{"get":{"operationId":"UsersApiController_createLoginToken_v1","parameters":[{"name":"uid","required":true,"in":"path","description":"The uid of the user to create a token for","schema":{}}],"responses":{"201":{"description":"Sign in using custom token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchoolUserLoginTokenResult"}}}},"400":{"description":"Missing arguments (check your api key)"},"401":{"description":"Api key provided but invalid"}},"security":[{"X-API-KEY":[]}],"summary":"Returns a token with which the user can be automatically signed in. The token expires after 1 hour","tags":["users"]}},"/v1/users/set-custom-user-properties":{"post":{"operationId":"UsersApiController_setCustomProperties_v1","parameters":[],"requestBody":{"required":true,"description":"Object containing email of user and array of new properties.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetCustomPropertyDto"}}}},"responses":{"201":{"description":"Returns updated user with all custom properties. <br>\n     If user does not exist, a bad request exception will be thrown. <br>\n     If one or multiple properties does not exist, a bad request exception will be thrown. <br>\n     If one or multiple properties does not contain valid values for properties, a bad request exception will be thrown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"400":{"description":"Missing arguments (check your api key)"},"401":{"description":"Api key provided but invalid"},"429":{"description":"Too many requests - only 4 requests per second allowed"}},"security":[{"X-API-KEY":[]}],"summary":"Sets values to a custom user properties by email","tags":["users"]}},"/v1/users/set-custom-user-properties-by-uid":{"post":{"operationId":"UsersApiController_setCustomPropertiesByUid_v1","parameters":[],"requestBody":{"required":true,"description":"Object containing uid of user and array of new properties.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetCustomPropertyByUidDto"}}}},"responses":{"201":{"description":"Returns updated user with all custom properties. <br>\n     If user does not exist, a bad request exception will be thrown. <br>\n     If one or multiple properties does not exist, a bad request exception will be thrown. <br>\n     If one or multiple properties does not contain valid values for properties, a bad request exception will be thrown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"400":{"description":"Missing arguments (check your api key)"},"401":{"description":"Api key provided but invalid"},"429":{"description":"Too many requests - only 4 requests per second allowed"}},"security":[{"X-API-KEY":[]}],"summary":"Sets values to a custom user properties by uid","tags":["users"]}},"/v1/users/set-custom-property":{"post":{"operationId":"UsersApiController_setSingleCustomProperty_v1","parameters":[],"requestBody":{"required":true,"description":"Object containing email of user, property key, and value. Null values are treated as empty strings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetSingleCustomPropertyDto"}}}},"responses":{"201":{"description":"Returns updated user with all custom properties. <br>\n     If user does not exist, a bad request exception will be thrown. <br>\n     If the property does not exist in the school, a bad request exception will be thrown. <br>\n     If the value is invalid for the property type, a bad request exception will be thrown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"400":{"description":"Missing arguments (check your api key)"},"401":{"description":"Api key provided but invalid"},"429":{"description":"Too many requests - only 4 requests per second allowed"}},"security":[{"X-API-KEY":[]}],"summary":"Sets a single custom user property by email. If value is null or not provided, the property will be set to an empty string.","tags":["users"]}},"/v1/users/set-custom-property-by-uid":{"post":{"operationId":"UsersApiController_setSingleCustomPropertyByUid_v1","parameters":[],"requestBody":{"required":true,"description":"Object containing uid of user, property key, and value. Null values are treated as empty strings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetSingleCustomPropertyByUidDto"}}}},"responses":{"201":{"description":"Returns updated user with all custom properties. <br>\n     If user does not exist, a bad request exception will be thrown. <br>\n     If the property does not exist in the school, a bad request exception will be thrown. <br>\n     If the value is invalid for the property type, a bad request exception will be thrown.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"400":{"description":"Missing arguments (check your api key)"},"401":{"description":"Api key provided but invalid"},"429":{"description":"Too many requests - only 4 requests per second allowed"}},"security":[{"X-API-KEY":[]}],"summary":"Sets a single custom user property by uid. If value is null or not provided, the property will be set to an empty string.","tags":["users"]}},"/v1/users/delete-users":{"delete":{"operationId":"UsersApiController_deleteUsers_v1","parameters":[],"requestBody":{"required":true,"description":"Object containing emails of users to delete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteMultipleUsersByMailDataDto"}}}},"responses":{"200":{"description":"Returns ok if all users were deleted. <br>\n    Only users that were found were deleted. <br>\n    Users that mail is not in school will not be deleted."},"400":{"description":"Missing arguments (check your api key)"},"401":{"description":"Api key provided but invalid"}},"security":[{"X-API-KEY":[]}],"summary":"Deletes multiple users by email (DELETE method)","tags":["users"]},"post":{"operationId":"UsersApiController_deleteUsersPost_v1","parameters":[],"requestBody":{"required":true,"description":"Object containing emails of users to delete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteMultipleUsersByMailDataDto"}}}},"responses":{"200":{"description":"Returns ok if all users were deleted. <br>\n    Only users that were found were deleted. <br>\n    Users that mail is not in school will not be deleted."},"400":{"description":"Missing arguments (check your api key)"},"401":{"description":"Api key provided but invalid"}},"security":[{"X-API-KEY":[]}],"summary":"Deletes multiple users by email (POST method - use this if your client does not support DELETE with body)","tags":["users"]}},"/v1/users/delete-users-by-uid":{"delete":{"operationId":"UsersApiController_deleteUsersByUid_v1","parameters":[],"requestBody":{"required":true,"description":"Object containing uids of users to delete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteMultipleUsersByUidDataDto"}}}},"responses":{"200":{"description":"Returns ok if all users were deleted. <br>\n    Only users that were found were deleted. <br>\n    Users that uid is not in school will not be deleted."},"400":{"description":"Missing arguments (check your api key)"},"401":{"description":"Api key provided but invalid"}},"security":[{"X-API-KEY":[]}],"summary":"Deletes multiple users by uid (DELETE method)","tags":["users"]},"post":{"operationId":"UsersApiController_deleteUsersPostByUid_v1","parameters":[],"requestBody":{"required":true,"description":"Object containing uids of users to delete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteMultipleUsersByUidDataDto"}}}},"responses":{"200":{"description":"Returns ok if all users were deleted. <br>\n    Only users that were found were deleted. <br>\n    Users that uid is not in school will not be deleted."},"400":{"description":"Missing arguments (check your api key)"},"401":{"description":"Api key provided but invalid"}},"security":[{"X-API-KEY":[]}],"summary":"Deletes multiple users by uid (POST method - use this if your client does not support DELETE with body)","tags":["users"]}},"/v1/users/course-progress/list/{email}":{"get":{"operationId":"UsersCourseProgressApiController_listAllUserProgresses_v1","parameters":[{"name":"email","required":true,"in":"path","description":"Email to search for","schema":{"format":"email","type":"string"}},{"name":"lastLoadedCourseId","required":false,"in":"query","description":"Page to continue loading at (last course ID from previous response)","schema":{"type":"string"}},{"name":"pageLength","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"type":"number"}}],"responses":{"200":{"description":"Returns paginated list of all course progress for a user by email","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCourseProgressResult"}}}},"400":{"description":"Missing arguments (check your api key)"},"401":{"description":"Api key provided but invalid"},"429":{"description":"Too many requests - only 4 requests per second allowed"}},"security":[{"X-API-KEY":[]}],"summary":"Returns paginated list of all course progress for a user by email","tags":["users"]}},"/v1/users/course-progress/list-by-uid/{uid}":{"get":{"operationId":"UsersCourseProgressApiController_listAllUserProgressesByUid_v1","parameters":[{"name":"uid","required":true,"in":"path","description":"Uid to search for","schema":{"type":"string"}},{"name":"lastLoadedCourseId","required":false,"in":"query","description":"Page to continue loading at (last course ID from previous response)","schema":{"type":"string"}},{"name":"pageLength","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"type":"number"}}],"responses":{"200":{"description":"Returns paginated list of all course progress for a user by uid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCourseProgressResult"}}}},"400":{"description":"Missing arguments (check your api key)"},"401":{"description":"Api key provided but invalid"},"429":{"description":"Too many requests - only 4 requests per second allowed"}},"security":[{"X-API-KEY":[]}],"summary":"Returns paginated list of all course progress for a user by uid","tags":["users"]}},"/v1/users/course-progress/{courseId}/{email}":{"get":{"operationId":"UsersCourseProgressApiController_getUserCourseProgress_v1","parameters":[{"name":"email","required":true,"in":"path","description":"Email to search for","schema":{"format":"email","type":"string"}},{"name":"courseId","required":true,"in":"path","description":"The course ID to get progress for","schema":{"type":"string"}}],"responses":{"200":{"description":"Returns user course progress for a specific course by email","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCourseProgressItem"}}}},"400":{"description":"Missing arguments (check your api key)"},"401":{"description":"Api key provided but invalid"},"429":{"description":"Too many requests - only 4 requests per second allowed"}},"security":[{"X-API-KEY":[]}],"summary":"Returns user course progress for a specific course by email","tags":["users"]}},"/v1/users/course-progress/{courseId}/by-uid/{uid}":{"get":{"operationId":"UsersCourseProgressApiController_getUserCourseProgressByUid_v1","parameters":[{"name":"uid","required":true,"in":"path","description":"Uid to search for","schema":{"type":"string"}},{"name":"courseId","required":true,"in":"path","description":"The course ID to get progress for","schema":{"type":"string"}}],"responses":{"200":{"description":"Returns user course progress for a specific course by uid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCourseProgressItem"}}}},"400":{"description":"Missing arguments (check your api key)"},"401":{"description":"Api key provided but invalid"},"429":{"description":"Too many requests - only 4 requests per second allowed"}},"security":[{"X-API-KEY":[]}],"summary":"Returns user course progress for a specific course by uid","tags":["users"]}},"/v1/offers":{"get":{"operationId":"OffersController_getOffers_v1","parameters":[],"responses":{"200":{"description":"Returns list of offers available in the school","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetOfferDto"}}}},"400":{"description":"Missing arguments (check your api key)"},"401":{"description":"API key provided but invalid"}},"security":[{"X-API-KEY":[]}],"summary":"Gets all offers that are available in the school","tags":["offers"]}},"/v1/chapters/chapter-access/enable":{"post":{"operationId":"ChaptersApiController_chapterAccess_v1","parameters":[],"requestBody":{"required":true,"description":"Grants a user access to a chapter by email.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiChapterAccessDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiChapterAccessDto"}}}},"400":{"description":"Missing arguments (check your api key)"},"401":{"description":"Api key provided but invalid"}},"security":[{"X-API-KEY":[]}],"summary":"Grants a user access to a chapter by email","tags":["chapters"]}},"/v1/chapters/chapter-access/enable-by-uid":{"post":{"operationId":"ChaptersApiController_chapterAccessByUid_v1","parameters":[],"requestBody":{"required":true,"description":"Grants a user access to a chapter by uid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiChapterAccessByUidDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiChapterAccessByUidDto"}}}},"400":{"description":"Missing arguments (check your api key)"},"401":{"description":"Api key provided but invalid"}},"security":[{"X-API-KEY":[]}],"summary":"Grants a user access to a chapter by uid","tags":["chapters"]}},"/v1/courses":{"get":{"operationId":"CoursesController_listCourses_v1","parameters":[],"responses":{"200":{"description":"Returns all courses with their id, name and type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListCoursesResult"}}}},"400":{"description":"Missing arguments (check your api key)"},"401":{"description":"API key provided but invalid"}},"security":[{"X-API-KEY":[]}],"summary":"Lists all courses of the school","tags":["courses"]}},"/v1/custom-user-properties/list":{"get":{"operationId":"CustomUserPropertyController_getAllProperties_v1","parameters":[],"responses":{"200":{"description":"Returns a array with all custom user properties, their ids and their types","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomPropertyDto"}}}}},"400":{"description":"Missing arguments (check your api key)"},"401":{"description":"API key provided but invalid"}},"security":[{"X-API-KEY":[]}],"summary":"Lists all custom user properties ","tags":["custom-user-property"]}},"/v1/exams":{"get":{"operationId":"ExamsController_listExams_v1","parameters":[],"responses":{"200":{"description":"Returns all exams with their examId, name and number of questions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExamListResult"}}}},"400":{"description":"Missing arguments (check your api key)"},"401":{"description":"API key provided but invalid"}},"security":[{"X-API-KEY":[]}],"summary":"Lists all exams of the school","tags":["exams"]}},"/v1/exams/{id}/results":{"get":{"operationId":"ExamsController_listExamResults_v1","parameters":[{"name":"id","required":true,"in":"path","description":"Exam to get results for. The examId as returned by the exams API/MCP tools (e.g. \"kSbFak3VHbyHJRLJM3Ufb\").","schema":{"type":"string"}},{"name":"lastLoadedId","required":false,"in":"query","description":"Page to continue loading at (located in response in next_page property)","schema":{"type":"string"}},{"name":"pageLength","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":10,"type":"number"}}],"responses":{"200":{"description":"Returns list of users that have taken the exam with the results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListExamResult"}}}},"400":{"description":"Missing arguments (check your api key)"},"401":{"description":"API key provided but invalid"},"429":{"description":"Too many requests - only 4 requests per second allowed"}},"security":[{"X-API-KEY":[]}],"summary":"Lists exam results of users that have taken the exam provided by the examId","tags":["exams"]}}},"info":{"title":"Memberspot API","description":"\nThe Memberspot REST API is used for a direct interaction with the Memberspot Servers. </br>\nThe Authentication is done by providing a API key in the header of the request, that is created in the API key menu (/settings/apikeys).","version":"1.0","contact":{}},"tags":[{"name":"users","description":""},{"name":"offers","description":""},{"name":"courses","description":""},{"name":"exams","description":""},{"name":"auth","description":""}],"servers":[],"components":{"securitySchemes":{"X-API-KEY":{"type":"apiKey","in":"header","name":"X-API-KEY"}},"schemas":{"CreateUserDto":{"type":"object","properties":{"firstname":{"type":"string"},"name":{"type":"string"},"email":{"type":"string","format":"email"},"grantOffer":{"type":"string"},"orderId":{"type":"string"}},"required":["email"]},"GrantedOffers":{"type":"object","properties":{"offerId":{"type":"string"},"name":{"type":"string"}},"required":["offerId","name"]},"UserCreatedDto":{"type":"object","properties":{"uid":{"type":"string"},"externalId":{"type":"string","nullable":true},"isNew":{"type":"boolean"},"firstname":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"grantedOffers":{"type":"array","items":{"$ref":"#/components/schemas/GrantedOffers"}},"active":{"type":"boolean"}},"required":["uid","isNew","firstname","name","email","grantedOffers"]},"GrantOfferByUidDto":{"type":"object","properties":{"uid":{"type":"string"},"grantOffer":{"type":"string"},"orderId":{"type":"string"}},"required":["uid"]},"SetOfferStateForUserDto":{"type":"object","properties":{"email":{"type":"string","format":"email"},"offerId":{"type":"string"},"active":{"type":"boolean"}},"required":["email","offerId"]},"SetOfferStateForUserByUidDto":{"type":"object","properties":{"uid":{"type":"string"},"offerId":{"type":"string"},"active":{"type":"boolean"}},"required":["uid","offerId"]},"SetOrderStateForUserDto":{"type":"object","properties":{"email":{"type":"string","format":"email"},"orderId":{"type":"string"},"active":{"type":"boolean"}},"required":["email","orderId"]},"SetOrderStateForUserByUidDto":{"type":"object","properties":{"uid":{"type":"string"},"orderId":{"type":"string"},"active":{"type":"boolean"}},"required":["uid","orderId"]},"SetOrderStateByOrderIdDto":{"type":"object","properties":{"orderId":{"type":"string"},"active":{"type":"boolean"}},"required":["orderId"]},"SetOfferExpiresAtDto":{"type":"object","properties":{"uid":{"type":"string"},"offerId":{"type":"string"},"expiresAt":{"type":"string","nullable":true}},"required":["uid","offerId"]},"UserCourseProgress":{"type":"object","properties":{"activePosts":{"type":"number","description":"Number of lessons that count towards the course progress of this user (published lessons in accessible chapters)"},"completedPosts":{"type":"number","description":"Number of completed lessons of this user in the course"},"grantedAt":{"format":"date-time","type":"string","description":"Date the course was first granted to the user. Revoking and re-granting access keeps this date; check \"active\" for the current access state."},"startDate":{"format":"date-time","type":"string","description":"Date from which course access and drip scheduling are anchored for the user. Derived from the offer launch date or set by an admin, so it can be before or after grantedAt."},"updatedAt":{"format":"date-time","type":"string","description":"Date the course assignment was last written. It changes whenever progress, access state, chapter access or start date change, and can also move when the access of the user is re-evaluated without a visible change. An unchanged value therefore guarantees unchanged data; a newer value does not guarantee a difference. Omitted for assignments that have not been written since the field was introduced."},"courseId":{"type":"string"},"scormProgress":{"type":"object"}},"required":["courseId"]},"User":{"type":"object","properties":{"uid":{"type":"string","description":"User identifier"},"email":{"type":"string","description":"User email"},"created":{"format":"date-time","type":"string","description":"Date user was created"},"firstname":{"type":"string","description":"Users firstname"},"name":{"type":"string","description":"Users lastname"},"progress":{"description":"Course progress of the user. Only populated when the request filters by courseId (then it contains that single course); an empty array otherwise.","type":"array","items":{"$ref":"#/components/schemas/UserCourseProgress"}},"active":{"type":"boolean","description":"Is user active"},"customUserProperties":{"type":"object","additionalProperties":{"type":"string"},"description":"Custom user properties key value pairs"}},"required":["uid","email","created","firstname","name"]},"ListUserResult":{"type":"object","properties":{"data":{"description":"Array with users","type":"array","items":{"$ref":"#/components/schemas/User"}},"nextPage":{"type":"string","description":"Field will be provided when more data is availiable"}},"required":["data"]},"SchoolUserLoginTokenResult":{"type":"object","properties":{"token":{"type":"string","description":"Token to signin the user"},"loginUrl":{"type":"string","description":"Url via which the user can be signed in automtically"}},"required":["token","loginUrl"]},"UserCustomPropertyValueDto":{"type":"object","properties":{"id":{"type":"string","description":"Id of the custom property"},"value":{"type":"string","description":"The value of the custom property"}},"required":["id","value"]},"SetCustomPropertyDto":{"type":"object","properties":{"email":{"type":"string","format":"email","description":"User email"},"properties":{"minItems":1,"description":"User custom properties","type":"array","items":{"$ref":"#/components/schemas/UserCustomPropertyValueDto"}}},"required":["email","properties"]},"SetCustomPropertyByUidDto":{"type":"object","properties":{"uid":{"type":"string","description":"User Uid"},"properties":{"minItems":1,"description":"User custom properties","type":"array","items":{"$ref":"#/components/schemas/UserCustomPropertyValueDto"}}},"required":["uid","properties"]},"SetSingleCustomPropertyDto":{"type":"object","properties":{"email":{"type":"string","format":"email","description":"User email","example":"user@example.com"},"key":{"type":"string","description":"The key/id of the custom property to set or remove","example":"property-id-123"},"value":{"type":"string","nullable":true,"description":"The value to set for the custom property. If null or not provided, the property will be set to an empty string.","example":"some-value"}},"required":["email","key"]},"SetSingleCustomPropertyByUidDto":{"type":"object","properties":{"uid":{"type":"string","description":"User uid","example":"uid-abc123"},"key":{"type":"string","description":"The key/id of the custom property to set or remove","example":"property-id-123"},"value":{"type":"string","nullable":true,"description":"The value to set for the custom property. If null or not provided, the property will be set to an empty string.","example":"some-value"}},"required":["uid","key"]},"DeleteMultipleUsersByMailDataDto":{"type":"object","properties":{"emails":{"minItems":1,"maxItems":10,"description":"Array with emails of users to delete","type":"array","items":{"type":"string","format":"email"}}},"required":["emails"]},"DeleteMultipleUsersByUidDataDto":{"type":"object","properties":{"uids":{"minItems":1,"maxItems":10,"description":"Array with uids of users to delete","type":"array","items":{"type":"string"}}},"required":["uids"]},"UserCourseProgressItem":{"type":"object","properties":{"uid":{"type":"string","description":"User identifier"},"email":{"type":"string","description":"User email"},"firstname":{"type":"string","description":"Users firstname"},"name":{"type":"string","description":"Users lastname"},"active":{"type":"boolean","description":"Is course active"},"courseId":{"type":"string","description":"Course id"},"activePosts":{"type":"number","description":"Number of lessons that count towards the course progress of this user (published lessons in accessible chapters). Omitted when the user does not have the course."},"completedPosts":{"type":"number","description":"Number of completed lessons of this user in the course. The course counts as completed when activePosts > 0 and completedPosts >= activePosts (SCORM courses track completion separately). Omitted when the user does not have the course."},"grantedAt":{"format":"date-time","type":"string","description":"Date the course was first granted to the user. Revoking and re-granting access keeps this date; check \"active\" for the current access state. Omitted when the user never had the course."},"startDate":{"format":"date-time","type":"string","description":"Date from which course access and drip scheduling are anchored for the user. Derived from the offer launch date or set by an admin, so it can be before or after grantedAt. Omitted when the user never had the course."},"updatedAt":{"format":"date-time","type":"string","description":"Date the course assignment was last written. It changes whenever progress, access state, chapter access or start date change, and can also move when the access of the user is re-evaluated without a visible change. An unchanged value therefore guarantees unchanged data; a newer value does not guarantee a difference. Omitted for assignments that have not been written since the field was introduced."}},"required":["uid","email","firstname","name","courseId"]},"UserCourseProgressResult":{"type":"object","properties":{"data":{"description":"Array with user course progress items","type":"array","items":{"$ref":"#/components/schemas/UserCourseProgressItem"}},"nextPage":{"type":"string","description":"Field will be provided when more data is availiable"}},"required":["data"]},"GetOfferDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"hasCourseIds":{"type":"array","items":{"type":"string"}}},"required":["id","name"]},"ApiChapterAccessDto":{"type":"object","properties":{"email":{"type":"string","format":"email"},"courseId":{"type":"string"},"chapterId":{"type":"string"}},"required":["email","courseId","chapterId"]},"ApiChapterAccessByUidDto":{"type":"object","properties":{"uid":{"type":"string"},"courseId":{"type":"string"},"chapterId":{"type":"string"}},"required":["uid","courseId","chapterId"]},"CourseSummaryDto":{"type":"object","properties":{"id":{"type":"string","description":"Course identifier. Matches the courseId used in the users course-progress endpoints and in exam results."},"name":{"type":"string","description":"Course name"},"type":{"enum":["regular","scorm"],"type":"string","description":"Course type: \"regular\" for Memberspot courses, \"scorm\" for SCORM packages"},"description":{"type":"string","description":"Course description"}},"required":["id","name","type"]},"ListCoursesResult":{"type":"object","properties":{"data":{"description":"Array with all courses of the school","type":"array","items":{"$ref":"#/components/schemas/CourseSummaryDto"}}},"required":["data"]},"CustomPropertyDto":{"type":"object","properties":{"id":{"type":"string","description":"Id of the custom property"},"schoolId":{"type":"string","description":"School of the custom property"},"type":{"enum":["text","externalLink","date","select"],"type":"string","description":"The type of the property"},"name":{"type":"string","description":"Name of the property"},"options":{"description":"Allowed values of a select property. Only present for type \"select\"; member values must be one of these.","type":"array","items":{"type":"string"}}},"required":["id","schoolId","type","name"]},"ExamSummaryDto":{"type":"object","properties":{"examId":{"type":"string","description":"Exam identifier. Use it for GET /v1/exams/{id}/results to load the results of this exam."},"name":{"type":"string","description":"Exam name"},"description":{"type":"string","description":"Exam description"},"requiredPercentage":{"type":"number","description":"Percentage of points required to pass the exam"},"questionCount":{"type":"number","description":"Number of questions in the exam"},"created":{"format":"date-time","type":"string","description":"Date the exam was created"}},"required":["examId","name","questionCount"]},"ExamListResult":{"type":"object","properties":{"data":{"description":"Array with all exams of the school","type":"array","items":{"$ref":"#/components/schemas/ExamSummaryDto"}}},"required":["data"]},"ExamRunDto":{"type":"object","properties":{"id":{"type":"string"},"courseId":{"type":"string"},"chapterId":{"type":"string"},"postId":{"type":"string"},"started":{"format":"date-time","type":"string"},"possibleScore":{"type":"number"},"ended":{"format":"date-time","type":"string"},"hasPassed":{"type":"boolean"},"pointsScored":{"type":"number"},"percentRequired":{"type":"number"}},"required":["id","courseId","chapterId","postId","started","possibleScore"]},"ExamResultDto":{"type":"object","properties":{"lastRun":{"description":"Last Run (empty if no run)","allOf":[{"$ref":"#/components/schemas/ExamRunDto"}]},"lastSuccessfullRun":{"description":"Last Successfull Run (empty if none)","allOf":[{"$ref":"#/components/schemas/ExamRunDto"}]},"runs":{"description":"List of all runs","type":"array","items":{"$ref":"#/components/schemas/ExamRunDto"}},"updatedAt":{"format":"date-time","type":"string","description":"Date the result was last modified: a new run was started, a run was finished or the run counter was reset. Omitted for results that have not been modified since the field was introduced."},"id":{"type":"string"},"uid":{"type":"string"},"firstname":{"type":"string"},"lastname":{"type":"string"},"email":{"type":"string","format":"email"},"created":{"format":"date-time","type":"string"},"active":{"type":"boolean"},"hasPassed":{"type":"boolean"}},"required":["id","uid","email","created","active","hasPassed"]},"ListExamResult":{"type":"object","properties":{"data":{"description":"Array with user and its results for the given exam","type":"array","items":{"$ref":"#/components/schemas/ExamResultDto"}},"nextPage":{"type":"string","description":"Field will be provided when more data is availiable"}},"required":["data"]}}}}