Task Workflows


Open Task

If you're loading a remote script, be sure to set the Access-Control-Allow-Origin header to *. This is required

<?php


$json = '{
  "USERID": "YOUR_USERID_HERE",
  "KEY": "YOUR_API_KEY_HERE",
  "WebHook": "https://{{yourdomain}}/processWebHook/index.php?id=whaterurlencodeddatayouwant",
  "Budget": "100",
  "Title": "Example Request",
  "Description": "This is an example task request.",
  "Project":"Organizing_Stuff",
  "EstimatedDuration": 600,
  "ExpiresAfter": 86400,
  "Keywords": [
    "Keyword1",
    "Keyword2"
  ],
  "AutoApproveAfter": 86400,
  "Instructions": "This is where you say what needs to be done.",
  "Content": {
     "0":{
        "Width": 8,
        "Type": "pdf",
        "Options": {
          "url": "http://portal.atomtask.com/task/sample.pdf"
        }
      },
      "1":{
        "Width": 8,
        "Type": "text",
        "Options": {
          "value": "Go to google and search for the \'Country Villas Homeowners Association\' and enter the url."
        }
      }
  }, 
  "Questions": {
    "0": {
      "Width": 4,
	  "Step":0,
      "Body": [
        {
          "parent": 0,
          "label": "What type of dwelling is listed on the document?",
          "type": "SELECT",
          "width": "12",
          "element_id": 0,
          "subType": 0,
          "subType_data": {
            "Single Family Home": "0",
            "Town Home": "1",
            "Condo": "2"
          }
        },
        {
          "parent": "1",
          "label": "What the fuck",
          "type": "SELECT",
          "width": "12",
          "element_id": 1,
          "subType": "0",
          "subType_data": {
            "a": "1",
            "b": "2",
            "c": "3"
          }
        }
      ]
    },
    "1": {
      "Width": 4,
	  "Step":1,
      "Body": [
        {
          "parent": "2",
          "label": "Could You Located The Homeowner Association URL?",
          "type": "SELECT",
          "width": "12",
          "element_id": 2,
          "subType": 0,
          "subType_data": {
            "No": "0",
            "Yes": "1"
          }
        }
      ]
    }
  }
}';


$curl = curl_init();
// Set some options - we are passing in a useragent too here
curl_setopt_array($curl, [
    CURLOPT_RETURNTRANSFER => 1,
    CURLOPT_URL => 'https://api.atomtask.com/OpenTask/',
	CURLOPT_POST => 1,
    CURLOPT_POSTFIELDS =>$json 
]);
// Send the request & save response to $resp
$resp = curl_exec($curl);
// Close request to clear up some resources
print $resp;
curl_close($curl);

If you're loading a remote script, be sure to set the Access-Control-Allow-Origin header to *. This is required

<?php


$json = '{
  "USERID": "YOUR_USERID_HERE",
  "KEY": "YOUR_API_KEY_HERE",
  "WebHook": "https://api.atomtask.com/processWebHook/index.php?id=whaterurlencodeddatayouwant",
  "Budget": "100",
  "Title": "Trying Out Mturk",
  "Description": "Answer 3 simple Questions.",
  "Project":"Organizing_Stuff",
  "EstimatedDuration": 600,
  "ExpiresAfter": 86400,
  "Keywords": [
    "Keyword1",
    "Keyword2"
  ],
  "AutoApproveAfter": 86400,
  "Instructions": "This is a sample request. You will be asked to enter two values from a pdf, then enter a url from a google search.",
  "Content": {
     "0":{
        "Width": 8,
        "Type": "pdf",
        "Options": {
          "url": "https://www.atomtask.com/loadPDF.php"
        }
      },
      "1":{
        "Width": 8,
        "Type": "text",
        "Options": {
          "value": "Go to google and search for the \'Country Villas Homeowners Association dallas\' and enter the url for the first site in the list."
        }
      }
  }, 
  "Questions": {
	"TemplateID" : "47f9f2cebeac5c557d398d76fae8c549_5fa478da418a8"
  }
}';


$curl = curl_init();
// Set some options - we are passing in a useragent too here
curl_setopt_array($curl, [
    CURLOPT_RETURNTRANSFER => 1,
    CURLOPT_URL => 'https://api.atomtask.com/OpenTask/',
	CURLOPT_POST => 1,
    CURLOPT_POSTFIELDS =>$json 
]);
// Send the request & save response to $resp
$resp = curl_exec($curl);
// Close request to clear up some resources
print $resp;
curl_close($curl);

