Example in Java

We're going to send an existing document with id 53 via post mail. In Color and as fast as possible!

HttpClient httpClient = new DefaultHttpClient();

try {
    HttpPost request = new HttpPost("https://api.pingen.com/document/send/id/30/token/MYTOKEN");

    JSONObject j = new JSONObject();
    j.put("speed", "1");
    j.put("color", "1");

    List nameValuePairs = new ArrayList(1);
	nameValuePairs.add(new BasicNameValuePair("data", j.toString()));

	UrlEncodedFormEntity params = new UrlEncodedFormEntity(nameValuePairs);
	request.addHeader("content-type", "application/x-www-form-urlencoded");
	request.setEntity(params);
	HttpResponse response = httpClient.execute(request);

	// handle response here...
} catch (Exception ex) {
	// handle exception here
} finally {
	httpClient.getConnectionManager().shutdown();
}