Submit

/api/sendimage/?apikey=apikey&url=url

Our submit endpoint allows you to add new images to the moderation queue. It accepts two required parameters - an API key which can be generated after logging in and the URL to the photo you want moderating. It optionally accepts a custom return ID and return URL.

Accepts

apikey - apikey provided after logging in
url - URL to the image you want us to moderate

returnid (optional) - your ID to identify the image - this will be passed back to you
returnurl (optional) - by default we will send the callback to the URL you set for the site in our admin however you are able to set up a return URL on a per-image basis.

Returns

imageid - unique ID for your image in our system


Example code (PHP)

$ch = curl_init();
$url = "https://www.modraptor.com/api/sendimage/?apikey=$apikey&url=$url";
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$output = curl_exec($ch);
curl_close($ch);

// decode json response and handle it
$decoded = json_decode($output);
if ($decoded->success) {
  echo "Image waiting for review. Imageid: ".$decoded->imageid;
} else {
  echo $decoded->error_description;
  echo $decoded->error_code;
  /* error codes:
    10 - Missing, incorrect length, or malformed API key
    11 - API key not found
    20 - Confirm email before using service
    21 - Account inactive
    22 - No more requests available please purchase more
    30 - Missing or invalid url parameter
    31 - Could not connect to url
  */
}

Get started with 100 free images!