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,
  "date_due_naive": date-due-naive,
  "date_start_naive": date-start-naive,
  "followers": [
    { "id": follower-id }, ...
  ]
}

Input parameters

Name

Required

Type

Description

title

Required

text or html (50 character limit), bleached

Task title.

description

text or html (no length limit), bleached

Task description.

reply‑type

Required

"quick" or "click_done" or "form_submission"

  • Basic,Photo, andForm* task completion requirements, respectively.

form-template-id

Required if reply-type is "form_submission"

integer

Task form submission id.

time_zone

time_zone (See below)

Time zone for location of task activity.

project‑id

integer

Task project id.

account‑id

integer

Task account id.

reporter‑id

integer

Task reporter user id.

assignee‑id

integer

Task assignee user id. Must be visible to reporter.

date‑start

timestamp (See below)

Datetime task is available in UTC.

date‑due

timestamp (See below)

Datetime task is due in UTC.

date-start-naive

timestamp (See below)

Datetime task is available in the timezone of the account associated with the task.*

date-due-naive

timestamp (See below)

Datetime task is due in the timezone of the account associated with the task.*

follower‑id

integer

Task follower user id.

  • For using date start and date due naive - This will assign the time in the local time task's timezone (example: 9pm for the store - in whatever timezone the store exists). The assignment of time zone to the task is based on the following fallback logic. Account's timezone, then assignee user's timezone, then the company's time zone.
    Note: time_zone cannot be sent over in the task generation POST if using naive timezones.
    Note: naive and non-naive dates cannot be mixed, only one type may be sent.

Parameter type descriptions

Parameter type

Details

time_zone

TZ column of https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List

timestamp

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
}