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(webhookCreateBody, appId, integrationId)
Create Webhook
Creates a new webhook associated with a Sunshine Conversations Connect integration or a custom integration.
import com.zendesk.sunshine_conversations_client.ApiClient;
import com.zendesk.sunshine_conversations_client.ApiException;
import com.zendesk.sunshine_conversations_client.Configuration;
import com.zendesk.sunshine_conversations_client.auth.*;
import com.zendesk.sunshine_conversations_client.model.*;
import com.zendesk.sunshine_conversations_client.api.WebhooksApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.smooch.io");
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("API_KEY_ID");
basicAuth.setPassword("API_KEY_SECRET");
// Uncomment this section to use JWTs instead
// HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
// bearerAuth.setBearerToken("YOUR TOKEN OR JWT");
WebhooksApi apiInstance = new WebhooksApi(defaultClient);
WebhookCreateBody webhookCreateBody = new WebhookCreateBody(); // WebhookCreateBody |
String appId = "5d8cff3cd55b040010928b5b"; // String | Identifies the app.
String integrationId = "029c31f25a21b47effd7be90"; // String | The id of the integration.
// Add required body parameters
try {
WebhookResponse result = apiInstance.createWebhook(webhookCreateBody, appId, integrationId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling WebhooksApi#createWebhook");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
webhookCreateBody | WebhookCreateBody | ||
appId | String | Identifies the app. | |
integrationId | String | The id of the integration. |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
201 | Created | - |
400 | Bad Request | - |
403 | Forbidden | - |
404 | Not Found | - |
Object deleteWebhook(appId, integrationId, webhookId)
Delete Webhook
Deletes the specified webhook associated with a Sunshine Conversations Connect integration or a custom integration.
import com.zendesk.sunshine_conversations_client.ApiClient;
import com.zendesk.sunshine_conversations_client.ApiException;
import com.zendesk.sunshine_conversations_client.Configuration;
import com.zendesk.sunshine_conversations_client.auth.*;
import com.zendesk.sunshine_conversations_client.model.*;
import com.zendesk.sunshine_conversations_client.api.WebhooksApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.smooch.io");
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("API_KEY_ID");
basicAuth.setPassword("API_KEY_SECRET");
// Uncomment this section to use JWTs instead
// HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
// bearerAuth.setBearerToken("YOUR TOKEN OR JWT");
WebhooksApi apiInstance = new WebhooksApi(defaultClient);
String appId = "5d8cff3cd55b040010928b5b"; // String | Identifies the app.
String integrationId = "029c31f25a21b47effd7be90"; // String | The id of the integration.
String webhookId = "029c31f25a21b47effd7be90"; // String | The id of the webhook.
// Add required body parameters
try {
Object result = apiInstance.deleteWebhook(appId, integrationId, webhookId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling WebhooksApi#deleteWebhook");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
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
Status code | Description | Response headers |
---|---|---|
200 | Ok | - |
404 | Not Found | - |
WebhookResponse getWebhook(appId, integrationId, webhookId)
Get Webhook
Gets the specified webhook associated with a Sunshine Conversations Connect integration or a custom integration.
import com.zendesk.sunshine_conversations_client.ApiClient;
import com.zendesk.sunshine_conversations_client.ApiException;
import com.zendesk.sunshine_conversations_client.Configuration;
import com.zendesk.sunshine_conversations_client.auth.*;
import com.zendesk.sunshine_conversations_client.model.*;
import com.zendesk.sunshine_conversations_client.api.WebhooksApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.smooch.io");
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("API_KEY_ID");
basicAuth.setPassword("API_KEY_SECRET");
// Uncomment this section to use JWTs instead
// HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
// bearerAuth.setBearerToken("YOUR TOKEN OR JWT");
WebhooksApi apiInstance = new WebhooksApi(defaultClient);
String appId = "5d8cff3cd55b040010928b5b"; // String | Identifies the app.
String integrationId = "029c31f25a21b47effd7be90"; // String | The id of the integration.
String webhookId = "029c31f25a21b47effd7be90"; // String | The id of the webhook.
// Add required body parameters
try {
WebhookResponse result = apiInstance.getWebhook(appId, integrationId, webhookId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling WebhooksApi#getWebhook");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
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
Status code | Description | Response headers |
---|---|---|
200 | Ok | - |
404 | Not Found | - |
WebhookListResponse listWebhooks(appId, integrationId)
List Webhooks
Lists all webhooks for a given Sunshine Conversations Connect integration or custom integration.
import com.zendesk.sunshine_conversations_client.ApiClient;
import com.zendesk.sunshine_conversations_client.ApiException;
import com.zendesk.sunshine_conversations_client.Configuration;
import com.zendesk.sunshine_conversations_client.auth.*;
import com.zendesk.sunshine_conversations_client.model.*;
import com.zendesk.sunshine_conversations_client.api.WebhooksApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.smooch.io");
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("API_KEY_ID");
basicAuth.setPassword("API_KEY_SECRET");
// Uncomment this section to use JWTs instead
// HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
// bearerAuth.setBearerToken("YOUR TOKEN OR JWT");
WebhooksApi apiInstance = new WebhooksApi(defaultClient);
String appId = "5d8cff3cd55b040010928b5b"; // String | Identifies the app.
String integrationId = "029c31f25a21b47effd7be90"; // String | The id of the integration.
// Add required body parameters
try {
WebhookListResponse result = apiInstance.listWebhooks(appId, integrationId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling WebhooksApi#listWebhooks");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
appId | String | Identifies the app. | |
integrationId | String | The id of the integration. |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Ok | - |
403 | Forbidden | - |
404 | Not Found | - |
WebhookResponse updateWebhook(webhookBody, appId, integrationId, webhookId)
Update Webhook
Updates the specified webhook associated with a Sunshine Conversations Connect integration or a custom integration.
import com.zendesk.sunshine_conversations_client.ApiClient;
import com.zendesk.sunshine_conversations_client.ApiException;
import com.zendesk.sunshine_conversations_client.Configuration;
import com.zendesk.sunshine_conversations_client.auth.*;
import com.zendesk.sunshine_conversations_client.model.*;
import com.zendesk.sunshine_conversations_client.api.WebhooksApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.smooch.io");
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("API_KEY_ID");
basicAuth.setPassword("API_KEY_SECRET");
// Uncomment this section to use JWTs instead
// HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
// bearerAuth.setBearerToken("YOUR TOKEN OR JWT");
WebhooksApi apiInstance = new WebhooksApi(defaultClient);
WebhookBody webhookBody = new WebhookBody(); // WebhookBody |
String appId = "5d8cff3cd55b040010928b5b"; // String | Identifies the app.
String integrationId = "029c31f25a21b47effd7be90"; // String | The id of the integration.
String webhookId = "029c31f25a21b47effd7be90"; // String | The id of the webhook.
// Add required body parameters
try {
WebhookResponse result = apiInstance.updateWebhook(webhookBody, appId, integrationId, webhookId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling WebhooksApi#updateWebhook");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
webhookBody | WebhookBody | ||
appId | String | Identifies the app. | |
integrationId | String | The id of the integration. | |
webhookId | String | The id of the webhook. |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Ok | - |
400 | Bad Request | - |
404 | Not Found | - |