Webhooks

If you're loading a remote script, be sure to set the Access-Control-Allow-Origin header to *. This is required





{
  "Content": [
    {
      "Width": 8,
      "Type": "pdf",
      "Options": {
        "url": "https://www.atomtask.com/loadPDF.php"
      }
    },
    {
      "Width": 8,
      "Type": "text",
      "Options": {
        "value": "Go to google and search for the 'Country Villas Homeowners Association dallas' and enter the url for the first site in the list."
      }
    }
  ],
  "Questions": [
    {
      "Width": "4",
      "Offset": "0",
      "Step": 0,
      "Body": [
        {
          "parent": 0,
          "label": "What is the persons name?",
          "width": "12",
          "type": "INPUT",
          "element_id": 0,
          "step": 0,
          "completedValue": "Ana "
        },
        {
          "parent": "1",
          "label": "Sex",
          "width": "12",
          "type": "SELECT",
          "element_id": 1,
          "step": 0,
          "subType": "0",
          "subType_data": {
            "Female": "0",
            "Male": "1"
          },
          "completedValue": "0"
        }
      ]
    },
    {
      "Width": "4",
      "Offset": "0",
      "Step": 1,
      "Body": [
        {
          "parent": "2",
          "label": "Enter The URL Below",
          "width": "12",
          "type": "TEXTAREA",
          "element_id": 2,
          "step": 1,
          "completedValue": "https://www.cvhawebsite.org/"
        }
      ]
    }
  ],
  "Qualifications": [],
  "id": "47f9f2cebeac5c557d398d76fae8c549_5fd91a7135ea4"
}


Reject Task Work Output

If you're loading a remote script, be sure to set the Access-Control-Allow-Origin header to *. This is required

<?php
$json = '';

$curl = curl_init();
// Set some options - we are passing in a useragent too here
curl_setopt_array($curl, [
    CURLOPT_RETURNTRANSFER => 1,
    CURLOPT_URL => 'https://api.atomtask.com/OpenTask/',
	CURLOPT_POST => 1,
    CURLOPT_POSTFIELDS =>$json 
]);
// Send the request & save response to $resp
$resp = curl_exec($curl);
// Close request to clear up some resources
print $resp;
curl_close($curl);


List Tasks

If you're loading a remote script, be sure to set the Access-Control-Allow-Origin header to *. This is required

<?php
$json = '';

$curl = curl_init();
// Set some options - we are passing in a useragent too here
curl_setopt_array($curl, [
    CURLOPT_RETURNTRANSFER => 1,
    CURLOPT_URL => 'https://api.atomtask.com/OpenTask/',
	CURLOPT_POST => 1,
    CURLOPT_POSTFIELDS =>$json 
]);
// Send the request & save response to $resp
$resp = curl_exec($curl);
// Close request to clear up some resources
print $resp;
curl_close($curl);


Get Task Information

If you're loading a remote script, be sure to set the Access-Control-Allow-Origin header to *. This is required

<?php
$json = '';

$curl = curl_init();
// Set some options - we are passing in a useragent too here
curl_setopt_array($curl, [
    CURLOPT_RETURNTRANSFER => 1,
    CURLOPT_URL => 'https://api.atomtask.com/OpenTask/',
	CURLOPT_POST => 1,
    CURLOPT_POSTFIELDS =>$json 
]);
// Send the request & save response to $resp
$resp = curl_exec($curl);
// Close request to clear up some resources
print $resp;
curl_close($curl);


Cancel Task

If you're loading a remote script, be sure to set the Access-Control-Allow-Origin header to *. This is required

<?php
$json = '';

$curl = curl_init();
// Set some options - we are passing in a useragent too here
curl_setopt_array($curl, [
    CURLOPT_RETURNTRANSFER => 1,
    CURLOPT_URL => 'https://api.atomtask.com/OpenTask/',
	CURLOPT_POST => 1,
    CURLOPT_POSTFIELDS =>$json 
]);
// Send the request & save response to $resp
$resp = curl_exec($curl);
// Close request to clear up some resources
print $resp;
curl_close($curl);