API POST for New User

Your script is Javascript (jQuery). Using type="application/json" is generally for JSON in the script not Javascript. Here is an example:

<script id="data" type="application/json">
{"org": 10, "items":["one","two"]}
</script>

My understanding is your script tags should look like this:

<script>
$.ajax({
method: "POST",
url: "https://site.co/invites",
headers: { "Api-Username": "system", "Api-Key": "12345" },
data: { 
"email": "grow@site.co",
"group_names": "Alumni",
"custom_message": "Welcome123"
}
});
</script>

For Javascript, you don’t need to specify type="javascript" anymore, as this was made obsolete a while back.