Any API for Business hours in Freshchat

Hi all,

Hope you all doing well. Are there any APIs for fetching all business hours in Freshchat. I have a requirement that for non-business hours if any message is sent need to create tickets in a Third-party account.

Thanks in advance,
Tejasri Kalluri

1 Like

Hi @Tejasri_Kalluri,

We have a v1 API that can be used to list all the Business Hours rules.

curl --location --request GET '' \
--header 'Authorization: <FRESHCHAT_APP_ID>'

Note the base URL is dependent on the Freshchat account’s data center and can be any of the following values.

  1. US -
  2. EU -
  3. IN -
  4. AU -

The FRESHCHAT_APP_ID can be retrieved from Admin–> Mobile SDKs, as highlighted below.

Hope this helps.


Hi @Arjun_Paliath,

Thanks for your response, I try this request, I got a 500 status. FYI

Hi @Tejasri_Kalluri

As mentioned earlier, you cannot consume the v2 API’s Token.

The authorisation for this API is simply the header

--header 'Authorization: <FRESHCHAT_APP_ID>'

And the App Id can be retrieved from Admin–> Mobile SDKs as shown in my previous response.

Let me know if it still fails.


Hi @Arjun_Paliath,
Its works Thank you,
and I have one doubt in which format is it displaying timezone Can you help me?

“days”: {

            "0": "46800;61200;",

            "1": "36000;61200;",

            "2": "36000;61200;",

            "3": "36000;54000;",

            "4": "36000;61200;",

            "5": "36000;61200;",

            "6": "36000;61200;"


Hey @Tejasri_Kalluri,

The Time Zone will be available with the timezone key in the object as shown below.


However, the time is displayed in seconds, you can use a time function(sample is below) or build your own function to get the value in HH:mm.

String.prototype.toHHMMSS = function () {
    var sec_num = parseInt(this, 10); // don't forget the second param
    var hours   = Math.floor(sec_num / 3600);
    var minutes = Math.floor((sec_num - (hours * 3600)) / 60);
    var seconds = sec_num - (hours * 3600) - (minutes * 60);

    if (hours   < 10) {hours   = "0"+hours;}
    if (minutes < 10) {minutes = "0"+minutes;}
    if (seconds < 10) {seconds = "0"+seconds;}
    return hours+':'+minutes+':'+seconds;

You can consume the above function as shown below.


The Output will be as below.


Hope this helps.

1 Like

Thank you @Arjun_Paliath

1 Like