API reference
All operations
TASK

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.

POST/api/v2/tasks

Authentication

Choose one supported method for this request.

OAuth 2.0 client credentialsAPI key

Parameters

X-On-Behalf-Ofheaderstring · email

Email 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

application/jsonrequired

The task details to add.

CreateTaskRequest
  • userIDinteger · int32
  • companyIDinteger · int32
  • contactIDinteger · int32
  • relatedRecordIDinteger · int32
  • relatedRecordTypestringnullable
  • subRelatedRecordTypestringnullable
  • subRelatedRecordIDinteger · int32
  • subjectstringnullable
  • commentsstringnullable
  • dueDatestring · datenullable
  • dueDateStringstringnullable
  • statusstringnullable
  • prioritystringnullable
  • reminderboolean
  • reminderRepeatSchedulestring
  • utcReminderDatestring · date-timenullable
  • isFromLeadWorkflowbooleannullable

Responses

Task added successfully.

Standard response envelopeisSuccessmessageerrorsdata

Read the result from data. When isSuccess is false, errors lists what went wrong. Handling errors

dataTaskDto
  • taskIdinteger · int32
  • companyIdinteger · int32
  • companyNamestringnullable
  • userIdinteger · int32
  • ownerstringnullable
  • contactIdinteger · int32
  • contactstringnullable
  • relatedRecordIdinteger · int32
  • relatedRecordTypestringnullable
  • relatedTostringnullable
  • subjectstring
  • commentsstringnullable
  • dueDatestring · date
  • completeDatestring · date-timenullable
  • statusstringnullable
  • businessStepstring
  • prioritystringnullable
  • reminderboolean
  • reminderRepeatSchedulestring
  • utcReminderDatestring · date-timenullable
  • reminderDatestring · date-timenullable
  • createdstring · date-timenullable
  • lastModifiedstring · date-timenullable
  • enteredBystringnullable
  • modifiedBystringnullable
  • deletedboolean
  • eventIdstring
  • calendarIdstring