Skip to content

Open-source live-chat, email support, omni-channel desk. An alternative to Intercom, Zendesk, Salesforce Service Cloud etc. 🔥💬

425 B
Raw Blame
/* global axios */
import ApiClient from './ApiClient';

class InboxHealthAPI extends ApiClient {
  constructor() {
    super('inboxes', { accountScoped: true });
  }

  getHealthStatus(inboxId, { signal } = {}) {
    return axios.get(`${this.url}/${inboxId}/health`, { signal });
  }

  registerWebhook(inboxId) {
    return axios.post(`${this.url}/${inboxId}/register_webhook`);
  }
}

export default new InboxHealthAPI();