This worked for me:
<?php
$fields = array(
'api_key' => 'a71cb5058c6be27e42806ad788bc7b0008af9c15170d1be1827a24c8e8334107',
'api_username' => 'blake.erickson',
'email' => 'test' . rand() . '@example.com',
'custom_message' => 'Please join my awesome forum'
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"http://localhost:3000/invites");
curl_setopt($ch, CURLOPT_POST, count($fields));
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($fields));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$server_output = curl_exec ($ch);
curl_close ($ch);
print_r($server_output);
?>