Simple typo; as stated in the doc, the name of the query string parameter is api_key
with an underscore, instead of apikey
(in your code).
You can check it here (highlighted): https://www.classmarker.com/online-testing/docs/api/#groups-links-and-exams:~:text=to%20new%20links-,Parameter,-Type.