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 sendx from 'sendx-javascript-sdk';
let defaultClient = sendx.ApiClient.instance;
// Configure API key authorization: TeamApiKey
let TeamApiKey = defaultClient.authentications['TeamApiKey'];
TeamApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//TeamApiKey.apiKeyPrefix = 'Token';
let apiInstance = new sendx.WebhookApi();
let restEWebhook = {"enabled":true,"url":"https://api.example.com/webhooks/sendx","unsubscribed":true,"dropped":true,"bounced":true,"markedSpam":true,"clicked":true,"opened":true,"contactCreated":true}; // RestEWebhook |
apiInstance.createWebhook(restEWebhook).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| restEWebhook | RestEWebhook |
- Content-Type: application/json
- Accept: application/json
DeleteResponse deleteWebhook(identifier)
Delete webhook
Deletes a webhook configuration. 🎯 Key Features: - Remove webhooks - Stop event delivery - Clean up endpoints
import sendx from 'sendx-javascript-sdk';
let defaultClient = sendx.ApiClient.instance;
// Configure API key authorization: TeamApiKey
let TeamApiKey = defaultClient.authentications['TeamApiKey'];
TeamApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//TeamApiKey.apiKeyPrefix = 'Token';
let apiInstance = new sendx.WebhookApi();
let identifier = "identifier_example"; // String | Webhook identifier to update
apiInstance.deleteWebhook(identifier).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| identifier | String | Webhook identifier to update |
- Content-Type: Not defined
- Accept: application/json
[RestRWebhook] getAllWebhooks()
Get all webhooks
Retrieves all configured webhooks.
import sendx from 'sendx-javascript-sdk';
let defaultClient = sendx.ApiClient.instance;
// Configure API key authorization: TeamApiKey
let TeamApiKey = defaultClient.authentications['TeamApiKey'];
TeamApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//TeamApiKey.apiKeyPrefix = 'Token';
let apiInstance = new sendx.WebhookApi();
apiInstance.getAllWebhooks().then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
RestRWebhook getWebhook(identifier)
Get webhook by ID
Retrieves details about a specific webhook.
import sendx from 'sendx-javascript-sdk';
let defaultClient = sendx.ApiClient.instance;
// Configure API key authorization: TeamApiKey
let TeamApiKey = defaultClient.authentications['TeamApiKey'];
TeamApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//TeamApiKey.apiKeyPrefix = 'Token';
let apiInstance = new sendx.WebhookApi();
let identifier = "identifier_example"; // String | Webhook identifier to retrieve
apiInstance.getWebhook(identifier).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| identifier | String | Webhook identifier to retrieve |
- Content-Type: Not defined
- Accept: application/json
RestRWebhook updateWebhook(restEWebhook, identifier)
Update webhook
Updates webhook configuration.
import sendx from 'sendx-javascript-sdk';
let defaultClient = sendx.ApiClient.instance;
// Configure API key authorization: TeamApiKey
let TeamApiKey = defaultClient.authentications['TeamApiKey'];
TeamApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//TeamApiKey.apiKeyPrefix = 'Token';
let apiInstance = new sendx.WebhookApi();
let restEWebhook = new sendx.RestEWebhook(); // RestEWebhook |
let identifier = "identifier_example"; // String | Webhook identifier to update
apiInstance.updateWebhook(restEWebhook, identifier).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});| Name | Type | Description | Notes |
|---|---|---|---|
| restEWebhook | RestEWebhook | ||
| identifier | String | Webhook identifier to update |
- Content-Type: application/json
- Accept: application/json