Contacts API - Avatar path for automatically assigned image

I have created a contact in my CRM with email: dariusz@microsoft.com

It has been automatically enriched with avatar of Microsoft company, right after creation.

Although if I look into API, this specific object doesn’t have avatar path defined at all.

GET /crm/v3/objects/contacts?properties=firstname,lastname,email,company,hs_avatar_filemanager_key
Host: api.hubapi.com
{
 "id": "1551",
 "properties": {
 "company": null,
 "createdate": "2023-12-21T07:08:32.644Z",
 "email": "dariusz@microsoft.com",
 "firstname": "Dariusz",
 "hs_avatar_filemanager_key": null,
 "hs_object_id": "1551",
 "hubspot_owner_id": "1243326704",
 "lastmodifieddate": "2023-12-21T07:08:36.200Z",
 "lastname": "Doe"
 },
 "createdAt": "2023-12-21T07:08:32.644Z",
 "updatedAt": "2023-12-21T07:08:36.200Z",
 "archived": false
}

Is that avatar available at all via API?
Or only avatars that has been intentionally uploaded for a given contact?

Hey, @dmydlarz :waving_hand: You are not missing an option to handle this programmatically. This is one of those features that isn’t covered specifically with documentation of its own. I found this knowledge base article that explains this behaviour, but doesn’t offer a way to handle this via an endpoint — Change or remove a record’s image.

I hope this helps get you moving forward. — Jaycee

Just to clarify.
When I upload my own image for the contact it’s being served back by the API in “hs_avatar_filemanager_key” field.
I assume it’s expected behavior, that my own image is being returned, but one generated by Hubspot is not.
Is my reasoning correct?

Follow to below steps to get Avatar

1 - Go To settings
2 - Tools → Domains & URLs → Language Settings → Get Domain URL

Full Image URL = CDN URL + hs_avatar_filemanager_key