API Documentation

Create task

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.

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.
columnIdStringOne of columnId or columnIndex is required. See Get board for information about how to get a column's ID.
columnIndexIntegerDeprecated. One of columnId or columnIndex is required. 0 is the first column, 1 the second column, etc.
swimlaneIdStringRequired if the board has swimlanes. See Get board for information about how to get a swimlane's ID.
positionString / IntegerOptional. The 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.
colorStringOptional. Valid color values: yellow, white, red, green, blue, purple, orange, cyan, brown, or magenta. It needs to be in lowercase.
descriptionStringOptional.
numberObjectOptional. The 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 }
responsibleUserIdStringOptional. The ID of the responsible user. See Get users tab for information about how to get a user's ID.
totalSecondsSpentIntegerDeprecated. 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 under Create task for more control of how time is added to the task.
totalSecondsEstimateIntegerOptional (default=0). Examples: 1 hour = 3600, 2 hours = 7200 etc.
pointsEstimateFloatOptional (default=0). Estimated points for the task.
groupingDateStringOptional. 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.
datesArrayOptional. A date requires a dueTimestamp and a targetColumnId. See Create/update date for more details about the optional properties. Example: { "dueTimestamp": "2023-03-01T12:00:00Z", "targetColumnId": "COxkPjd0wra4" }
subTasksArrayOptional. A subtask consists of a name and an optional finished flag. See Create subtask for more details. Examples: { "name": "Write", "finished": true }, { "name": "Proofread" }
labelsArrayOptional. A label consists of a name and an optional pinned flag. See Create label for more details. Examples: { "name": "Project X" }, { "name": "Priority", "pinned": true }
collaboratorsArrayOptional. A collaborator consists of a userId. See Add collaborator for more details. Examples: { "userId": "UHJ9JgtA" }