All URIs are relative to https://api.sendinblue.com/v3
Method | HTTP request | Description |
---|---|---|
createWebhook | POST /webhooks | Create a webhook |
deleteWebhook | DELETE /webhooks/{webhookId} | Delete a webhook |
getWebhook | GET /webhooks/{webhookId} | Get a webhook details |
getWebhooks | GET /webhooks | Get all webhooks |
updateWebhook | PUT /webhooks/{webhookId} | Update a webhook |
CreateModel createWebhook(createWebhook)
Create a webhook
// Import classes:
//import sendinblue.ApiClient;
//import sendinblue.ApiException;
//import sendinblue.Configuration;
//import sendinblue.auth.*;
//import sibApi.WebhooksApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");
// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");
WebhooksApi apiInstance = new WebhooksApi();
CreateWebhook createWebhook = new CreateWebhook(); // CreateWebhook | Values to create a webhook
try {
CreateModel result = apiInstance.createWebhook(createWebhook);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling WebhooksApi#createWebhook");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
createWebhook | CreateWebhook | Values to create a webhook |
- Content-Type: application/json
- Accept: application/json
deleteWebhook(webhookId)
Delete a webhook
// Import classes:
//import sendinblue.ApiClient;
//import sendinblue.ApiException;
//import sendinblue.Configuration;
//import sendinblue.auth.*;
//import sibApi.WebhooksApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");
// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");
WebhooksApi apiInstance = new WebhooksApi();
Long webhookId = 789L; // Long | Id of the webhook
try {
apiInstance.deleteWebhook(webhookId);
} catch (ApiException e) {
System.err.println("Exception when calling WebhooksApi#deleteWebhook");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
webhookId | Long | Id of the webhook |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
GetWebhook getWebhook(webhookId)
Get a webhook details
// Import classes:
//import sendinblue.ApiClient;
//import sendinblue.ApiException;
//import sendinblue.Configuration;
//import sendinblue.auth.*;
//import sibApi.WebhooksApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");
// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");
WebhooksApi apiInstance = new WebhooksApi();
Long webhookId = 789L; // Long | Id of the webhook
try {
GetWebhook result = apiInstance.getWebhook(webhookId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling WebhooksApi#getWebhook");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
webhookId | Long | Id of the webhook |
- Content-Type: application/json
- Accept: application/json
GetWebhooks getWebhooks(type, sort)
Get all webhooks
// Import classes:
//import sendinblue.ApiClient;
//import sendinblue.ApiException;
//import sendinblue.Configuration;
//import sendinblue.auth.*;
//import sibApi.WebhooksApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");
// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");
WebhooksApi apiInstance = new WebhooksApi();
String type = "transactional"; // String | Filter on webhook type
String sort = "desc"; // String | Sort the results in the ascending/descending order of webhook creation
try {
GetWebhooks result = apiInstance.getWebhooks(type, sort);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling WebhooksApi#getWebhooks");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
type | String | Filter on webhook type | [optional] [default to transactional] [enum: marketing, transactional, inbound] |
sort | String | Sort the results in the ascending/descending order of webhook creation | [optional] [default to desc] [enum: asc, desc] |
- Content-Type: application/json
- Accept: application/json
updateWebhook(webhookId, updateWebhook)
Update a webhook
// Import classes:
//import sendinblue.ApiClient;
//import sendinblue.ApiException;
//import sendinblue.Configuration;
//import sendinblue.auth.*;
//import sibApi.WebhooksApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");
// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");
WebhooksApi apiInstance = new WebhooksApi();
Long webhookId = 789L; // Long | Id of the webhook
UpdateWebhook updateWebhook = new UpdateWebhook(); // UpdateWebhook | Values to update a webhook
try {
apiInstance.updateWebhook(webhookId, updateWebhook);
} catch (ApiException e) {
System.err.println("Exception when calling WebhooksApi#updateWebhook");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
webhookId | Long | Id of the webhook | |
updateWebhook | UpdateWebhook | Values to update a webhook |
null (empty response body)
- Content-Type: application/json
- Accept: application/json