APIs & Integrations

abrkhan
Miembro

Adding Type (Email) to an Engagement Task via HUBSPPOT API

resolver

 

I would like to add a type (like Email) to a hubspot engagement task via hubspot API, however there is no clear way of doing this via API

 

On the other hand the UI has an option.

 

Any suggestions on how I can do this through the API would be really appreciated !

 

Many thanks

 

0 Me gusta
1 Soluciones aceptada
WendyGoh
Solución
HubSpot Employee
HubSpot Employee

Adding Type (Email) to an Engagement Task via HUBSPPOT API

resolver

Hi @abrkhan,

 

When looking to create a task with email type engagement using the Create an Engagement | Engagements API, you can do so by adding the taskType key under metadata. Example below:

 

For EMAIL task type:

{
    "engagement": {
        "active": true,
        "ownerId": {{owner id}},
        "type": "TASK",
        "timestamp": 1409172644778
    },
    "associations": {
        "contactIds": [{{contact id}}],
        "companyIds": [ ],
        "dealIds": [ ],
        "ownerIds": [ ]
    },
    "metadata": {
        "body": "via api",
"taskType": "EMAIL",
"subject":"this is an email task type"
    }
}

 

For CALL task type:

{
    "engagement": {
        "active": true,
        "ownerId": {{owner id}},
        "type": "TASK",
        "timestamp": 1409172644778
    },
    "associations": {
        "contactIds": [{{contact id}}],
        "companyIds": [ ],
        "dealIds": [ ],
        "ownerIds": [ ]
    },
    "metadata": {
        "body": "via api",
"taskType": "CALL",
"subject":"this is an CALL task type"
    }
}

 

For TODO task type:

{
    "engagement": {
        "active": true,
        "ownerId": {{owner id}},
        "type": "TASK",
        "timestamp": 1409172644778
    },
    "associations": {
        "contactIds": [{{contact id}}],
        "companyIds": [ ],
        "dealIds": [ ],
        "ownerIds": [ ]
    },
    "metadata": {
        "body": "via api",
"taskType": "TODO",
"subject":"this is an TODO task type"
    }
}

Ver la solución en mensaje original publicado

0 Me gusta
2 Respuestas 2
WendyGoh
Solución
HubSpot Employee
HubSpot Employee

Adding Type (Email) to an Engagement Task via HUBSPPOT API

resolver

Hi @abrkhan,

 

When looking to create a task with email type engagement using the Create an Engagement | Engagements API, you can do so by adding the taskType key under metadata. Example below:

 

For EMAIL task type:

{
    "engagement": {
        "active": true,
        "ownerId": {{owner id}},
        "type": "TASK",
        "timestamp": 1409172644778
    },
    "associations": {
        "contactIds": [{{contact id}}],
        "companyIds": [ ],
        "dealIds": [ ],
        "ownerIds": [ ]
    },
    "metadata": {
        "body": "via api",
"taskType": "EMAIL",
"subject":"this is an email task type"
    }
}

 

For CALL task type:

{
    "engagement": {
        "active": true,
        "ownerId": {{owner id}},
        "type": "TASK",
        "timestamp": 1409172644778
    },
    "associations": {
        "contactIds": [{{contact id}}],
        "companyIds": [ ],
        "dealIds": [ ],
        "ownerIds": [ ]
    },
    "metadata": {
        "body": "via api",
"taskType": "CALL",
"subject":"this is an CALL task type"
    }
}

 

For TODO task type:

{
    "engagement": {
        "active": true,
        "ownerId": {{owner id}},
        "type": "TASK",
        "timestamp": 1409172644778
    },
    "associations": {
        "contactIds": [{{contact id}}],
        "companyIds": [ ],
        "dealIds": [ ],
        "ownerIds": [ ]
    },
    "metadata": {
        "body": "via api",
"taskType": "TODO",
"subject":"this is an TODO task type"
    }
}
0 Me gusta
abrkhan
Miembro

Adding Type (Email) to an Engagement Task via HUBSPPOT API

resolver

Many thanks , this is really helpful - spend a lot of time tring to figure !

0 Me gusta