For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Help CenterAPI KeysStatusSign In
GuidesAPI ReferenceChangelog
GuidesAPI ReferenceChangelog
  • Introduction
    • Getting started
  • Email API
  • Transactional SMS
  • Transactional WhatsApp
  • Marketing Campaigns
  • Contact Management
  • Events
    • GETGet events
    • POSTCreate an event
    • POSTCreate events in batch
  • Object Management
  • Accounts and Settings
  • Sales CRM
      • GETGet all task types
      • GETGet all tasks
      • POSTCreate a task
      • GETGet a task
      • DELDelete a task
      • PATCHUpdate a task
  • Conversations
  • Ecommerce
  • Loyalty
LogoLogo
Help CenterAPI KeysStatusSign In
Sales CRMTasks

Create a task

POST
https://api.brevo.com/v3/crm/tasks
POST
/v3/crm/tasks
1import { BrevoClient } from "@getbrevo/brevo";
2
3async function main() {
4 const client = new BrevoClient({
5 apiKey: "YOUR_API_KEY_HERE",
6 });
7 await client.tasks.createATask({
8 date: new Date("2021-11-01T17:44:54.668Z"),
9 name: "Task: Connect with client",
10 taskTypeId: "61a5cd07ca1347c82306ad09",
11 });
12}
13main();
1{
2 "id": "61a5cd07ca1347c82306ad06"
3}
Create a new CRM task with the specified name, type, due date, and optional associations to contacts, companies, or deals. A task requires a name, task type ID, and due date at minimum. You can also set a duration, notes, a reminder, and assign the task to a specific user.
Was this page helpful?
Previous

Get a task

Next
Built with

Authentication

api-keystring

The API key should be passed in the request headers as api-key for authentication.

Request

Task name.
datedatetimeRequired
Task due date and time
namestringRequired
Name of task
taskTypeIdstringRequired

Id for type of task e.g Call / Email / Meeting etc.

assignToIdstringOptional
To assign a task to a user you can use either the account email or ID.
companiesIdslist of stringsOptional
Companies ids for companies a task is linked to
contactsIdslist of integersOptional
Contact ids for contacts linked to this task
dealsIdslist of stringsOptional
Deal ids for deals a task is linked to
donebooleanOptional
Task marked as done
durationlongOptional>=0

Duration of task in milliseconds [1 minute = 60000 ms]

notesstringOptional
Notes added to a task
reminderobjectOptional

Task reminder date/time for a task

Response

Created new task
idstring
Unique task id

Errors

400
Bad Request Error