APIs & Integrations

vdorosh
Member

Тo messageId property of metadata in the response

Hi, i'm sending request to endpoint:
https://api.hubapi.com/engagements/v1/engagements?hapikey=xxx

json:


{
"engagement": {
"type": "EMAIL"
},
"associations": {
"contactIds": [],
"companyIds": [],
"dealIds": [660649829],
"ownerIds": [ ]
},
"attachments": [
],
"metadata": {
"from": {
"email": "vasyldorosh@gmail.com",
"firstName": "First",
"lastName": "Last"
},
"to": [
{
"email": "dorosh <dorosh_2009@meta.ua>"
}
],
"cc": [],
"bcc": [],
"subject": "This is the subject of the email",
"html": "<div>This is the body of the email</div>",
"text": "This is the body of the email"
}
}

return response:

 

{"engagement":{"id":2091001881,"portalId":5570300,"active":true,"createdAt":1554370293791,"lastUpdated":1554370293791,"type":"EMAIL","timestamp":1554370293791,"allAccessibleTeamIds":[],"bodyPreview":"This is the body of the email","queueMembershipIds":[]},"associations":{"contactIds":[],"companyIds":[],"dealIds":[660649829],"ownerIds":[],"workflowIds":[],"ticketIds":[],"contentIds":[],"quoteIds":[]},"attachments":[],"metadata":{"from":{"email":"vasyldorosh@gmail.com","firstName":"First","lastName":"Last"},"to":[{"email":"dorosh "}],"cc":[],"bcc":[],"sender":{},"subject":"This is the subject of the email","html":"
This is the body of the email","text":"This is the body of the email","emailSendEventId":{},"validationSkipped":[],"attachedVideoOpened":false,"attachedVideoWatched":false}}

 

Why there is no messageId property of metadata in the response ?
Thanks!

3 Replies 3
lscanlan
HubSpot Alumni
HubSpot Alumni

Тo messageId property of metadata in the response

Hi @vdorosh,

 

Could you let me know a little bit more of what you're looking for or what you're ultimately trying to accomplish? Each engagement has a unique ID, which you can see in your response. In your example, the ID is 2091001881. The metadata for each type of engagement is listed here: https://developers.hubspot.com/docs/methods/engagements/engagements-overview. If you scroll down to the examples, you'll see the format of metadata for each engagement type. What are you expecting to see for messageId?

 

Thanks,

Leland

Leland Scanlan

HubSpot Developer Support
0 Upvotes
rentuukieron
Participant

Тo messageId property of metadata in the response

Hello Leland, 

Thank you for your response. 

 

Is the issue highlighed below clear from our developer? 

 

On the Deal page there is a tab email (yellow border on the screen below). 
When you click on the Create Email (red border) button, there is a form, after sending it create an entry with the type Email (green border) - its is ok.

But when to create through api (request above in the first post) then create only with type Logged email (blue border).

Why not create type Email through api?

 

image (2).png

vdorosh
Member

Тo messageId property of metadata in the response

On the Deal page there is a tab email (yellow border on the screen below). 
When you click on the Create Email (red border) button, there is a form, after sending it create an entry with the type Email (green border) - its is ok.

But when to create through api (request above in the first post) then create only with type Logged email (blue border).

Why not create type Email through api?

 


image (2).png