Solspace Freeform plugin: AJAX without jQuery – how?
From the action you are currently posting to a controller see here 

The example shows that in your case it would be looking for a plugin called "Freeform" with a controller named "api" and then within that controller there would need to be a "form" action.  If this isn't there then the page will return a 404 or error as it cannot find the route.

You may be able to create the same thing without using jQuery with something like this method