All URIs are relative to https://api.smooch.io
Method | HTTP request | Description |
---|---|---|
createSwitchboard | POST /v2/apps/{appId}/switchboards | Create Switchboard |
deleteSwitchboard | DELETE /v2/apps/{appId}/switchboards/{switchboardId} | Delete Switchboard |
listSwitchboards | GET /v2/apps/{appId}/switchboards | List Switchboards |
updateSwitchboard | PATCH /v2/apps/{appId}/switchboards/{switchboardId} | Update Switchboard |
SwitchboardResponse createSwitchboard(appId)
Create Switchboard
Create a switchboard.
var SunshineConversationsClient = require('sunshine-conversations-client');
var defaultClient = SunshineConversationsClient.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR_USERNAME';
basicAuth.password = 'YOUR_PASSWORD';
// Uncomment this section to use JWTs instead
// var bearerAuth = defaultClient.authentications['bearerAuth'];
// bearerAuth.accessToken = 'YOUR_ACCESS_TOKEN';
var apiInstance = new SunshineConversationsClient.SwitchboardsApi();
var appId = "5d8cff3cd55b040010928b5b"; // String | Identifies the app.
apiInstance.createSwitchboard(appId).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
appId | String | Identifies the app. |
- Content-Type: Not defined
- Accept: application/json
Object deleteSwitchboard(appId, switchboardId)
Delete Switchboard
Deletes the switchboard and all its switchboard integrations. The integrations linked to these switchboard integrations are not deleted and will start receiving all conversation events.
var SunshineConversationsClient = require('sunshine-conversations-client');
var defaultClient = SunshineConversationsClient.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR_USERNAME';
basicAuth.password = 'YOUR_PASSWORD';
// Uncomment this section to use JWTs instead
// var bearerAuth = defaultClient.authentications['bearerAuth'];
// bearerAuth.accessToken = 'YOUR_ACCESS_TOKEN';
var apiInstance = new SunshineConversationsClient.SwitchboardsApi();
var appId = "5d8cff3cd55b040010928b5b"; // String | Identifies the app.
var switchboardId = "5d8cff3cd55b040010928b5b"; // String | Identifies the switchboard.
apiInstance.deleteSwitchboard(appId, switchboardId).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
appId | String | Identifies the app. | |
switchboardId | String | Identifies the switchboard. |
Object
- Content-Type: Not defined
- Accept: application/json
SwitchboardListResponse listSwitchboards(appId)
List Switchboards
Lists all switchboards belonging to the app.
var SunshineConversationsClient = require('sunshine-conversations-client');
var defaultClient = SunshineConversationsClient.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR_USERNAME';
basicAuth.password = 'YOUR_PASSWORD';
// Uncomment this section to use JWTs instead
// var bearerAuth = defaultClient.authentications['bearerAuth'];
// bearerAuth.accessToken = 'YOUR_ACCESS_TOKEN';
var apiInstance = new SunshineConversationsClient.SwitchboardsApi();
var appId = "5d8cff3cd55b040010928b5b"; // String | Identifies the app.
apiInstance.listSwitchboards(appId).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
appId | String | Identifies the app. |
- Content-Type: Not defined
- Accept: application/json
SwitchboardResponse updateSwitchboard(appId, switchboardId, switchboardUpdateBody)
Update Switchboard
Updates a switchboard record.
var SunshineConversationsClient = require('sunshine-conversations-client');
var defaultClient = SunshineConversationsClient.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR_USERNAME';
basicAuth.password = 'YOUR_PASSWORD';
// Uncomment this section to use JWTs instead
// var bearerAuth = defaultClient.authentications['bearerAuth'];
// bearerAuth.accessToken = 'YOUR_ACCESS_TOKEN';
var apiInstance = new SunshineConversationsClient.SwitchboardsApi();
var appId = "5d8cff3cd55b040010928b5b"; // String | Identifies the app.
var switchboardId = "5d8cff3cd55b040010928b5b"; // String | Identifies the switchboard.
var switchboardUpdateBody = new SunshineConversationsClient.SwitchboardUpdateBody(); // SwitchboardUpdateBody |
apiInstance.updateSwitchboard(appId, switchboardId, switchboardUpdateBody).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
appId | String | Identifies the app. | |
switchboardId | String | Identifies the switchboard. | |
switchboardUpdateBody | SwitchboardUpdateBody |
- Content-Type: application/json
- Accept: application/json