Add

[POST] .../v1/projecttask/add

Creates a task in a project. Create a task inside an existing project, optionally as a subtask, linked to CRM client/deal data, files, observers and description mentions. The method creates the task, initializes the linked chat and sends task notifications and webhooks and returns InsertResult with the new task ID. The request body is required and must contain project_id, name and responsible_user_id; the caller needs task add permission, deal_id is validated for access when supplied and validation failures, parent-task errors, denied access or storage errors are returned as HTTP 200 ErrorResult.

Request Parameters

Name Type Required Description
attachment_file_ids Array of Int64 Optional Attachment file IDs.
client_id Int64 Optional CRM client ID to link to the task.
deal_id Int64 Optional CRM deal ID to link to the task.
description String Optional Task description.
description_mentions Array of CommonMentionInput Optional Structured user mentions in description.
due_date Int64 Optional Due date as Unix time in seconds.
fields Array of FieldValueAdd Optional Custom field values.
inline_file_ids Array of Int64 Optional Inline file IDs.
mention_options CommonMentionOptions Optional Mention processing options.
name String Required Task name.
observer_user_ids Array of Int64 Optional Observer IDs.
parent_task_id Int64 Optional Parent task ID for creating a subtask.
project_id Int64 Required Project ID.
responsible_user_id Int64 Required Responsible user ID.

Request Example

{
  "project_id": 10,
  "name": "Prepare store opening checklist",
  "description": "Collect all operational tasks before opening day.",
  "responsible_user_id": 5,
  "observer_user_ids": [
    18
  ],
  "due_date": 1772527200,
  "attachment_file_ids": [
    42
  ],
  "inline_file_ids": []
}

Response Parameters

Name Type Description
ok Boolean Indicates whether the request completed successfully.
result Insert Created record result.

Response Example

{
  "ok": true,
  "result": {
    "new_id": 101
  }
}