•••
 
Documentation   /   API   /   API: Starting tasks
 
 

API: Starting tasks

 

Endpoint

POST https://plainly.com/start

Parameters

Parameter Required Description
key Yes The workflow's API key, from the workflow's Developer tab.
name Recommended A name for the task, to help you find it. If blank, the task is named "External task #{n} from {IP address}".
passed No Variables for the task, as {key_1}_IS_{value_1}_AND_{key_2}_IS_{value_2}.
no_redirect No 1 returns a JSON response with the new task's key. Otherwise the response redirects to the new task.
silent No 1 opens the task in silent mode after it starts.
mode No test starts a test task.
{any_other_name} No Any other parameter becomes a task variable of the same name.

Variables in passed and in other parameters work exactly like launch form fields: the workflow can use them as {{variable_name}}. If both set the same name, passed wins.

Example request

curl -X POST https://plainly.com/start \
  --data-urlencode "key=YOUR_WORKFLOW_API_KEY" \
  --data-urlencode "no_redirect=1" \
  --data-urlencode "name=Jane Doe" \
  --data-urlencode "candidate_name=Jane Doe" \
  --data-urlencode "candidate_email=jane@example.com" \
  --data-urlencode "start_date=2027-01-05"

On success

{
  "data": {
    "status": 200,
    "title": "Task started",
    "detail": "1a2b3c4d5e6f7g8h"
  }
}

detail is the new task's key. The response is only JSON when no_redirect=1. The response may also include warnings.

Errors

Status Title Detail Cause
400 Missing attribute You need a key. No key was sent.
400 Invalid attribute Your key was invalid. The key doesn't match a workflow.
400 Invalid attribute Your workflow isn't ready yet. The workflow has no items yet.
400 Duplicate task This looks like a duplicate task. A task with the same name and variables was started in the last hour.
500 Technical error Something went wrong. Please contact us. A problem on Plainly's side.

Start links

The Developer tab also shows a start link for the workflow. Opening it in a browser starts a task and goes straight to it, which suits public forms, kiosks and links in emails. Use the start link for people, and POST with no_redirect=1 for systems.