{"openapi":"3.1.1","info":{"title":"REST API","description":"Dive into the specifics of each API endpoint by checking out our complete documentation.","version":"2.0.0","contact":{"name":"Skillsincloud","url":"https://support.skillsincloud.com/hc/it/requests/new","email":"support@skillsincloud.com"},"license":{"name":"MIT","url":"https://opensource.org/license/MIT"}},"externalDocs":{"description":"Documentation","url":"https://skillsincloud-demo.apidocumentation.com/guide/rest-api"},"servers":[{"url":"https://demo.skillsincloud.com"},{"url":"{protocol}://{tenant}.skillsincloud.com/","description":"Responds with your request data","variables":{"protocol":{"enum":["https","http"],"default":"https"},"tenant":{"default":"demo"}}}],"security":[{"bearerAuth":[]}],"x-speakeasy-webhooks":{"security":{"type":"signature","headerName":"x-signature","signatureTextEncoding":"base64","algorithm":"hmac-sha256"}},"tags":[{"name":"Authentication","description":"Everything about authentication."},{"name":"Courses","description":"Everything about courses"},{"name":"Users","description":"Everything about users"}],"paths":{"/api/v2/auth/access_token":{"post":{"tags":["Authentication"],"summary":"Create an access token","description":"Create a Bearer auth token based on the provided credentials. We can create the token based on the user credentials, client credentials or standard x-api-key of the Academy.","operationId":"access_token","security":[],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Credentials"},"examples":{"Demo":{"value":{"grant_type":"password","name":"Demo","email":"demo@skillsincloud.com","password":"skillsincloud"}},"ClientCredentials":{"value":{"grant_type":"client_credentials","client_id":"YltY6KfYhHFI-l0zMV66hA","client_secret":"563ea09d06e75076f6aba31a1ce56af0"}},"x-api-key":{"value":{"grant_type":"x-api-key"}},"RefreshToken":{"value":{"grant_type":"refresh_token","refresh_token":"oT2pHIFHAgNFfiw1YPVuR1E12SuvyMZ99xPlGRFjciAnKbGRBe2BC1-L_MYMT6WDgmYqFvAs2_YMrdq1sTG09Q"}}}}}},"responses":{"200":{"description":"Correctly logged in","headers":{"X-Request-ID":{"$ref":"#/components/headers/X-Request-ID"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Token"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"}},"x-post-response":"pm.test(\"Status code is 200\", () => {\n  pm.response.to.have.status(200);\n});\n\npm.test(\"Content-Type header is present\", () => {\n  pm.response.to.have.header(\"Content-Type\");\n});\n\npm.test(\"Response is a user with id and name\", () => {\n  const jsonData = pm.response.json();\n  pm.expect(jsonData).to.have.property(\"id\");\n  pm.expect(jsonData).to.have.property(\"name\");\n});\n"}},"/api/v2/auth/refresh_token":{"post":{"tags":["Authentication"],"summary":"Refresh token","description":"Refresh bearer token","operationId":"refresh_token","security":[{"bearerAuth":[]}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Credentials"}}}},"responses":{"200":{"description":"Token refreshed successfully","headers":{"X-Request-ID":{"$ref":"#/components/headers/X-Request-ID"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Token"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-post-response":"pm.test(\"Status code is 200\", () => {\n  pm.response.to.have.status(200);\n});\n\npm.test(\"Content-Type header is present\", () => {\n  pm.response.to.have.header(\"Content-Type\");\n});\n\npm.test(\"Response contains token\", () => {\n  const jsonData = pm.response.json();\n  pm.expect(jsonData).to.have.property(\"token\");\n  pm.expect(jsonData.token).to.be.an(\"string\");\n});\n"}},"/api/v2/auth/logout":{"post":{"tags":["Authentication"],"summary":"Logout","description":"Destroy a refresh token. Does not directly invalidate the bearer token because it will expires by his own.","operationId":"logout","security":[{"bearerAuth":[]}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Credentials"}}}},"responses":{"204":{"description":"Successfully logged out","headers":{"X-Request-ID":{"$ref":"#/components/headers/X-Request-ID"}},"content":{"application/json":{"schema":{}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-post-response":"pm.test(\"Status code is 200\", () => {\n  pm.response.to.have.status(200);\n});\n\npm.test(\"Content-Type header is present\", () => {\n  pm.response.to.have.header(\"Content-Type\");\n});\n\npm.test(\"Response contains token\", () => {\n  const jsonData = pm.response.json();\n  pm.expect(jsonData).to.have.property(\"token\");\n  pm.expect(jsonData.token).to.be.an(\"string\");\n});\n"}},"/api/v2/users":{"get":{"tags":["Users"],"summary":"Get all users","description":"Get all users with or without pagination","operationId":"getUsers","security":[{"bearerAuth":[]}],"parameters":[{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/items"},{"$ref":"#/components/parameters/scope"},{"$ref":"#/components/parameters/order"}],"responses":{"200":{"description":"List of Users","headers":{"X-Request-ID":{"$ref":"#/components/headers/X-Request-ID"}},"content":{"application/json":{"schema":{"oneOf":[{"type":"array","items":{"$ref":"#/components/schemas/User"}},{"$ref":"#/components/schemas/PaginatedResource"}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-post-response":"pm.test(\"Status code is 200\", () => {\n  pm.response.to.have.status(200);\n});\n\npm.test(\"Content-Type header is present\", () => {\n  pm.response.to.have.header(\"Content-Type\");\n});\n\npm.test(\"Response contains token\", () => {\n  const jsonData = pm.response.json();\n  pm.expect(jsonData).to.have.property(\"token\");\n  pm.expect(jsonData.token).to.be.an(\"string\");\n});\n"}},"/api/v2/users/{id}":{"get":{"tags":["Users"],"summary":"Get user by id","description":"Get user by id","operationId":"getUserById","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","description":"User id or external_id","required":true,"schema":{"type":["integer","string"]}},{"name":"scope","in":"query","description":"Define the find scope to use.","required":false,"schema":{"type":"string","default":null,"enum":[null,"by_external_id"]}}],"responses":{"200":{"description":"User details","headers":{"X-Request-ID":{"$ref":"#/components/headers/X-Request-ID"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-post-response":"pm.test(\"Status code is 200\", () => {\n  pm.response.to.have.status(200);\n});\n\npm.test(\"Content-Type header is present\", () => {\n  pm.response.to.have.header(\"Content-Type\");\n});\n\npm.test(\"Response contains token\", () => {\n  const jsonData = pm.response.json();\n  pm.expect(jsonData).to.have.property(\"token\");\n  pm.expect(jsonData.token).to.be.an(\"string\");\n});\n"},"put":{"tags":["Users"],"summary":"Update user by id","description":"Update user by id","operationId":"updateUserById","security":[{"bearerAuth":[]}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"parameters":[{"name":"id","in":"path","description":"User id or external_id","required":true,"schema":{"type":["integer","string"]}},{"name":"scope","in":"query","description":"Define the find scope to use.","required":false,"schema":{"type":"string","default":null,"enum":[null,"by_external_id"]}}],"responses":{"200":{"description":"User details","headers":{"X-Request-ID":{"$ref":"#/components/headers/X-Request-ID"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-post-response":"pm.test(\"Status code is 200\", () => {\n  pm.response.to.have.status(200);\n});\n\npm.test(\"Content-Type header is present\", () => {\n  pm.response.to.have.header(\"Content-Type\");\n});\n\npm.test(\"Response contains token\", () => {\n  const jsonData = pm.response.json();\n  pm.expect(jsonData).to.have.property(\"token\");\n  pm.expect(jsonData.token).to.be.an(\"string\");\n});\n"}},"/api/v2/users/invite_users":{"post":{"tags":["Users"],"summary":"Create new users","description":"Invite new users and invite them to courses.\n\n If users are already present in the platform, they will be simply invited to the selected courses and their fields will be updated.\n\nCall this endpoint periodically to keep the Skillsincloud in sync with your HCM.","operationId":"createUser","security":[{"bearerAuth":[]}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteUsers"}}}},"responses":{"200":{"description":"Users successfully invited","headers":{"X-Request-ID":{"$ref":"#/components/headers/X-Request-ID"},"X-Processing-Time":{"$ref":"#/components/headers/X-Processing-Time"}},"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","examples":["ok"]}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-post-response":"pm.test(\"Status code is 200\", () => {\n  pm.response.to.have.status(200);\n});\n\npm.test(\"Content-Type header is present\", () => {\n  pm.response.to.have.header(\"Content-Type\");\n});\n\npm.test(\"Response contains token\", () => {\n  const jsonData = pm.response.json();\n  pm.expect(jsonData).to.have.property(\"token\");\n  pm.expect(jsonData.token).to.be.an(\"string\");\n});\n"}},"/api/v2/users/{id}/courses/attach":{"put":{"tags":["Users"],"summary":"Enroll user to courses","description":"Enroll user to courses","operationId":"userAttachCourses","security":[{"bearerAuth":[]}],"requestBody":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"course_ids":{"type":"array","items":{"type":"int"}}}}}}},"parameters":[{"name":"id","in":"path","description":"User id or external_id","required":true,"schema":{"type":["integer","string"]}},{"name":"scope","in":"query","description":"Define the find scope to use.","required":false,"schema":{"type":"string","default":null,"enum":[null,"by_external_id"]}}],"responses":{"200":{"description":"User successfully attached","headers":{"X-Request-ID":{"$ref":"#/components/headers/X-Request-ID"}},"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","examples":["attached"]},"course_ids":{"type":"array","items":{"type":"int"},"examples":[[1,2,3]]}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-post-response":"pm.test(\"Status code is 200\", () => {\n  pm.response.to.have.status(200);\n});\n\npm.test(\"Content-Type header is present\", () => {\n  pm.response.to.have.header(\"Content-Type\");\n});\n\npm.test(\"Response contains token\", () => {\n  const jsonData = pm.response.json();\n  pm.expect(jsonData).to.have.property(\"token\");\n  pm.expect(jsonData.token).to.be.an(\"string\");\n});\n"}},"/api/v2/users/{id}/courses/detach":{"put":{"tags":["Users"],"summary":"Remove user from courses","description":"Remove user from courses","operationId":"userDetachCourses","security":[{"bearerAuth":[]}],"requestBody":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"course_ids":{"type":"array","items":{"type":"int"}}}}}}},"parameters":[{"name":"id","in":"path","description":"User id or external_id","required":true,"schema":{"type":["integer","string"]}},{"name":"scope","in":"query","description":"Define the find scope to use.","required":false,"schema":{"type":"string","default":null,"enum":[null,"by_external_id"]}}],"responses":{"200":{"description":"User successfully detached","headers":{"X-Request-ID":{"$ref":"#/components/headers/X-Request-ID"}},"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","examples":["detached"]},"course_ids":{"type":"array","items":{"type":"int"},"examples":[[1,2,3]]}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-post-response":"pm.test(\"Status code is 200\", () => {\n  pm.response.to.have.status(200);\n});\n\npm.test(\"Content-Type header is present\", () => {\n  pm.response.to.have.header(\"Content-Type\");\n});\n\npm.test(\"Response contains token\", () => {\n  const jsonData = pm.response.json();\n  pm.expect(jsonData).to.have.property(\"token\");\n  pm.expect(jsonData.token).to.be.an(\"string\");\n});\n"}},"/api/v2/courses":{"get":{"tags":["Courses"],"summary":"Get all courses","description":"Get all courses of the platform with or without pagination","operationId":"getCourses","security":[{"bearerAuth":[]}],"parameters":[{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/items"},{"$ref":"#/components/parameters/scope"},{"$ref":"#/components/parameters/order"}],"responses":{"200":{"description":"List of Courses","headers":{"X-Request-ID":{"$ref":"#/components/headers/X-Request-ID"}},"content":{"application/json":{"schema":{"oneOf":[{"type":"array","items":{"$ref":"#/components/schemas/Course"}},{"$ref":"#/components/schemas/PaginatedResource"}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-post-response":"pm.test(\"Status code is 200\", () => {\n  pm.response.to.have.status(200);\n});\n\npm.test(\"Content-Type header is present\", () => {\n  pm.response.to.have.header(\"Content-Type\");\n});\n\npm.test(\"Response contains token\", () => {\n  const jsonData = pm.response.json();\n  pm.expect(jsonData).to.have.property(\"token\");\n  pm.expect(jsonData.token).to.be.an(\"string\");\n});\n"}},"/api/v2/courses/{id}":{"get":{"tags":["Courses"],"summary":"Get course by id","description":"Get course by id","operationId":"getCourseById","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","description":"Course id","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"Course details","headers":{"X-Request-ID":{"$ref":"#/components/headers/X-Request-ID"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Course"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-post-response":"pm.test(\"Status code is 200\", () => {\n  pm.response.to.have.status(200);\n});\n\npm.test(\"Content-Type header is present\", () => {\n  pm.response.to.have.header(\"Content-Type\");\n});\n\npm.test(\"Response contains token\", () => {\n  const jsonData = pm.response.json();\n  pm.expect(jsonData).to.have.property(\"token\");\n  pm.expect(jsonData.token).to.be.an(\"string\");\n});\n"}},"/api/v2/courses/{id}/users/attach":{"put":{"tags":["Courses"],"summary":"Enroll users to course","description":"Enroll users to course","operationId":"courseAttachUsers","security":[{"bearerAuth":[]}],"requestBody":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"user_ids":{"type":"array","items":{"type":"int"}}}}}}},"parameters":[{"name":"id","in":"path","description":"Course id","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"Users successfully attached","headers":{"X-Request-ID":{"$ref":"#/components/headers/X-Request-ID"}},"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","examples":["attached"]},"user_ids":{"type":"array","items":{"type":"int"},"examples":[[1,2,3]]}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-post-response":"pm.test(\"Status code is 200\", () => {\n  pm.response.to.have.status(200);\n});\n\npm.test(\"Content-Type header is present\", () => {\n  pm.response.to.have.header(\"Content-Type\");\n});\n\npm.test(\"Response contains token\", () => {\n  const jsonData = pm.response.json();\n  pm.expect(jsonData).to.have.property(\"token\");\n  pm.expect(jsonData.token).to.be.an(\"string\");\n});\n"}},"/api/v2/courses/{id}/users/detach":{"put":{"tags":["Courses"],"summary":"Remove users from course","description":"Remove users from course","operationId":"courseDetachUsers","security":[{"bearerAuth":[]}],"requestBody":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"user_ids":{"type":"array","items":{"type":"int"}}}}}}},"parameters":[{"name":"id","in":"path","description":"Course id","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"Users successfully detached","headers":{"X-Request-ID":{"$ref":"#/components/headers/X-Request-ID"}},"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","examples":["detached"]},"user_ids":{"type":"array","items":{"type":"int"},"examples":[[1,2,3]]}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-post-response":"pm.test(\"Status code is 200\", () => {\n  pm.response.to.have.status(200);\n});\n\npm.test(\"Content-Type header is present\", () => {\n  pm.response.to.have.header(\"Content-Type\");\n});\n\npm.test(\"Response contains token\", () => {\n  const jsonData = pm.response.json();\n  pm.expect(jsonData).to.have.property(\"token\");\n  pm.expect(jsonData.token).to.be.an(\"string\");\n});\n"}}},"webhooks":{},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"JWT Bearer token authentication"}},"parameters":{"page":{"name":"page","description":"The number of the page we want to retrieve. Default is 1.","in":"query","required":false,"schema":{"type":"integer","format":"int64","default":""}},"items":{"name":"items","description":"The number of items to return","in":"query","required":false,"schema":{"type":"integer","format":"int64","default":""}},"scope":{"name":"scope","description":"A public model scope that we can call for faster model queries.","in":"query","required":false,"schema":{"type":"string","format":"string","default":""}},"order":{"name":"order","description":"Field and order to sort the results by. Default is ascending order with basic scope order. Format: {column},asc|desc.","in":"query","required":false,"schema":{"type":"string","format":"string","default":""}}},"headers":{"X-RateLimit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer","example":100}},"X-RateLimit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer","example":95}},"X-RateLimit-Reset":{"description":"The number of seconds left in the current period","schema":{"type":"integer","example":3600}},"X-Request-ID":{"description":"Unique identifier for the request","schema":{"type":"string","format":"uuid","example":"123e4567-e89b-12d3-a456-426614174000"}}},"responses":{"BadRequest":{"description":"Bad Request","headers":{"X-Request-ID":{"$ref":"#/components/headers/X-Request-ID"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}},"application/xml":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"NotFound":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}},"application/xml":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}},"application/xml":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"Conflict":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Conflict"}},"application/xml":{"schema":{"$ref":"#/components/schemas/Conflict"}}}},"UnprocessableEntity":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntity"}},"application/xml":{"schema":{"$ref":"#/components/schemas/UnprocessableEntity"}}}},"TooManyRequests":{"description":"Too Many Requests","headers":{"X-Request-ID":{"$ref":"#/components/headers/X-Request-ID"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"Retry-After":{"description":"The number of seconds to wait before retrying","schema":{"type":"integer","example":60}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsError"}}}}},"schemas":{"User":{"description":"A user","type":"object","properties":{"id":{"type":"integer","format":"int64","readOnly":true,"examples":[1]},"email":{"type":"string","format":"email","examples":["demo@skillsincloud.com"]},"admin_role":{"type":["string","boolean"],"examples":["inspector",false]},"role_name":{"type":"string","examples":["admin"]},"first_name":{"type":"string","examples":["Demo"]},"last_name":{"type":"string","examples":["SkillsinCloud"]},"full_name":{"type":"string","examples":["Demo SkillsinCloud"]},"approved":{"type":"boolean","examples":[true,false]},"user_duration":{"type":"integer","examples":[1,null]},"fiscal_code":{"type":"string"},"lang":{"type":"string"},"disabled":{"type":"boolean"},"external_id":{"type":"string"},"invitation_created_at":{"type":"datetime"},"invitation_accepted":{"type":"boolean"},"invitation_url":{"type":"string"},"users_limit_reached":{"type":"integer"},"user_fields":{"type":"array","items":{"$ref":"#/components/schemas/UserField"}},"user_settings":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","format":"int64","readOnly":true,"examples":[1]},"name":{"type":"string"},"label":{"type":"string"},"value":{"type":"string"},"editable":{"type":"boolean"},"hidden":{"type":"boolean"},"setting_type":{"type":"string"}}}},"groups":{"type":"array","items":{"$ref":"#/components/schemas/Group"}},"profileImage":{"type":"object","properties":{"id":{"type":"integer","format":"int64","readOnly":true},"filename":{"type":"string"},"url":{"type":"string"}}},"enrolled":{"type":"boolean"},"gamification_points":{"type":"integer"},"completed_courses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","format":"int64","readOnly":true},"title":{"type":"string"}}}},"teacher_lecture_ids":{"type":"array","items":{"type":"integer","format":"int64"}}}},"Course":{"description":"A course","type":"object","properties":{"id":{"type":"integer","format":"int64","readOnly":true,"examples":[1]},"ext_id":{"type":"string","examples":["abcd123"]},"ext_academy":{"type":"string","examples":["abcd123"]},"name":{"type":"string","examples":["Demo"]},"subtitle":{"type":"string"},"description":{"type":"string"},"image_url":{"type":"string"},"certification":{"type":"boolean"},"certification_type":{"type":"string"},"show_percentage":{"type":"boolean"},"show_hours_instead_of_percentage":{"type":"boolean"},"show_comments":{"type":"boolean"},"enroll_email_enabled":{"type":"boolean"},"enroll_type_id":{"type":"integer"},"uuid":{"type":"string"},"url":{"type":"string"},"nextLecture":{"type":"string"},"totLectures":{"type":"integer"},"totalMandatoryLectures":{"type":"integer"},"progress_status":{"type":"integer"},"from_lacerba":{"type":"boolean"},"from_radical_hr":{"type":"boolean"},"product_type":{"type":"string"},"duration":{"type":"integer"},"live_code":{"type":"string"},"start_date":{"type":"datetime"},"end_date":{"type":"datetime"},"language":{"type":"string"},"public":{"type":"boolean"},"show_in_catalog":{"type":"boolean"},"show_rating":{"type":"boolean"},"rating_avg":{"type":"float"},"rating_count":{"type":"integer"},"points":{"type":"integer"},"course_license":{"type":"integer"},"category_license_name":{"type":"string"},"uses_category_license":{"type":"boolean"},"available_licenses":{"type":"integer"},"enrolls_count":{"type":"integer"},"enrolled_groups_count":{"type":"integer"},"external_url":{"type":"string"},"completion_threshold":{"type":"integer"},"end_of_course_survey_id":{"type":"integer"},"certificate_title":{"type":"string"},"lectures":{"type":"array","items":{"$ref":"#/components/schemas/Lecture"}},"tot_path_lectures":{"type":"integer"},"completedLectures":{"type":"integer"},"completedMandatoryLectures":{"type":"integer"},"percentage_value":{"type":"integer"},"percentageCompleted":{"type":"integer"},"duration_completed":{"type":"integer"},"duration_completed_percentage":{"type":"integer"},"duration_progress_formatted":{"type":"string"},"duration_percentage_completed":{"type":"integer"},"completedCourse":{"type":"boolean"},"is_teacher_of":{"type":"boolean"},"course_settings":{"type":"object"},"path":{"type":"string"},"one_to_one":{"type":"boolean"},"expert":{"type":"object","properties":{"id":{"type":"integer","format":"int64","readOnly":true},"full_name":{"type":"string"},"email":{"type":"string"}}},"one_to_one_requires_approval":{"type":"boolean"},"expert_profile":{"type":"object","properties":{"id":{"type":"integer","format":"int64","readOnly":true},"full_name":{"type":"string"},"email":{"type":"string"}}},"mentee":{"type":"object","properties":{"id":{"type":"integer","format":"int64","readOnly":true},"full_name":{"type":"string"},"email":{"type":"string"}}},"one_to_one_live_lectures":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","format":"int64","readOnly":true},"name":{"type":"string"},"start_date":{"type":"datetime"},"duration":{"type":"integer"},"join_url":{"type":"string"}}}},"related_courses":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/SubCourse"},{"$ref":"#/components/schemas/Lecture"}],"discriminator":{"propertyName":"related_course","mapping":{"true":"#/components/schemas/SubCourse","false":"#/components/schemas/Lecture"}}}}}},"Group":{"description":"A Group","type":"object","properties":{"id":{"type":"integer","format":"int64","readOnly":true,"examples":[1]},"name":{"type":"string"},"description":{"type":"string"},"group_type":{"type":"string"},"group_type_translated":{"type":"string"},"origin":{"type":"string"},"origin_translated":{"type":"string"},"uuid":{"type":"string"},"value":{"type":"string"},"has_community":{"type":"boolean"},"admin_check_posts":{"type":"boolean"},"admin_check_post_comments":{"type":"boolean"},"auto_provision_config":{"type":"object"},"courses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"subtitle":{"type":"string"},"path":{"type":"string"}}}}}},"UserField":{"description":"A user field","type":"object","properties":{"id":{"type":"integer","format":"int64","readOnly":true,"examples":[1]},"name":{"type":"string"},"value":{"type":"string"},"mandatory":{"type":"boolean"},"editable":{"type":"boolean"},"hidden":{"type":"boolean"},"field_type":{"type":"string"},"selectable_options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"label":{"type":"string"}}}}}},"Lecture":{"description":"A Lecture","type":"object","properties":{"id":{"type":"integer","format":"int64","readOnly":true,"examples":[1]},"header":{"type":"string"},"mandatory":{"type":"boolean"},"name":{"type":"string"},"live":{"type":"boolean"},"start_date":{"type":"datetime"},"lecture_info":{"type":"string"},"description":{"type":"string"},"course_id":{"type":"integer"},"position":{"type":"integer"},"lectures_limit_reached":{"type":"boolean"},"duration":{"type":"integer"},"external_lecture_id":{"type":"string"},"lecture_type_id":{"type":"string"},"perc_completion":{"type":"float"},"categories":{"type":"array","items":{"type":"string"}},"record_live":{"type":"boolean"},"contents":{"type":"array","items":{"$ref":"#/components/schemas/Content"}},"completedMandatoryLectures":{"type":"integer"},"totalMandatoryLectures":{"type":"integer"},"totalAvailableLectures":{"type":"integer"},"canShow":{"type":"boolean"},"event_type":{"type":"string"},"quiz":{"$ref":"#/components/schemas/Quiz"},"survey":{"$ref":"#/components/schemas/Survey"},"completed":{"type":"boolean"},"is_teacher_of":{"type":"boolean"},"teacher_ids":{"type":"array","items":{"type":"integer"}},"form_id":{"type":"integer"},"form_name":{"type":"string"},"location":{"type":"string"},"uses_instances":{"type":"array"},"available_instances":{"type":"array","items":{"$ref":"#/components/schemas/Instance"}},"user_enrollments":{"type":"array","items":{"$ref":"#/components/schemas/UserEnrollment"}}}},"SubCourse":{"description":"A course related to another course","type":"object","properties":{"ass_id":{"type":"integer","format":"int64","readOnly":true},"ass_position":{"type":"integer"},"id":{"type":"integer","format":"int64","readOnly":true},"name":{"type":"string"},"course":{"type":"boolean"},"show_percentage":{"type":"boolean"},"show_hours_instead_of_percentage":{"type":"boolean"},"certification":{"type":"boolean"},"nextLecture":{"type":"string"},"completedLectures":{"type":"integer"},"percentage_value":{"type":"integer"},"percentageCompleted":{"type":"integer"},"duration_completed":{"type":"integer"},"duration_completed_percentage":{"type":"integer"},"duration_progress_formatted":{"type":"string"},"progress_status":{"type":"string"},"totLectures":{"type":"integer"},"duration":{"type":"integer"},"canShow":{"type":"boolean"},"image_url":{"type":"string"},"areas":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"area_type":{"type":"string"},"name":{"type":"string"}}}},"completedCourse":{"type":"boolean"},"show_page":{"type":"boolean"}}},"Instance":{"description":"Available Instance definition","type":"object","properties":{"id":{"type":"integer","format":"int64","readOnly":true},"start_date":{"type":"datetime"},"end_date":{"type":"datetime"},"capacity":{"type":"string"},"location":{"type":"string"},"notes":{"type":"string"},"invite_only":{"type":"boolean"},"enrolled_count":{"type":"integer"},"available_spots":{"type":"integer"},"utilization_percentage":{"type":"integer"},"content":{"$ref":"#/components/schemas/Content"},"duration_completed":{"type":"integer"}}},"UserEnrollment":{"description":"UserEnrollment def","type":"object","properties":{"id":{"type":"integer","format":"int64","readOnly":true},"status":{"type":"string"},"created_at":{"type":"datetime"},"lecture_instance":{"type":"object","properties":{"id":{"type":"integer"},"start_date":{"type":"datetime"},"end_date":{"type":"datetime"},"location":{"type":"string"},"content":{"$ref":"#/components/schemas/Content"}}}}},"Content":{"description":"Content def","type":"object","properties":{"id":{"type":"integer","format":"int64","readOnly":true},"content_type":{"type":"string"},"content_code":{"type":"string"},"event_type":{"type":"string"},"user":{"type":"string","format":"email"},"filename":{"type":"string"},"url":{"type":"string"},"file_type":{"type":"string"}}},"Quiz":{"description":"Quiz def","type":"object","properties":{"id":{"type":"integer","format":"int64","readOnly":true},"repeatable":{"type":"boolean"},"min_pass_score":{"type":"integer"},"feedback":{"type":"boolean"},"go_forward":{"type":"boolean"},"completed":{"type":"boolean"},"passed":{"type":"boolean"},"currentAttempt":{"type":"integer"},"lecture_id":{"type":"integer"},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"body":{"type":"string"},"created_at":{"type":"string"},"answered":{"type":"boolean"},"answers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"body":{"type":"string"},"correct":{"type":"boolean"}}}}}}}}},"Survey":{"description":"Survey def","type":"object","properties":{"id":{"type":"integer","format":"int64","readOnly":true},"title":{"type":"string"},"description":{"type":"string"},"is_anonymous":{"type":"boolean"},"allow_multiple_submissions":{"type":"boolean"},"is_end_of_course_feedback":{"type":"boolean"},"lecture_id":{"type":"integer"},"created_at":{"type":"datetime"},"updated_at":{"type":"datetime"},"completed":{"type":"boolean"},"can_submit":{"type":"boolean"},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"body":{"type":"string"},"question_type":{"type":"string"},"is_required":{"type":"boolean"},"position":{"type":"integer"},"include_in_course_rating":{"type":"boolean"},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"value":{"type":"string"},"position":{"type":"integer"}}}}}}}}},"Credentials":{"description":"Credentials to authenticate","type":"object","required":["grant_type"],"properties":{"grant_type":{"type":"string","examples":["password","client_credentials","refresh_token","x-api-key"]},"email":{"type":"string","format":"email","examples":["demo@skillsincloud.com"]},"password":{"type":"string","writeOnly":true,"examples":["skillsincloud","qwerty123"]},"refresh_token":{"type":"string","examples":["w_AJAwHXck_YwFpjP3wXhC2cfHcbf-4mHxSuxB7Ej3tVZhf0x6fHDETF3CXns6g5bXfwZYgaVKsv4drKFF5DXQ"]}}},"Token":{"description":"A JWT token representation","type":"object","properties":{"access_token":{"type":"string","examples":["eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"]},"token_type":{"type":"string","examples":["Bearer"]},"expires_in":{"type":"number","examples":[7200]},"refresh_token":{"type":"string","examples":["w_AJAwHXck_YwFpjP3wXhC2cfHcbf-4mHxSuxB7Ej3tVZhf0x6fHDETF3CXns6g5bXfwZYgaVKsv4drKFF5DXQ"]},"refresh_token_expires_in":{"type":"number","examples":[2592000]},"scope":{"type":"string","examples":[""]},"created_at":{"type":"number","examples":[1779963196]}}},"PaginatedResource":{"description":"A paginated representation of a resource.","type":"object","properties":{"data":{"description":"The paginated data. The key is the resource type (example: users, courses, etc.) and the value is an array of the resource objects.","type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/User"},{"$ref":"#/components/schemas/Course"}]}},"pagy":{"type":"object","properties":{"scaffold_url":{"type":["string"],"examples":["/api/v2/users?page=__pagy_page__&items=5"]},"first_url":{"type":["string"],"examples":["/api/v2/users?page=1&items=5"]},"prev_url":{"type":["string"],"examples":["/api/v2/users?page=&items=5"]},"page_url":{"type":["string"],"examples":["/api/v2/users?page=1&items=5"]},"next_url":{"type":["string"],"examples":["/api/v2/users?page=2&items=5"]},"last_url":{"type":["string"],"examples":["/api/v2/users?page=20&items=5"]},"count":{"type":"integer","format":"int64","examples":[100]},"page":{"type":"integer","format":"int64","examples":[1]},"items":{"type":"integer","format":"int64","examples":[5]},"pages":{"type":"integer","format":"int64","examples":[22]},"last":{"type":"integer","format":"int64","examples":[22]},"in":{"type":"integer","format":"int64","examples":[5]},"from":{"type":"integer","format":"int64","examples":[1]},"to":{"type":"integer","format":"int64","examples":[5]},"prev":{"type":["integer",null],"format":"int64","examples":[null]},"next":{"type":["integer",null],"format":"int64","examples":[2]}}}}},"BadRequestError":{"x-scalar-ignore":true,"description":"RFC 7807 (https://datatracker.ietf.org/doc/html/rfc7807)","type":"object","properties":{"error":{"type":"string","examples":["https://example.com/errors/bad-request"]},"error_details":{"type":"string","examples":["Bad Request"]},"id":{"type":["integer",null],"format":"int64","examples":[9999]}}},"ForbiddenError":{"x-scalar-ignore":true,"description":"Error response for forbidden access (RFC 7807). Returned when the user does not have permission to access the requested resource.","type":"object","properties":{"error":{"type":"string","examples":["https://example.com/errors/forbidden"]},"error_details":{"type":"string","examples":["Forbidden"]},"id":{"type":["integer",null],"format":"int64","examples":[9999]}}},"NotFoundError":{"x-scalar-ignore":true,"description":"Error response for resource not found (RFC 7807). Returned when the requested resource does not exist.","type":"object","properties":{"error":{"type":"string","examples":["https://example.com/errors/not-found"]},"error_details":{"type":"string","examples":["Not Found"]},"id":{"type":["integer",null],"format":"int64","examples":[99999]}}},"UnauthorizedError":{"x-scalar-ignore":true,"description":"Error response for unauthorized access (RFC 7807). Returned when authentication is required or has failed.","type":"object","properties":{"error":{"type":"string","examples":["https://example.com/errors/not-found"]},"error_details":{"type":"string","examples":["Unauthorized"]},"id":{"type":["integer",null],"format":"int64","examples":[null]}}},"Conflict":{"x-scalar-ignore":true,"description":"Error response for resource conflicts (RFC 7807). Returned when the request conflicts with the current state of the resource.","type":"object","properties":{"error":{"type":"string","examples":["https://example.com/errors/conflict"]},"error_details":{"type":"string","examples":["Conflict"]},"id":{"type":["integer",null],"format":"int64","examples":[null]}}},"UnprocessableEntity":{"x-scalar-ignore":true,"description":"Error response for unprocessable entity (RFC 7807). Returned when the request is well-formed but contains semantic errors.","type":"object","properties":{"error":{"type":"string","examples":["https://example.com/errors/unprocessable-entity"]},"error_details":{"type":"string","examples":["Unprocessable Entity"]},"id":{"type":["integer",null],"format":"int64","examples":[null]}}},"TooManyRequestsError":{"x-scalar-ignore":true,"description":"Error response for rate limiting (RFC 7807). Returned when the client has exceeded the rate limit for requests.","type":"object","properties":{"error":{"type":"string","examples":["https://example.com/errors/too-many-requests"]},"error_details":{"type":"string","examples":["Too Many Requests"]},"id":{"type":["integer",null],"format":"int64","examples":[null]}}},"InviteUsers":{"description":"Invite Users","type":"object","required":["users"],"properties":{"users":{"type":"object","examples":[{"email":"mario.rossi@gmail.com","first_name":"Mario","last_name":"Rossi","external_id":"1000","disabled":false}]},"course_ids":{"type":"array","items":{"type":"int"},"examples":[[1,2,3]],"default":[]},"send_invitation":{"type":"boolean","examples":[true,false],"default":false}}}}}}