Wait @dbrennand , changing the curl in this way fixed the problem:
$ curl -X 'POST' "https://galaxy.ansible.com/api/v1/imports/" \
-H 'Content-Type: application/json' \
-H "Authorization: Token ${GTOKEN}" \
--data-raw '{"github_repo": "kpa_generator", "github_user": "mmul", "alternate_clone_url": "https://github.com/mmul-it/kpa_generator"}'
{"results":[{"id":2153821008210868407066805016595163860,"pulp_id":"019ecf93-0b25-721e-864e-c5838bda6ad4","github_user":"mmul","github_repo":"kpa_generator","github_reference":null,"alternate_namespace_name":null,"alternate_role_name":null,"alternate_clone_url":"https://github.com/mmul-it/kpa_generator","summary_fields":{"role":{"name":null}}}]}
So with -H 'Content-Type: application/json' it seems to work. Thanks for showing me this magic secret option ![]()