I am unable to find out weather a live agent is online or offline and also i want to find out the working hours set for each live agent. how do i achieve this using api endpoint ?
Hi @ztesting and welcome to the Community!
It’s a pleasure to have you here!
Great question, thanks for asking!
First, I’d like to share these resources that might be of interest:
- Conversations inbox and messages APIs (BETA)
- Conversations API Overview
I’d love to put you in touch with some of our Top Experts: Hi @zach_threadint, @HubSpot_Corey and @Teun do you have suggestions to help @ztesting, please?
Thanks a lot and have a great day!
Best,
Bérangère
Hi @ztesting ![]()
You can retrieve this information via HubSpot’s Users API. For example:
Example response body:
{
"results": [
{
"id": "101010101",
"properties": {
"hs_availability_status": "available",
"hs_createdate": "2022-01-06T17:06:01.486Z",
"hs_internal_user_id": "22558899",
"hs_lastmodifieddate": "2024-07-16T04:51:26.719Z",
"hs_object_id": "33669988",
"hs_standard_time_zone": null,
"hs_timezone_auto_update_enabled": "true",
"hs_working_hours": null,
"hubspot_owner_id": "77441122"
},
"createdAt": "2022-01-06T17:06:01.486Z",
"updatedAt": "2024-07-16T04:51:26.719Z",
"archived": false
},
{
"id": "3322116655",
"properties": {
"hs_availability_status": null,
"hs_createdate": "2022-10-13T06:25:46.817Z",
"hs_internal_user_id": "123454321",
"hs_lastmodifieddate": "2024-07-16T04:51:26.719Z",
"hs_object_id": "99885566",
"hs_standard_time_zone": null,
"hs_timezone_auto_update_enabled": "true",
"hs_working_hours": null,
"hubspot_owner_id": "88552233"
},
"createdAt": "2022-10-13T06:25:46.817Z",
"updatedAt": "2024-07-16T04:51:26.719Z",
"archived": false
},
{
"id": "123456789",
"properties": {
"hs_availability_status": "away",
"hs_createdate": "2023-07-20T03:48:19.588Z",
"hs_internal_user_id": "987654321",
"hs_lastmodifieddate": "2024-10-29T22:50:18.193Z",
"hs_object_id": "1122334455",
"hs_standard_time_zone": "Australia/Brisbane",
"hs_timezone_auto_update_enabled": "true",
"hs_working_hours": "[{\"days\":\"MONDAY_TO_FRIDAY\",\"startMinute\":540,\"endMinute\":960}]",
"hubspot_owner_id": "5544332211"
},
"createdAt": "2023-07-20T03:48:19.588Z",
"updatedAt": "2024-10-29T22:50:18.193Z",
"archived": false
}
]
}
To identify additional User properties that you can retrieve from the above endpoint, consider using HubSpot’s CRM Properties endpoint, (i.e. GET https://api.hubapi.com/crm/v3/properties/USERS).
I hope this proves helpful. Please let me know if you have any follow-up questions.