Hello @GabrieleMaurina,
The quiz extension API endpoints currently listed in the Canvas REST API documentation will only work for classic quizzes, so it is currently not possible to use the Canvas API to set time extensions on New Quizzes.
The Canvas Product Roadmap has the following listed as a potential release for Q4 '24 / Q1 '25:
API enhancements enable admins and instructors to customize test-taking accommodations in New Quizzes, adapting to varying levels of student needs and enhancing testing experiences.
Keep in mind that this time frame may change. This feature was originally listed for Q1 or Q2 2024, but it has since been pushed back as you can now see. It is also unclear how this may be implemented in the API and what functionality will be provided. Please see this response from one of the Canvas product managers about the work on the New Quizzes API and why the updates have been delayed.