Salesforce Chat Button Availability using REST API

https://hostname/chat/rest/Visitor/Availability can used to find whether a Chat Button is available to receive new incoming Chat Requests in Salesforce.

1. Go to Chat Settings in Salesforce Setup.

2. Copy the "Chat API Endpoint" URL.

Add Visitor/Availability to the end of the URL.
Example:
https://d.la5-c2-ia5.salesforceliveagent.com/chat/rest/Visitor/Availability

3. Do a GET Call to find the availability.

https://d.la5-c2-ia5.salesforceliveagent.com/chat/rest/Visitor/Availability?org_id=00D8c0000015heN&deployment_id=5728c000000QUAz&Availability.ids=5738c000000QVxa
 
Example:


Header: