All URIs are relative to https://api.sendx.io/api/v1/rest
| Method | HTTP request | Description |
|---|---|---|
| createWebhook | POST /webhook | Create webhook |
| deleteWebhook | DELETE /webhook/{identifier} | Delete webhook |
| getAllWebhooks | GET /webhook | Get all webhooks |
| getWebhook | GET /webhook/{identifier} | Get webhook by ID |
| updateWebhook | PUT /webhook/{identifier} | Update webhook |
RestRWebhook createWebhook(restEWebhook)
Create webhook
Creates a new webhook for event notifications.
// Import classes:
import sendx_java_sdk.ApiClient;
import sendx_java_sdk.ApiException;
import sendx_java_sdk.Configuration;
import sendx_java_sdk.auth.*;
import sendx_java_sdk.models.*;
import sendx_java_sdk.WebhookApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.sendx.io/api/v1/rest");
// Configure API key authorization: TeamApiKey
ApiKeyAuth TeamApiKey = (ApiKeyAuth) defaultClient.getAuthentication("TeamApiKey");
TeamApiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//TeamApiKey.setApiKeyPrefix("Token");
WebhookApi apiInstance = new WebhookApi(defaultClient);
RestEWebhook restEWebhook = new RestEWebhook(); // RestEWebhook |
try {
RestRWebhook result = apiInstance.createWebhook(restEWebhook);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling WebhookApi#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 |
|---|---|---|---|
| restEWebhook | RestEWebhook |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 201 | β Webhook created successfully | - |
| 401 | β Unauthorized - Invalid or missing API key | - |
| 403 | β Forbidden - Resource name already exists | - |
| 422 | β Unprocessable Entity - Invalid request format | - |
| 500 | β Internal Server Error - System error occurred | - |
DeleteResponse deleteWebhook(identifier)
Delete webhook
Deletes a webhook configuration. π― Key Features: - Remove webhooks - Stop event delivery - Clean up endpoints
// Import classes:
import sendx_java_sdk.ApiClient;
import sendx_java_sdk.ApiException;
import sendx_java_sdk.Configuration;
import sendx_java_sdk.auth.*;
import sendx_java_sdk.models.*;
import sendx_java_sdk.WebhookApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.sendx.io/api/v1/rest");
// Configure API key authorization: TeamApiKey
ApiKeyAuth TeamApiKey = (ApiKeyAuth) defaultClient.getAuthentication("TeamApiKey");
TeamApiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//TeamApiKey.setApiKeyPrefix("Token");
WebhookApi apiInstance = new WebhookApi(defaultClient);
String identifier = "identifier_example"; // String | Webhook identifier to update
try {
DeleteResponse result = apiInstance.deleteWebhook(identifier);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling WebhookApi#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 |
|---|---|---|---|
| identifier | String | Webhook identifier to update |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | β Webhook deleted successfully | - |
| 401 | β Unauthorized - Invalid or missing API key | - |
| 404 | β Not Found - Resource does not exist | - |
| 422 | β Unprocessable Entity - Invalid request format | - |
| 500 | β Internal Server Error - System error occurred | - |
List<RestRWebhook> getAllWebhooks()
Get all webhooks
Retrieves all configured webhooks.
// Import classes:
import sendx_java_sdk.ApiClient;
import sendx_java_sdk.ApiException;
import sendx_java_sdk.Configuration;
import sendx_java_sdk.auth.*;
import sendx_java_sdk.models.*;
import sendx_java_sdk.WebhookApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.sendx.io/api/v1/rest");
// Configure API key authorization: TeamApiKey
ApiKeyAuth TeamApiKey = (ApiKeyAuth) defaultClient.getAuthentication("TeamApiKey");
TeamApiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//TeamApiKey.setApiKeyPrefix("Token");
WebhookApi apiInstance = new WebhookApi(defaultClient);
try {
List<RestRWebhook> result = apiInstance.getAllWebhooks();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling WebhookApi#getAllWebhooks");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | β Webhooks retrieved successfully | - |
| 401 | β Unauthorized - Invalid or missing API key | - |
| 500 | β Internal Server Error - System error occurred | - |
RestRWebhook getWebhook(identifier)
Get webhook by ID
Retrieves details about a specific webhook.
// Import classes:
import sendx_java_sdk.ApiClient;
import sendx_java_sdk.ApiException;
import sendx_java_sdk.Configuration;
import sendx_java_sdk.auth.*;
import sendx_java_sdk.models.*;
import sendx_java_sdk.WebhookApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.sendx.io/api/v1/rest");
// Configure API key authorization: TeamApiKey
ApiKeyAuth TeamApiKey = (ApiKeyAuth) defaultClient.getAuthentication("TeamApiKey");
TeamApiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//TeamApiKey.setApiKeyPrefix("Token");
WebhookApi apiInstance = new WebhookApi(defaultClient);
String identifier = "identifier_example"; // String | Webhook identifier to retrieve
try {
RestRWebhook result = apiInstance.getWebhook(identifier);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling WebhookApi#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 |
|---|---|---|---|
| identifier | String | Webhook identifier to retrieve |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | β Webhook retrieved successfully | - |
| 401 | β Unauthorized - Invalid or missing API key | - |
| 404 | β Not Found - Resource does not exist | - |
| 422 | β Unprocessable Entity - Invalid request format | - |
| 500 | β Internal Server Error - System error occurred | - |
RestRWebhook updateWebhook(identifier, restEWebhook)
Update webhook
Updates webhook configuration.
// Import classes:
import sendx_java_sdk.ApiClient;
import sendx_java_sdk.ApiException;
import sendx_java_sdk.Configuration;
import sendx_java_sdk.auth.*;
import sendx_java_sdk.models.*;
import sendx_java_sdk.WebhookApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.sendx.io/api/v1/rest");
// Configure API key authorization: TeamApiKey
ApiKeyAuth TeamApiKey = (ApiKeyAuth) defaultClient.getAuthentication("TeamApiKey");
TeamApiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//TeamApiKey.setApiKeyPrefix("Token");
WebhookApi apiInstance = new WebhookApi(defaultClient);
String identifier = "identifier_example"; // String | Webhook identifier to update
RestEWebhook restEWebhook = new RestEWebhook(); // RestEWebhook |
try {
RestRWebhook result = apiInstance.updateWebhook(identifier, restEWebhook);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling WebhookApi#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 |
|---|---|---|---|
| identifier | String | Webhook identifier to update | |
| restEWebhook | RestEWebhook |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | β Webhook updated successfully | - |
| 401 | β Unauthorized - Invalid or missing API key | - |
| 403 | β Forbidden - Resource name already exists | - |
| 404 | β Not Found - Resource does not exist | - |
| 422 | β Unprocessable Entity - Invalid request format | - |
| 500 | β Internal Server Error - System error occurred | - |