Add or Update Task
post
[PlatformAddress]/api/1.0/crm?action=addOrUpdateTask
Add or Update Task which belongs contact, company, opportunity and lead

Task Status

Id
Name
0
Not Started
1
In Progress
2
On Hold
3
Cancelled
4
Completed

Example Request

Add Task

1
{
2
"name": "Test Task API",
3
"endDatetime": "2021-11-01 17:00:00",
4
"status": 1,
5
"assignedUserId": 1,
6
"leadId": 2665
7
}
Copied!

Update Task

1
{
2
"id": 3269,
3
"venueId": 1,
4
"name": "Test Task API",
5
"endDatetime": "2021-11-01 17:00:00",
6
"status": 1,
7
"assignedUserId": 1,
8
"contactId": 45219,
9
"companyId": 854
10
}
Copied!

Returns

Property
Description
success
Whether or not the task was added/updated
id
The unique id of the task

Throws

Code
Description
Specific Code: 24389
The lead/opportunity does not exist
Specific Code: 24390
The contact does not exist
Specific Code: 24391
The company does not exist
Specific Code: 24392
The task does not exist
Specific Code: 24393
An error has occurred
Specific Code: 24394
The request contains invalid data. The data was validated but there was some other error. See additional messages
Specific Code: 24395
The request contains invalid data
Specific Code: 24396
The task can only belongs to either contact, company or opportunity/lead
Task can only belongs to either company, contact or lead. When companyId and contactId both provided the contactId will be added to company as company contact and task will be be associated with company.
Last modified 8d ago