Jupyter Kernel HTTP Endpoint: Which information is needed?

For some reason I can’t start a kernel through the API

resp = await self.session.post(
    self.notebook_url / 'api/kernels', 
    headers={'X-XSRFToken': self.xsrf_token})

The full original code is in https://github.com/yuvipanda/hubtraf/blob/80d33a9cdd31c68c318dce18cc24a30dc2769f49/hubtraf/user.py#L138 .

Instead of a working kernel I receive a

{"status": 405, "message": "Method Not Allowed"}

The funny thing is that the code worked in the past, it must be related to some update. Last I ran it in August 2019. docker automatically updates the JupyterHub I am using.

The documentation at https://github.com/jupyter/jupyter/wiki/Jupyter-Notebook-Server-API#kernel-api creates the impression that posting is fine. Here this also seems to be ok: github-DOT-com/jupyter/notebook/blob/master/notebook/services/kernels/handlers.py#L36 (sorry, there is a limitation to two links for a new user).

Does anybody know how solve this? I want to continue to create kernels through API calls.

Thank you so much!