Links

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

{
"name": "Test Task API",
"endDatetime": "2021-11-01 17:00:00",
"status": 1,
"assignedUserId": 1,
"leadId": 2665
}

Update Task

{
"id": 3269,
"venueId": 1,
"name": "Test Task API",
"endDatetime": "2021-11-01 17:00:00",
"status": 1,
"assignedUserId": 1,
"contactId": 45219,
"companyId": 854
}

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.