APIs & Integrations

MadhuManne
Member

APIs for posting Engagement

We are creating an App which would integrate our application with Hubspot. 
We need post the activity of user like sending mails, calls and meetings of contacts to hubspot.
Can you provide us the lastest API for Engagement to create Tasks, Meeting, Call & Email.
We are using old APIs but not able to set all the parameters like description, priority etc.
 
Is there a way to set those parameters using old APIs?
0 Upvotes
3 Replies 3
dennisedson
HubSpot Product Team
HubSpot Product Team

APIs for posting Engagement

Hello @MadhuManne !

Welcome to the Community!

The newest API is still under development.  The latest available version is here for creating an engagement. 

I am unclear where you are finding these additional parameters.  Can you show us an example of where we should expect to see these fields in the UI?  I may just be misunderstanding 🙃

0 Upvotes
MadhuManne
Member

APIs for posting Engagement

I tried using APIs provided with the parameters specified. But I was not able set few parameters for Task.

1. Priority for Task

2. Type for Task
3. Content sent as part of body parameter is not coming in Task Description. Is there any other parameter to set description?

0 Upvotes
dennisedson
HubSpot Product Team
HubSpot Product Team

APIs for posting Engagement

Hey @MadhuManne ,

I sometimes find the best way to figure out these things is to create it in the UI and the do a get request for it.  See what it spits out.  For example, I created a task with the additional parameters that you listed above and did a request for that engagement.  This is the part you will want to look at that is returned:

 "metadata": {
        "body": "This is the body of the task.",
        "status": "NOT_STARTED",
        "forObjectType": "CONTACT",
        "subject": "Task title",
        "taskType": "CALL",
        "reminders": [],
        "priority": "HIGH",
        "isAllDay": false
    }

So with that, you would format your post request body like this as an example:

{
    "engagement": {
        "active": true,
        "ownerId": 1,
        "type": "TASK",
        "timestamp": 1409172644778
    },
    "associations": {
        "contactIds": [21551]
    },
    "metadata": {
    "body": "This is the body of the task.",
    "subject": "Task title",
    "status": "NOT_STARTED",
    "taskType": "CALL",
    "forObjectType": "CONTACT",
    "priority": "HIGH"
  }
}

Hope this helps!

0 Upvotes