Adds a new task.
Send the due date as DueDate, or as DueDateString in yyyy-MM-dd or ISO 8601 date-time format; DueDate wins when both are sent. When UserID is 0 the task is assigned to the caller. The task's company is derived from the related record (RelatedRecordType/RelatedRecordID); CompanyID in the body is not used. A status of Completed also records the completion date. Subject is truncated to 100 characters. A client_credentials caller may send the X-On-Behalf-Of header with a user's email; that user is then recorded as having entered the task and, when UserID is 0, becomes its owner.
/api/v2/tasksAuthentication
Choose one supported method for this request.
Parameters
X-On-Behalf-Ofheaderstring · emailEmail of an active user to act as. That user is recorded as the owner/author of what this request writes. Only client_credentials tokens may send it (others get 403); an email that matches no active user gets 400.
Request body
The task details to add.
userIDinteger · int32companyIDinteger · int32contactIDinteger · int32relatedRecordIDinteger · int32relatedRecordTypestringnullablesubRelatedRecordTypestringnullablesubRelatedRecordIDinteger · int32subjectstringnullablecommentsstringnullabledueDatestring · datenullabledueDateStringstringnullablestatusstringnullableprioritystringnullablereminderbooleanreminderRepeatSchedulestringutcReminderDatestring · date-timenullableisFromLeadWorkflowbooleannullable
Responses
Task added successfully.
isSuccessmessageerrorsdataRead the result from data. When isSuccess is false, errors lists what went wrong. Handling errors
taskIdinteger · int32companyIdinteger · int32companyNamestringnullableuserIdinteger · int32ownerstringnullablecontactIdinteger · int32contactstringnullablerelatedRecordIdinteger · int32relatedRecordTypestringnullablerelatedTostringnullablesubjectstringcommentsstringnullabledueDatestring · datecompleteDatestring · date-timenullablestatusstringnullablebusinessStepstringprioritystringnullablereminderbooleanreminderRepeatSchedulestringutcReminderDatestring · date-timenullablereminderDatestring · date-timenullablecreatedstring · date-timenullablelastModifiedstring · date-timenullableenteredBystringnullablemodifiedBystringnullabledeletedbooleaneventIdstringcalendarIdstring