All URIs are relative to https://api.smooch.io
Method | HTTP request | Description |
---|---|---|
createWebhook | POST /v2/apps/{appId}/integrations/{integrationId}/webhooks | Create Webhook |
deleteWebhook | DELETE /v2/apps/{appId}/integrations/{integrationId}/webhooks/{webhookId} | Delete Webhook |
getWebhook | GET /v2/apps/{appId}/integrations/{integrationId}/webhooks/{webhookId} | Get Webhook |
listWebhooks | GET /v2/apps/{appId}/integrations/{integrationId}/webhooks | List Webhooks |
updateWebhook | PATCH /v2/apps/{appId}/integrations/{integrationId}/webhooks/{webhookId} | Update Webhook |
WebhookResponse createWebhook(appId, integrationId, webhookCreateBody)
Create Webhook
Creates a new webhook associated with a Sunshine Conversations Connect integration or a custom integration.
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.WebhooksApi();
var appId = "5d8cff3cd55b040010928b5b"; // String | Identifies the app.
var integrationId = "029c31f25a21b47effd7be90"; // String | The id of the integration.
var webhookCreateBody = new SunshineConversationsClient.WebhookCreateBody(); // WebhookCreateBody |
apiInstance.createWebhook(appId, integrationId, webhookCreateBody).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. | |
integrationId | String | The id of the integration. | |
webhookCreateBody | WebhookCreateBody |
- Content-Type: application/json
- Accept: application/json
Object deleteWebhook(appId, integrationId, webhookId)
Delete Webhook
Deletes the specified webhook associated with a Sunshine Conversations Connect integration or a custom integration.
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.WebhooksApi();
var appId = "5d8cff3cd55b040010928b5b"; // String | Identifies the app.
var integrationId = "029c31f25a21b47effd7be90"; // String | The id of the integration.
var webhookId = "029c31f25a21b47effd7be90"; // String | The id of the webhook.
apiInstance.deleteWebhook(appId, integrationId, webhookId).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. | |
integrationId | String | The id of the integration. | |
webhookId | String | The id of the webhook. |
Object
- Content-Type: Not defined
- Accept: application/json
WebhookResponse getWebhook(appId, integrationId, webhookId)
Get Webhook
Gets the specified webhook associated with a Sunshine Conversations Connect integration or a custom integration.
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.WebhooksApi();
var appId = "5d8cff3cd55b040010928b5b"; // String | Identifies the app.
var integrationId = "029c31f25a21b47effd7be90"; // String | The id of the integration.
var webhookId = "029c31f25a21b47effd7be90"; // String | The id of the webhook.
apiInstance.getWebhook(appId, integrationId, webhookId).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. | |
integrationId | String | The id of the integration. | |
webhookId | String | The id of the webhook. |
- Content-Type: Not defined
- Accept: application/json
WebhookListResponse listWebhooks(appId, integrationId)
List Webhooks
Lists all webhooks for a given Sunshine Conversations Connect integration or custom integration.
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.WebhooksApi();
var appId = "5d8cff3cd55b040010928b5b"; // String | Identifies the app.
var integrationId = "029c31f25a21b47effd7be90"; // String | The id of the integration.
apiInstance.listWebhooks(appId, integrationId).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. | |
integrationId | String | The id of the integration. |
- Content-Type: Not defined
- Accept: application/json
WebhookResponse updateWebhook(appId, integrationId, webhookId, webhookBody)
Update Webhook
Updates the specified webhook associated with a Sunshine Conversations Connect integration or a custom integration.
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.WebhooksApi();
var appId = "5d8cff3cd55b040010928b5b"; // String | Identifies the app.
var integrationId = "029c31f25a21b47effd7be90"; // String | The id of the integration.
var webhookId = "029c31f25a21b47effd7be90"; // String | The id of the webhook.
var webhookBody = new SunshineConversationsClient.WebhookBody(); // WebhookBody |
apiInstance.updateWebhook(appId, integrationId, webhookId, webhookBody).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. | |
integrationId | String | The id of the integration. | |
webhookId | String | The id of the webhook. | |
webhookBody | WebhookBody |
- Content-Type: application/json
- Accept: application/json