Hello,
We also are migating our intergration app from the API key style to the Private App version. Looking at the permissions/Scopes section, under the CRM header. I don’t see any mention on Engagement objects. Are they not available?
Item which are availbale
- crm.lists
crm.objects.companies
crm.objects.contacts
crm.objects.deals
crm.objects.line_items
crm.objects.owners
crm.objects.quotes
crm.schemas.companies
crm.schemas.contacts
crm.schemas.deals
crm.schemas.line_items
crm.schemas.quotes
Hey, @WDeVilliers
The Engagement APIs use the Contact scope. There is not a specific Engagement scope to set within the Private App setting.
I ran a quick test. Here’s what I did:
- created a new Private App with only the Contact read and write scope
-
used the Notes API to create a note
Request
curl --request POST \
--url https://api.hubapi.com/crm/v3/objects/notes \
--header 'authorization: Bearer YOUR_ACCESS_TOKEN' \
--header 'content-type: application/json' \
--data '{
"properties": {
"hs_timestamp": "2019-10-30T03:30:17.883Z",
"hs_note_body": "Tacos are for all meals",
"hubspot_owner_id": "198670650"
}
}'
which returned a successful Response.
-
I used the note ID to associate the Note to a Deal
Request
curl --request PUT \
--url https://api.hubapi.com/crm/v3/objects/notes/24538500096/associations/deal/9669508372/note_to_deal \
--header 'authorization: Bearer YOUR_ACCESS_TOKEN'
Response
HTTP 200
{
"id": "24538500096",
"properties": {
"hs_createdate": "2022-08-12T00:20:05.033Z",
"hs_lastmodifieddate": "2022-08-12T00:20:05.033Z",
"hs_object_id": "24538500096"
},
"createdAt": "2022-08-12T00:20:05.033Z",
"updatedAt": "2022-08-12T00:20:05.033Z",
"archived": false,
"associations": {
"deals": {
"results": [
{
"id": "9669508372",
"type": "note_to_deal"
}
]
}
}
}
In summary, as long as you are including the required scope as listed on the endpoint, you are good to go!
Have fun building! — Jaycee
Thank you for the information @Jaycee_Lewis ,
follow up questions:
- Will this scope work on Engagement API v1 as well.
- A Engagement can exist having only a company association while having no contact associations. Will this scope cover those as well.