Add

Adding a new task

POST https://do.workzeal.com/task/insert

Request Body

Name Type Description
task* JSON
{
  "status": "success",
  "error": "",
  "code": null,
  "rows": 0,
  "pages": 0,
  "page": 0,
  "value": "5001"
}

JSON

All available parameters of the new object
  • company_id - * Client code
  • note - * Task text
  • type_id - * Task type code: GET /directory/35
  • user_id - Assignee code. Defaults to the token owner
  • status_id - Status: 1 for in progress (default), 2 for completed
  • deal_id - Code of the deal the task is linked to
  • contact_id - Contact person code
  • date_start - Start date/time, for example 2026-08-27 15:00. Defaults to now
  • date_finish - End date/time
  • is_hot - 1 for an urgent task
  • reminder_minutes - How many minutes in advance to remind the assignee
  • tags - Comma-separated tags

{
   "company_id": 368132,
   "note": "Call the customer and agree on the delivery terms",
   "type_id": 1,
   "user_id": 37,
   "date_start": "2026-08-27 15:00",
   "date_finish": "2026-08-27 16:00",
   "reminder_minutes": 30
}

Note

Required parameters
company_id (Client code)
note (Task text)
type_id (Task type code; list of types: GET /directory/35)

The token owner automatically becomes the person who assigned the task (assigned by).

Example

curl --location --request POST 'https://do.workzeal.com/task/insert' \
--header 'Authorization: Bearer XXXX-XXXXXXX-XXXXXXX' \
--header 'Content-Type: application/json' \
--data-raw '{
    "company_id": 368132,
    "note": "Call the customer and agree on the delivery terms",
    "user_id": 37,
    "date_start": "2026-08-27 15:00"
  }
  '
var request = require('request');
var options = {
  'method': 'POST',
  'url': 'https://do.workzeal.com/task/insert',
  'headers': {
    'Authorization': 'Bearer XXXX-XXXXXXX-XXXXXXX',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "company_id": 368132,
    "note": "Call the customer and agree on the delivery terms",
    "user_id": 37,
    "date_start": "2026-08-27 15:00"
  })
};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});

Directories

Users

Response

{
  "status": "success",
  "error": "",
  "code": null,
  "rows": 0,
  "pages": 0,
  "page": 0,
  "value": "5001"
}
// value - ID of the new task
Previous
Next