Create Task

The Create Task API will allow you to create and update a task within Zenput.

Below is a sample call and a full description of input format, input parameters, and success and error output formats.

POST: /api/v1/tasks/task/save/

$ curl -X POST \
  https://www.zenput.com/api/v1/tasks/task/save/ \ 
  -H 'X-API-TOKEN: your-api-token-goes-here' \
  -d '{
    "title": "Bathroom Cleanliness",
    "reply": {
        "type": "form_submission",
        "form_template": {"id": 27}
    },
    "assignee": {"id": 1},
    "followers": [{"id": 2}],
    "date_due": "2018-07-01"
}'

Input format

{
  "title": title,
  "description": description,
  "reply": {
    "type": reply-type,
    "form_template": format-template-id
  },
  "time_zone": time_zone,
  "project": {
    "id": project-id
  },
  "account": {
    id: account-id
  },
  "reporter": {
    id: reporter-id
  },
  "assignee": {
    id: assignee-id
  },
  "date_start": date-start,
  "date_due": date-due,
  "followers": [
    { "id": follower-id }, ...
  ]
}

Input parameters

NameRequiredTypeDescription
titleRequiredtext or html (50 character limit), bleachedTask title.
descriptiontext or html (no length limit), bleachedTask description.
reply‑typeRequired"quick" or "click_done" or "form_submission"Basic, Photo, and Form task completion requirements, respectively.
form-template-idRequired if reply-type is "form_submission"integerTask form submission id.
time_zonetime_zone (See below)Time zone for location of task activity.
project‑idintegerTask project id.
account‑idintegerTask account id.
reporter‑idintegerTask reporter user id.
assignee‑idintegerTask assignee user id. Must be visible to reporter.
date‑starttimestamp (See below)Date task is available.
date‑duetimestamp (See below)Date task is due.
follower‑idintegerTask follower user id.

Parameter type descriptions

Parameter typeDetails
time_zoneTZ column of https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List
timestamp- Any format supported by https://labix.org/python-dateutil, in particular ISO 8601 as described in https://en.wikipedia.org/wiki/ISO_8601
- A MongoDB Extended JSON date as described in https://docs.mongodb.com/manual/reference/mongodb-extended-json/#date

Output format, success

{
    "status": 200,
    "message": "Task saved",
    "results": {
        "id": task-id
    },
    "success": true
}

Output format, failure

{
    "status": 500,
    "message": "Problem saving task",
    "exception": "Error detail appears here",
    "success": false
}