Did you end up finding a solution to this @andrepln ? If so could you provide a bit more info as to how you went about this? I'm trying to do a similar thing currently and coming up with issues.
Could you please provide the full error response you are receiving? Also, it looks like you are trying to use an AJAX request with a HubSpot API. As you can see here that is not supported with the HubSpot API. The workaround the documentation states is: In order to use JavaScript/AJAX, you would need to make the request (excluding any authentication) to an external server that could then add the needed authentication and make requests to HubSpot's APIs server-side.
Could you try to implement that? If you have more details please send them on and we can take a look!