Create a task

Create a task on a contact, account or deal.

POST https://cotlet.dev/api/v1/freshsales/tasks

write Confirm

Creates the task as the Add task form does, with the first task type in your list. The owner is you unless you name another user. A collaborator gets an email when the task is created. The task stays open until someone completes it. By default you confirm each call; you can switch that off for this tool.

Parameters

Parameters: create_task
NameTypeDescription
title string required string Task title.
due string required string Due date and time, ISO 8601. Freshsales uses 30-minute steps.
related_to_type string required string Contact, Account or Deal.
related_to_id integer required integer Id of that record.
description string string Longer text for the task.
owner string string Name or email of the owner. Default you.
collaborators array array Names or emails of users to share the task with.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/freshsales/tasks \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"title":"Follow up: Annual support plan (41 days old, last activity 02 Oct)","due":"2026-10-26T10:00:00","related_to_type":"Deal","related_to_id":7000388}'
Python
result = client.call("freshsales", "create_task", {"title":"Follow up: Annual support plan (41 days old, last activity 02 Oct)","due":"2026-10-26T10:00:00","related_to_type":"Deal","related_to_id":7000388})
Node.js
const result = await cotlet.call('freshsales', 'create_task', {"title":"Follow up: Annual support plan (41 days old, last activity 02 Oct)","due":"2026-10-26T10:00:00","related_to_type":"Deal","related_to_id":7000388});
CLI
cotlet call freshsales create_task --data '{"title":"Follow up: Annual support plan (41 days old, last activity 02 Oct)","due":"2026-10-26T10:00:00","related_to_type":"Deal","related_to_id":7000388}'

Example response

JSON

{
  "task_id": 8800140,
  "title": "Follow up: Annual support plan (41 days old, last activity 02 Oct)",
  "due": "2026-10-26T10:00:00",
  "status": "open",
  "owner": "Dana Reyes",
  "related_to": {
    "type": "Deal",
    "id": 7000388,
    "name": "Annual support plan"
  },
  "collaborators": []
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.