API to Create Sales Task

Hi.

Is there any API to create a Sales Task ?

Thanks

@JFRubio

I would check out the engagements api

For tasks, the type needs to be "TASK"
The 'Assigned to' field will be the owner set by the ownerId in the engagement data.
The metadata format is:
"metadata": {
 "body": "This is the body of the task.",
 // String; The body or details of the task
 "subject": "Task title"
 // String; The subject or title of the task
 "status": "NOT_STARTED",
 // String; One of NOT_STARTED, COMPLETED, IN_PROGRESS, WAITING, or DEFERRED.
 // The status of the task
 "forObjectType": "CONTACT"
 // String; One of CONTACT or COMPANY, what object type the task is for.
}

Hi @JFRubio ,
Please check below api documentation for create task in HubSpot :
https://legacydocs.hubspot.com/docs/methods/engagements/create_engagement
For “TASK”
The metadata format is:
“metadata”: {
“body”: “This is the body of the task.”,
“subject”: “Task title”,
“status”: “NOT_STARTED”,
“forObjectType”: “CONTACT”
}

Hope this helps!

If we were able to answer your query, kindly help the community by marking it as a solution.
Thanks and Regards.

If you don’t have a specific Owner / Owner ID, will it still work? Would it potentially default to a certain user?

I ask, b/c we have an app (Campaign Wizard) that clones and transfers workflows for HubSpot users. We won’t be able to define who the Owner of a Task / Email will be… If it does require to specify an Owner, any ideas on a workaround for that?

Thanks!