Create a Task with API


#1

Hi.
What is the correct way to create a task with API?
Should it be created as an engagement of type TASK like
{
“engagement”: {
“active”: true,
“ownerId”: 1,
“type”: “TASK”,
“timestamp”: 1409172644778
},
“associations”: {
“contactIds”: [2],
“companyIds”: [ ],
“dealIds”: [ ],
“ownerIds”: [ ]
},
“metadata” : {
“status” : “NOT_STARTED | COMPLETED”,
“subject” : “Task subj”
}
}

Moreover, when trying to get the list of tasks or creating an engagement with JSON above I am getting the error {“status”:“error”,“message”:“This hapikey (xxx) does not have proper permissions! (requires all of [content-access])”. How can I grant the missed permissions? Or is this error is due to other reasons?


#2

Hi @Collective_Wisdom

Do you know which URL you’re using for this? Engagements tasks would be separate from tasks created with the Calendar API, and the Calendar API would require content-access, so you should be using the endpoint documented here: