Create taskPOST

Description

Creates a new task. Returns an object containing the created task's ID. If task numbering is enabled for the board, it will also return the task's number.

Permissions

The API token needs the Add tasks permission.

Request format

curl -X POST https://kanbanflow.com/api/v1/tasks -H "Content-type: application/json" -d '{ "<PROPERTY_1>": <PROPERTY_VALUE_1>, "<PROPERTY_2>": <PROPERTY_VALUE_2>, ... "<PROPERTY_N>": <PROPERTY_VALUE_N> }'

Example request

curl -X POST https://kanbanflow.com/api/v1/tasks -H "Content-type: application/json" -d '{ "name": "Write report", "columnId": "C9LIn5sEEpqT", "color": "red" }'

Example response

{
    "taskId": "T3s6UGyzY"
}

Valid properties

PropertyTypeComment
nameStringRequired. The name of the task.
columnIdStringRequired. The ID of the column to add the task to. See Get board for information about how to get a column's ID.
swimlaneIdStringThe ID of the swimlane to add the task to. Required if the board has swimlanes. See Get board for information about how to get a swimlane's ID.
positionString / IntegerThe index of the task in the column/swimlane or date group. groupingDate is required if the column is date grouped. Valid values: Positive number, "top" or "bottom". Note: The index is zero-based.
colorStringThe color of the task. Valid color values: yellow, white, red, green, blue, purple, orange, cyan, brown, or magenta. It needs to be in lowercase.
descriptionStringThe description of the task.
numberObjectThe task number consists of an integer value and an optional prefix. If numbering is enabled on the board, the task will automatically be given a number if the property is not present. Examples: { "value": 5 }, { "prefix": "BUG-", "value": 5 }
responsibleUserIdStringThe ID of the responsible user. See Get members for information about how to get a member's ID.
totalSecondsSpentIntegerDeprecated. The time spent on the task in seconds. Examples: 1 hour = 3600, 2 hours = 7200 etc. Note: Manual time entries will be added to reflect the added time. See Add manual time entry for more control of how time is added to the task.
totalSecondsEstimateIntegerThe estimated time for the task in seconds. Examples: 1 hour = 3600, 2 hours = 7200 etc. Default: 0.
pointsEstimateFloatEstimated points for the task. Default: 0.
groupingDateStringThe date that the task is grouped by. Can only be used if column is date grouped. Valid format is YYYY-MM-DD, e.g. 2023-12-31. Use null or empty string if you want it grouped as unknown date. If not set and column date grouped, then it will automatically use today's date for the UTC timezone.
datesArrayA date requires a dueTimestamp and has an optional targetColumnId. See Create/update date for more details about the optional properties. Omit targetColumnId to make the date done when the task reaches any archived column. Examples: { "dueTimestamp": "2023-03-01T12:00:00Z", "targetColumnId": "COxkPjd0wra4" }, { "dueTimestamp": "2023-03-01T12:00:00Z" }
subTasksArrayA subtask consists of a name and an optional finished flag. See Create subtask for more details. Examples: { "name": "Write", "finished": true }, { "name": "Proofread" }
labelsArrayA label consists of a name and an optional pinned flag. See Create label for more details. Examples: { "name": "Project X" }, { "name": "Priority", "pinned": true }
collaboratorsArrayA collaborator consists of a userId. See Add collaborator for more details. Examples: { "userId": "UHJ9JgtA" }
timelineObjectA timeline consists of a start and an end date. Valid format is YYYY-MM-DD, e.g. 2023-12-31. Example: { "start": "2024-01-01", "end": "2024-01-31" }