Create task
A task with a due date, work type and optional deal, assignee and customer.
POST https://cotlet.dev/api/v1/teamleader/work-types/{work_type_id}/tasks
write
Creates a task. A title, a due date and a work type are required, because Teamleader asks for a work type on every task. Link it to a deal or a customer and assign it to a user. It is the same task you would add from a deal. It sends no email to a customer and is deleted in Teamleader if it is wrong, so it does not wait for your OK.
Parameters
| Name | Type | Description |
|---|---|---|
| title string required | string | Task title. |
| due_on date required | date | Due date, YYYY-MM-DD. |
| work_type_id string required | string | Work type ID. Work types are set under Settings > Calendar > Work types. |
| description string | string | Longer text for the task. |
| deal_id string | string | Link the task to this deal. |
| customer_id string | string | Link the task to this company. |
| assignee_user_id string | string | User who gets the task. Default: unassigned. |
Request
curl -X POST https://cotlet.dev/api/v1/teamleader/work-types/6b0f5d1e-2c43-4a7e-9f10-3d58a1c2e7b4/tasks \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"title":"Call Northwind Studio about the website quotation","due_on":"2026-10-23","deal_id":"9c1f3a5e-7b24-4d68-8e0a-5f2b4c6d8e10"}' result = client.call("teamleader", "create_task", {"title":"Call Northwind Studio about the website quotation","due_on":"2026-10-23","work_type_id":"6b0f5d1e-2c43-4a7e-9f10-3d58a1c2e7b4","deal_id":"9c1f3a5e-7b24-4d68-8e0a-5f2b4c6d8e10"}) const result = await cotlet.call('teamleader', 'create_task', {"title":"Call Northwind Studio about the website quotation","due_on":"2026-10-23","work_type_id":"6b0f5d1e-2c43-4a7e-9f10-3d58a1c2e7b4","deal_id":"9c1f3a5e-7b24-4d68-8e0a-5f2b4c6d8e10"}); cotlet call teamleader create_task --data '{"title":"Call Northwind Studio about the website quotation","due_on":"2026-10-23","work_type_id":"6b0f5d1e-2c43-4a7e-9f10-3d58a1c2e7b4","deal_id":"9c1f3a5e-7b24-4d68-8e0a-5f2b4c6d8e10"}' Example response
{
"task_id": "1759dfc1-7365-4f1b-8d90-d29787a5d29d",
"title": "Call Northwind Studio about the website quotation",
"due_on": "2026-10-23",
"deal_id": "9c1f3a5e-7b24-4d68-8e0a-5f2b4c6d8e10",
"assignee": "Lotte Peeters"
}