tasks.tasks.add
Adds a new task.
Parameters
-
name
POST
Task name.
-
uuid
POST
Unique task identifier as a string of maximum 36 characters. Can be generated by a client app using any convenient algorithm.
-
project_id
POST
ID of the project to which the task must belong.
-
text
POST
Optional
Task description.
-
assigned_contact_id
POST
Optional
ID of the user to whom the task must be assigned.
-
milestone_id
POST
Optional
The milestone to which the task must belong.
-
priority
POST
Optional
Priority: -1 (low), 0 (normal), 1 (high), 2 (urgent), 3 (burns). If no specified then the normal priority is set: 1.
-
status_id
POST
Optional
Task status. If not specified then the status with ID = 0 is used (“New”).
-
hidden_timestamp
POST
Optional
Timestamp of sending the task to the archive. A value above zero means that the task is in the archive.
-
due_date
POST
Optional
Deadline date in the “yyyy-mm-dd” format.
-
files_hash
POST
Optional
The hash of files uploaded using the tasks.attachments.add method if you need to attach them to the new task.
-
format
GET
Optional
Sets response format. Available options:
json
(default),xml
.
Return value
Array with the following keys:
- id int Task ID.
- name string Task name.
- text string Task description.
- text_stripped string Task description without HTML tags, truncated to maximum 256 characters.
- assigned_contact array|null Information about the user, to which the task has been assigned, with the following keys:
- assigned_contact['id'] int User ID.
- assigned_contact['name'] string User name.
- assigned_contact['photo_url'] string URL of a 96x96 pixels large user image.
- attachments array The list of files attached to the task. Each array item is an array with the following keys:
- attachments[]['id'] int File ID.
- attachments[]['code'] string Random file code.
- attachments[]['contact'] array The properties of the user, who has added the task, as an array with the following keys:
- attachments[]['contact']['id'] int User ID.
- attachments[]['contact']['name'] string User name.
- attachments[]['contact']['photo_url'] string URL of a 96x96 pixels large user image.
- attachments[]['create_datetime'] string Date and time of the task creation in the ISO 8601 format.
- attachments[]['download_url'] string File URL.
- attachments[]['ext'] string File name extension.
- attachments[]['is_image'] bool Flag denoting whether the file contains an image.
- attachments[]['log_id'] int ID of the entry about the added task in the user actions log.
- attachments[]['name'] string File name.
- attachments[]['preview_url'] string URL of the file’s preview image.
- attachments[]['size'] int File size in bytes.
- create_contact array Information about the user, who has added the task, as an array with the following keys:
- create_contact['id'] int User ID.
- create_contact['name'] string User name.
- create_contact['photo_url'] string URL of a 96x96 pixels large user image.
- create_datetime string Date and time of the task adding in the ISO 8601 format.
- due_date date|null Deadline date.
- milestone_id int|null Milestone ID.
- next_status_id int ID of the next status according to the settings of the project to which the task belongs.
- number int Task’s number within its project.
- priority int Task priority.
- project array Information about the project, to which the task belongs, as an array with the following keys:
- project['id'] int Project ID.
- project['name'] string Project name.
- project['archive_datetime'] string|null Date and time of sending the project to the archive in the ISO 8601 format.
- project['color'] string Color name to highlight tasks.
- project['contact'] array The properties of the user who has created the project as an array with the following keys:
- project['contact']['id'] int User ID.
- project['contact']['is_me'] bool Flag denoting that the project has been created by the current user.
- project['contact']['name'] string User name.
- project['contact']['photo_url'] string URL of a 96x96 pixels large user image.
- project['counts'] array Array of task counters for this project with the following keys:
- project['counts']['active'] int Number of active tasks.
- project['counts']['active_priority'] int Number of active tasks with a high priority.
- project['counts']['closed'] int Number of closed tasks.
- project['counts']['total'] int Total number of tasks.
- project['create_datetime'] string Project creation data and time in the ISO 8601 format.
- project['icon'] string Logo URL.
- project['sort'] int Sort value.
- project_id int Project ID.
- status_id int Status ID.
- uuid string Unique task identifier.