Skip to main content
This functionality is currently in beta. By participating in this beta, you agree to HubSpot's Developer Terms and Developer Beta Terms. Note that the functionality is still under active development and is subject to change based on testing and feedback.
Use the record images API to retrieve the image displayed for a CRM record, or to set or clear a custom image for a record. Record images are the profile-picture style images shown on record and index pages, such as a contact’s photo or a company’s logo. Use this API to display HubSpot record images in your own app or to keep them in sync with an external system. Record images are supported for the following objects:

Retrieve a record image

To retrieve the image for a single record, make a GET request to /crm/record-images/2027-03-beta/{objectTypeId}/{objectId}. Include the object type’s ID and the record’s ID in the path. For example, to retrieve the image for the contact with the record ID 51, make a GET request to /crm/record-images/2027-03-beta/0-1/51. The response includes a signed URL for the image and the time that the URL expires.
The request can return the following error statuses:

Retrieve a batch of record images

To retrieve images for multiple records of the same object, make a POST request to /crm/record-images/2027-03-beta/{objectTypeId}/batch/read. You can include up to 100 records per request. By default, the id values in the request are record IDs (hs_object_id). To look up contact records by email or company records by domain, include the field idProperty and set it to email (contacts) or domain (companies). For example, the following request retrieves images for two contacts by email address:
The response includes a results array and an errors array. Each result echoes the value you sent as its id. Both arrays are always present in the response. Batch read returns the following status codes: The following error categories can appear in errors: In the following example, one contact was found and one wasn’t:

Set a custom record image

To set a custom image for a record, make a PUT request to /crm/record-images/2027-03-beta/{objectTypeId}/{objectId}. You can set custom images on contacts, companies, custom object records, products, and marketing events. Send the image as a file upload, using the multipart/form-data content type with the image in a file form parameter. HubSpot resizes the image if needed, stores it as a hidden file, and saves the file’s File Manager key to the record’s hs_avatar_filemanager_key property. The file doesn’t appear in the HubSpot files tool, but anyone with the image’s URL can view it. The new image is displayed in place of any previous custom image, enriched image, or default image. The following example uploads an image for the contact with the record ID 51:
The response includes the image’s signed URL, the file’s id, and the file’s creation timestamp.
The request can return the following errors:

Clear a custom record image

To clear a record’s custom image, make a DELETE request to /crm/record-images/2027-03-beta/{objectTypeId}/{objectId}. For example, to clear the custom image for the contact with the record ID 51, make a DELETE request to /crm/record-images/2027-03-beta/0-1/51. A successful request returns a 204 No Content response. The record then displays the image it would have without a custom image, such as an enriched image or the default image. Learn more about how images resolve. The uploaded file isn’t deleted from the File Manager. HubSpot sets the record’s hs_avatar_filemanager_key property to an empty value, and the record’s property history keeps the previous values. The request can return the following errors:

Signed URLs

Every URL returned by this API is a signed URL that expires after one day. Each response includes an expiresAt timestamp next to the url. It’s recommended to request a new URL when you need to display the image. Don’t store, email, or embed signed URLs in web pages. If you need to keep the image, download it.
  • Expired URLs: a request to an expired URL returns a 410 Gone error. Fetch a new URL from the API.
  • Invalid URLs: a tampered or malformed URL returns a 400 error.
  • Data included in signed URLs: URLs are signed by record ID, even when you look up a record by email address or domain. A URL’s contents can be decoded and include the account ID, object type, record ID, issue time, expiry time, and image size. It doesn’t include an email address, domain, user ID, or IP address.

How record images resolve

A record’s image comes from the first of the following sources that exist:
  1. Custom image: an image you’ve set on the record, either in HubSpot or through this API. The image’s File Manager key is stored in the record’s hs_avatar_filemanager_key property.
  2. Enriched image: an image HubSpot found through data enrichment (contacts and companies only).
  3. Default image: HubSpot’s default image for the object type.
For contacts and companies, enrichment and parent-domain lookups can change which image shows:
  • Contacts (retrieved by hs_object_id or email): a contact’s custom image is used first. If the contact has none, HubSpot checks the contact’s email, then each parent domain (for example, eu.acme.com, then acme.com). At each level, HubSpot uses the logo of a company on that domain that the caller can view, or else the domain’s enriched image. If none exist, the default image is used.
  • Companies:
    • Retrieved by hs_object_id: a company’s custom image is used first. If the company has none, it shows the enriched image for its domain, then for its parent domains, and then the default image.
    • Retrieved by domain: companies can share a domain, so HubSpot returns one of them. It uses the first company on the parent domain that has its own logo and that the caller can view. If no company the caller can view is on the exact domain, HubSpot uses the nearest parent domain that has an image. For example, eu.acme.com with no company of its own returns the company on acme.com, including its custom logo. Within a domain, a company with its own logo wins, otherwise the first company is returned. An OBJECT_NOT_FOUND error applies when no viewable company exists on the domain or any of its parents.

Authentication and permissions

Scopes

Each endpoint requires both a record images scope and the CRM scope for the object type in the request path. A request that’s missing either scope returns a 403 error.

Permissions

All record images endpoints accept both account-level (private app or service) tokens and user-level tokens. Account-level tokens can access all records in the account that the token’s scopes allow. When you use a user-level token, the user’s record permissions apply:
  • If the user can’t view a record, the API treats the record as not found. Requests return a 404 error, and batch read returns an OBJECT_NOT_FOUND error for that record.
  • If the user can view a record but can’t edit it, PUT and DELETE requests return a 403 error.
Last modified on November 30, 2026