{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/tasks.json","auth":"required","examples":{"codes":[{"code":"var data = {\n\t\tprojectId: projectId,\n\t\tname: \"test api task1\",\n\t\tnotes: \"api notes\",\n\t\tstart: \"2015-04-13T00:00:00\",\n\t\tfinish: \"2015-05-13T00:00:00\",\n\t\tduration: 2400,\n    customColumns:\n      [\n        { name: \"MyCurrencyCol\", type: \"currency\", data: \"95.99\", extendedColumnId:567},\n        { name: \"MyNumberCol\", type: \"number\", data: \"1234\", extendedColumnId:568},\n        { name: \"MyDateCol\", type: \"currency\", data: \"27-01-2018\", extendedColumnId:569},\n        { name: \"MyStringCol\", type: \"string\", data: \"Spiffy Sprockets\", extendedColumnId:570},\n        { name: \"MyBoolCol\", type: \"bool\", data: \"true\", extendedColumnId:571}\n      ]\n}\n\n$.ajax({\n\t \ttype: \"POST\", \n   \turl: \"/api/v1/tasks.json\", \n   \tcontentType: 'application/json', \n   \tdataType: \"json\", \n   \tsuccess: worked,\n   \tdata: JSON.stringify(data), \n   \theaders: { apiKey: apiKey }\n });","language":"javascript"}]},"method":"post","params":[{"name":"name","type":"string","default":"","desc":"The name of your task.","required":true,"in":"body","ref":"","_id":"5565159803b6710d0091693d"},{"name":"projectId","type":"int","default":"","desc":"The project your task belongs to.","required":true,"in":"body","ref":"","_id":"5565159803b6710d0091693c"},{"name":"start","type":"datetime","default":"","desc":"Task start date. yyyy-mm-ddT00:00:00","required":false,"in":"body","ref":"","_id":"5565159803b6710d0091693b"},{"name":"finish","type":"datetime","default":"","desc":"Task finish date. yyyy-mm-ddT00:00:00","required":false,"in":"body","ref":"","_id":"5565159803b6710d0091693a"},{"name":"duration","type":"int","default":"0","desc":"The duration of the task, in minutes.","required":false,"in":"body","ref":"","_id":"5565159803b6710d00916939"},{"name":"assignments","type":"int","default":"null","desc":"List<int>, The list of the resource ids to assign to the given task.","required":false,"in":"body","ref":"","_id":"5565159803b6710d00916938"},{"name":"notes","type":"string","default":"","desc":"The notes for the task.","required":false,"in":"body","ref":"","_id":"5589e6d986780e1700e44617"},{"name":"customColumns","type":"array_object","default":"","desc":"Task-level custom columns and their value. (Note: the column must have been previously created for the project before you can post it here)","required":false,"in":"body","ref":"","_id":"58d9a7e255a5c10f00836c0a"}],"results":{"codes":[{"language":"json","code":"{\n    status: \"Okay\",\n    task: {\n        projectId: 123456,\n        name: \"test api task1\",\n        notes: \"api notes\",\n        start: \"2015-04-13T00:00:00\",\n        finish: \"2015-05-13T00:00:00\",\n        duration: 2400,\n        customColumns:\n          [\n            { name: \"MyCurrencyCol\", type: \"currency\", data: \"95.99\", extendedColumnId:567},\n            { name: \"MyNumberCol\", type: \"number\", data: \"1234\", extendedColumnId:568},\n            { name: \"MyDateCol\", type: \"currency\", data: \"27-01-2018\", extendedColumnId:569},\n            { name: \"MyStringCol\", type: \"string\", data: \"Spiffy Sprockets\", extendedColumnId:570},\n            { name: \"MyBoolCol\", type: \"bool\", data: \"true\", extendedColumnId:571}\n          ]\n    }\n}","name":"","status":200}]},"settings":""},"next":{"description":"","pages":[]},"title":"Create a Task","type":"endpoint","slug":"create-a-task","excerpt":"A Task instance represents a task created within a Project. It may be a high level summary task, or a task within a task. \n\nUse this API to create a Task against a particular project.","body":"Use this API to create a new task for a given project.\n\nReturns the simple task object that was passed in.\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"The planned finish date must be less than one year after the planned start date. If you require a later date than this you will need to create the task first, then perorm a Task Update to set the extended finish date.\",\n  \"title\": \"Finish Date Limitation\"\n}\n[/block]","updates":[],"order":2,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"554a8077d665ae0d00383f75","__v":12,"user":"55484649b2581a0d00913ff3","category":{"sync":{"isSync":false,"url":""},"pages":["554a7f3d6b448d0d00646b97","554a7f5e6b448d0d00646b99","554a7fa0d665ae0d00383f65","554a8077d665ae0d00383f75","554a8088d665ae0d00383f77"],"title":"Tasks","slug":"tasks","order":2,"from_sync":false,"reference":false,"_id":"554a7f3338e3620d0082192e","version":"5548466bd2c8410d006c2146","project":"5548466bd2c8410d006c2143","__v":5,"createdAt":"2015-05-06T20:53:07.204Z"},"project":"5548466bd2c8410d006c2143","createdAt":"2015-05-06T20:58:31.642Z","editedParams":true,"editedParams2":true,"githubsync":"","version":{"version":"1.0","version_clean":"1.0.0","codename":"","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["5548466cd2c8410d006c2147","554a69ba0b54d30d007fe128","554a7f3338e3620d0082192e","5565162e03b6710d00916942","55651a0c65a1130d00400c2b","55651d4565a1130d00400c2f","55651e0165a1130d00400c32","5565217903b6710d0091695f"],"_id":"5548466bd2c8410d006c2146","createdAt":"2015-05-05T04:26:19.796Z","project":"5548466bd2c8410d006c2143","__v":8,"releaseDate":"2015-05-05T04:26:19.796Z"},"parentDoc":null}

postCreate a Task

A Task instance represents a task created within a Project. It may be a high level summary task, or a task within a task. Use this API to create a Task against a particular project.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Body Params

name:
required
string
The name of your task.
projectId:
required
integer
The project your task belongs to.
start:
datetime
Task start date. yyyy-mm-ddT00:00:00
finish:
datetime
Task finish date. yyyy-mm-ddT00:00:00
duration:
integer0
The duration of the task, in minutes.
assignments:
integernull
List<int>, The list of the resource ids to assign to the given task.
notes:
string
The notes for the task.
customColumns:
array of objects
Task-level custom columns and their value. (Note: the column must have been previously created for the project before you can post it here)

Examples


Result Format


Documentation

Use this API to create a new task for a given project. Returns the simple task object that was passed in. [block:callout] { "type": "warning", "body": "The planned finish date must be less than one year after the planned start date. If you require a later date than this you will need to create the task first, then perorm a Task Update to set the extended finish date.", "title": "Finish Date Limitation" } [/block]