You can use this API to check which users have access to specific CRM records in a HubSpot account. Response data will include a list of user IDs that correspond to the users in that account, along with the granular permissions that those users have been granted for the CRM record you provided (e.g., users who can edit or communicate with a given contact).
The public permissions API uses the HCRN format for querying and displaying permissions based on the HubSpot account, CRM record type, and CRM record ID you’re requesting. This format always begins with hcrn:, followed by the associated IDs you’re looking to query for:
Retrieving user permission data without pagination
To get unpaginated user permissions for CRM record data in a HubSpot account, make a GET request to /resource-permissions/v3/permitted-users?resource={hrcn}, where the hcrn matches the IDs and types you want to retrieve permission data for.For example, if your HubSpot account ID was 123456 and you wanted to get user permissions for access to a contact with an ID of 64151, you’d make a GET request to /resource-permissions/v3/permitted-users?resource=hcrn:2086383:crm-object:0-1.The results would resemble the following:
You can also retrieve user permission data for CRM records using a separate endpoint that supports pagination.To get paginated user permission data, make a GET request to /resource-permissions/v3/permitted-users/paged?resource={hcrn}. You can then include two additional query parameters in your request:
after: return results following the key provided (e.g., ?after=ODk5OTQyODU0 would return the next page of results, using the previous "after": "ODk5OTQyODU0" property returned within the paging.next field in a prior response).
limit: limit the results in the response, up to a maximum of 1000.
For example, to retrieve the next 100 entries when the previous response included an after value of MjYyMDAyMg%3D%3D, and the hcrn you were querying was hcrn:2086383:crm-object:0-1, you’d make a GET request to /resource-permissions/v3/permitted-users?resource=hcrn:2086383:crm-object:0-1&after=MjYyMDAyMg%3D%3D&limit=100.The results would resemble the following: