Create task
Add a task to a project and assign it to members.
POST https://cotlet.dev/api/v1/hubstaff/projects/{project_id}/tasks
write Confirm
Creates a task with a summary in a project and assigns it to one or more members. A project linked to a third-party tool takes tasks from that tool, so the call fails there and says so. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| project_id integer required | integer | Project ID from list_projects. |
| summary string required | string | Task summary. |
| assignee_ids integer[] | integer[] | Member IDs from list_members. |
Request
curl -X POST https://cotlet.dev/api/v1/hubstaff/projects/1/tasks \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"summary":"summary"}' result = client.call("hubstaff", "create_task", {"project_id":1,"summary":"summary"}) const result = await cotlet.call('hubstaff', 'create_task', {"project_id":1,"summary":"summary"}); cotlet call hubstaff create_task --data '{"project_id":1,"summary":"summary"}' Example response
{
"task_id": 551030,
"project_id": 90417,
"summary": "Homepage design",
"status": "active",
"assignee_ids": [
3011
]
}