All URIs are relative to https://api.sendinblue.com/v3
Method | HTTP request | Description |
---|---|---|
blockNewDomain | POST /smtp/blockedDomains | Add a new domain to the list of blocked domains |
createSmtpTemplate | POST /smtp/templates | Create an email template |
deleteBlockedDomain | DELETE /smtp/blockedDomains/{domain} | Unblock an existing domain from the list of blocked domains |
deleteHardbounces | POST /smtp/deleteHardbounces | Delete hardbounces |
deleteScheduledEmailById | DELETE /smtp/email/{identifier} | Delete scheduled emails by batchId or messageId |
deleteSmtpTemplate | DELETE /smtp/templates/{templateId} | Delete an inactive email template |
getAggregatedSmtpReport | GET /smtp/statistics/aggregatedReport | Get your transactional email activity aggregated over a period of time |
getBlockedDomains | GET /smtp/blockedDomains | Get the list of blocked domains |
getEmailEventReport | GET /smtp/statistics/events | Get all your transactional email activity (unaggregated events) |
getScheduledEmailByBatchId | GET /smtp/emailStatus/{batchId} | Fetch scheduled emails by batchId |
getScheduledEmailByMessageId | GET /smtp/emailStatus/{messageId} | Fetch scheduled email by messageId |
getSmtpReport | GET /smtp/statistics/reports | Get your transactional email activity aggregated per day |
getSmtpTemplate | GET /smtp/templates/{templateId} | Returns the template information |
getSmtpTemplates | GET /smtp/templates | Get the list of email templates |
getTransacBlockedContacts | GET /smtp/blockedContacts | Get the list of blocked or unsubscribed transactional contacts |
getTransacEmailContent | GET /smtp/emails/{uuid} | Get the personalized content of a sent transactional email |
getTransacEmailsList | GET /smtp/emails | Get the list of transactional emails on the basis of allowed filters |
sendTestTemplate | POST /smtp/templates/{templateId}/sendTest | Send a template to your test list |
sendTransacEmail | POST /smtp/email | Send a transactional email |
smtpBlockedContactsEmailDelete | DELETE /smtp/blockedContacts/{email} | Unblock or resubscribe a transactional contact |
smtpLogMessageIdDelete | DELETE /smtp/log/{messageId} | Delete an SMTP transactional log |
updateSmtpTemplate | PUT /smtp/templates/{templateId} | Update an email template |
blockNewDomain(blockDomain)
Add a new domain to the list of blocked domains
Blocks a new domain in order to avoid messages being sent to the same
// Import classes:
//import sendinblue.ApiClient;
//import sendinblue.ApiException;
//import sendinblue.Configuration;
//import sendinblue.auth.*;
//import sibApi.TransactionalEmailsApi;
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");
TransactionalEmailsApi apiInstance = new TransactionalEmailsApi();
BlockDomain blockDomain = new BlockDomain(); // BlockDomain |
try {
apiInstance.blockNewDomain(blockDomain);
} catch (ApiException e) {
System.err.println("Exception when calling TransactionalEmailsApi#blockNewDomain");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
blockDomain | BlockDomain |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
CreateModel createSmtpTemplate(smtpTemplate)
Create an email template
// Import classes:
//import sendinblue.ApiClient;
//import sendinblue.ApiException;
//import sendinblue.Configuration;
//import sendinblue.auth.*;
//import sibApi.TransactionalEmailsApi;
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");
TransactionalEmailsApi apiInstance = new TransactionalEmailsApi();
CreateSmtpTemplate smtpTemplate = new CreateSmtpTemplate(); // CreateSmtpTemplate | values to update in transactional email template
try {
CreateModel result = apiInstance.createSmtpTemplate(smtpTemplate);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TransactionalEmailsApi#createSmtpTemplate");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
smtpTemplate | CreateSmtpTemplate | values to update in transactional email template |
- Content-Type: application/json
- Accept: application/json
deleteBlockedDomain(domain)
Unblock an existing domain from the list of blocked domains
Unblocks an existing domain from the list of blocked domains
// Import classes:
//import sendinblue.ApiClient;
//import sendinblue.ApiException;
//import sendinblue.Configuration;
//import sendinblue.auth.*;
//import sibApi.TransactionalEmailsApi;
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");
TransactionalEmailsApi apiInstance = new TransactionalEmailsApi();
String domain = "domain_example"; // String | The name of the domain to be deleted
try {
apiInstance.deleteBlockedDomain(domain);
} catch (ApiException e) {
System.err.println("Exception when calling TransactionalEmailsApi#deleteBlockedDomain");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
domain | String | The name of the domain to be deleted |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
deleteHardbounces(deleteHardbounces)
Delete hardbounces
Delete hardbounces. To use carefully (e.g. in case of temporary ISP failures)
// Import classes:
//import sendinblue.ApiClient;
//import sendinblue.ApiException;
//import sendinblue.Configuration;
//import sendinblue.auth.*;
//import sibApi.TransactionalEmailsApi;
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");
TransactionalEmailsApi apiInstance = new TransactionalEmailsApi();
DeleteHardbounces deleteHardbounces = new DeleteHardbounces(); // DeleteHardbounces | values to delete hardbounces
try {
apiInstance.deleteHardbounces(deleteHardbounces);
} catch (ApiException e) {
System.err.println("Exception when calling TransactionalEmailsApi#deleteHardbounces");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
deleteHardbounces | DeleteHardbounces | values to delete hardbounces | [optional] |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
deleteScheduledEmailById(identifier)
Delete scheduled emails by batchId or messageId
Delete scheduled batch of emails by batchId or single scheduled email by messageId
// Import classes:
//import sendinblue.ApiClient;
//import sendinblue.ApiException;
//import sendinblue.Configuration;
//import sendinblue.auth.*;
//import sibApi.TransactionalEmailsApi;
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");
TransactionalEmailsApi apiInstance = new TransactionalEmailsApi();
String identifier = "identifier_example"; // String | The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email.
try {
apiInstance.deleteScheduledEmailById(identifier);
} catch (ApiException e) {
System.err.println("Exception when calling TransactionalEmailsApi#deleteScheduledEmailById");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
identifier | String | The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email. |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
deleteSmtpTemplate(templateId)
Delete an inactive email template
// Import classes:
//import sendinblue.ApiClient;
//import sendinblue.ApiException;
//import sendinblue.Configuration;
//import sendinblue.auth.*;
//import sibApi.TransactionalEmailsApi;
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");
TransactionalEmailsApi apiInstance = new TransactionalEmailsApi();
Long templateId = 789L; // Long | id of the template
try {
apiInstance.deleteSmtpTemplate(templateId);
} catch (ApiException e) {
System.err.println("Exception when calling TransactionalEmailsApi#deleteSmtpTemplate");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
templateId | Long | id of the template |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
GetAggregatedReport getAggregatedSmtpReport(startDate, endDate, days, tag)
Get your transactional email activity aggregated over a period of time
This endpoint will show the aggregated stats for past 90 days by default if `startDate` and `endDate` OR `days` is not passed. The date range can not exceed 90 days
// Import classes:
//import sendinblue.ApiClient;
//import sendinblue.ApiException;
//import sendinblue.Configuration;
//import sendinblue.auth.*;
//import sibApi.TransactionalEmailsApi;
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");
TransactionalEmailsApi apiInstance = new TransactionalEmailsApi();
String startDate = "startDate_example"; // String | Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate
String endDate = "endDate_example"; // String | Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate
Long days = 789L; // Long | Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate'
String tag = "tag_example"; // String | Tag of the emails
try {
GetAggregatedReport result = apiInstance.getAggregatedSmtpReport(startDate, endDate, days, tag);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TransactionalEmailsApi#getAggregatedSmtpReport");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
startDate | String | Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate | [optional] |
endDate | String | Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate | [optional] |
days | Long | Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' | [optional] |
tag | String | Tag of the emails | [optional] |
- Content-Type: application/json
- Accept: application/json
GetBlockedDomains getBlockedDomains()
Get the list of blocked domains
Get the list of blocked domains
// Import classes:
//import sendinblue.ApiClient;
//import sendinblue.ApiException;
//import sendinblue.Configuration;
//import sendinblue.auth.*;
//import sibApi.TransactionalEmailsApi;
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");
TransactionalEmailsApi apiInstance = new TransactionalEmailsApi();
try {
GetBlockedDomains result = apiInstance.getBlockedDomains();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TransactionalEmailsApi#getBlockedDomains");
e.printStackTrace();
}
This endpoint does not need any parameter.
- Content-Type: application/json
- Accept: application/json
GetEmailEventReport getEmailEventReport(limit, offset, startDate, endDate, days, email, event, tags, messageId, templateId, sort)
Get all your transactional email activity (unaggregated events)
This endpoint will show the aggregated stats for past 30 days by default if `startDate` and `endDate` OR `days` is not passed. The date range can not exceed 90 days
// Import classes:
//import sendinblue.ApiClient;
//import sendinblue.ApiException;
//import sendinblue.Configuration;
//import sendinblue.auth.*;
//import sibApi.TransactionalEmailsApi;
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");
TransactionalEmailsApi apiInstance = new TransactionalEmailsApi();
Long limit = 2500L; // Long | Number limitation for the result returned
Long offset = 0L; // Long | Beginning point in the list to retrieve from.
String startDate = "startDate_example"; // String | Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate
String endDate = "endDate_example"; // String | Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate
Long days = 789L; // Long | Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate'
String email = "email_example"; // String | Filter the report for a specific email addresses
String event = "event_example"; // String | Filter the report for a specific event type
String tags = "tags_example"; // String | Filter the report for tags (serialized and urlencoded array)
String messageId = "messageId_example"; // String | Filter on a specific message id
Long templateId = 789L; // Long | Filter on a specific template id
String sort = "desc"; // String | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed
try {
GetEmailEventReport result = apiInstance.getEmailEventReport(limit, offset, startDate, endDate, days, email, event, tags, messageId, templateId, sort);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TransactionalEmailsApi#getEmailEventReport");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
limit | Long | Number limitation for the result returned | [optional] [default to 2500] |
offset | Long | Beginning point in the list to retrieve from. | [optional] [default to 0] |
startDate | String | Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate | [optional] |
endDate | String | Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate | [optional] |
days | Long | Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' | [optional] |
String | Filter the report for a specific email addresses | [optional] | |
event | String | Filter the report for a specific event type | [optional] [enum: bounces, hardBounces, softBounces, delivered, spam, requests, opened, clicks, invalid, deferred, blocked, unsubscribed, error, loadedByProxy] |
tags | String | Filter the report for tags (serialized and urlencoded array) | [optional] |
messageId | String | Filter on a specific message id | [optional] |
templateId | Long | Filter on a specific template id | [optional] |
sort | String | Sort the results in the ascending/descending order of record creation. Default order is descending if `sort` is not passed | [optional] [default to desc] [enum: asc, desc] |
- Content-Type: application/json
- Accept: application/json
GetScheduledEmailByBatchId getScheduledEmailByBatchId(batchId, startDate, endDate, sort, status, limit, offset)
Fetch scheduled emails by batchId
Fetch scheduled batch of emails by batchId (Can retrieve data upto 30 days old)
// Import classes:
//import sendinblue.ApiClient;
//import sendinblue.ApiException;
//import sendinblue.Configuration;
//import sendinblue.auth.*;
//import sibApi.TransactionalEmailsApi;
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");
TransactionalEmailsApi apiInstance = new TransactionalEmailsApi();
String batchId = "batchId_example"; // String | The batchId of scheduled emails batch (Should be a valid UUIDv4)
LocalDate startDate = LocalDate.now(); // LocalDate | Mandatory if `endDate` is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date.
LocalDate endDate = LocalDate.now(); // LocalDate | Mandatory if `startDate` is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month.
String sort = "desc"; // String | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed
String status = "status_example"; // String | Filter the records by `status` of the scheduled email batch or message.
Long limit = 100L; // Long | Number of documents returned per page
Long offset = 0L; // Long | Index of the first document on the page
try {
GetScheduledEmailByBatchId result = apiInstance.getScheduledEmailByBatchId(batchId, startDate, endDate, sort, status, limit, offset);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TransactionalEmailsApi#getScheduledEmailByBatchId");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
batchId | String | The batchId of scheduled emails batch (Should be a valid UUIDv4) | |
startDate | LocalDate | Mandatory if `endDate` is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date. | [optional] |
endDate | LocalDate | Mandatory if `startDate` is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. | [optional] |
sort | String | Sort the results in the ascending/descending order of record creation. Default order is descending if `sort` is not passed | [optional] [default to desc] [enum: asc, desc] |
status | String | Filter the records by `status` of the scheduled email batch or message. | [optional] [enum: processed, inProgress, queued] |
limit | Long | Number of documents returned per page | [optional] [default to 100] |
offset | Long | Index of the first document on the page | [optional] [default to 0] |
- Content-Type: application/json
- Accept: application/json
GetScheduledEmailByMessageId getScheduledEmailByMessageId(messageId, startDate, endDate)
Fetch scheduled email by messageId
Fetch scheduled email by messageId (Can retrieve data upto 30 days old)
// Import classes:
//import sendinblue.ApiClient;
//import sendinblue.ApiException;
//import sendinblue.Configuration;
//import sendinblue.auth.*;
//import sibApi.TransactionalEmailsApi;
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");
TransactionalEmailsApi apiInstance = new TransactionalEmailsApi();
String messageId = "messageId_example"; // String | The messageId of scheduled email
LocalDate startDate = LocalDate.now(); // LocalDate | Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date.
LocalDate endDate = LocalDate.now(); // LocalDate | Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month.
try {
GetScheduledEmailByMessageId result = apiInstance.getScheduledEmailByMessageId(messageId, startDate, endDate);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TransactionalEmailsApi#getScheduledEmailByMessageId");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
messageId | String | The messageId of scheduled email | |
startDate | LocalDate | Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older tha current date. | [optional] |
endDate | LocalDate | Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. | [optional] |
- Content-Type: application/json
- Accept: application/json
GetReports getSmtpReport(limit, offset, startDate, endDate, days, tag, sort)
Get your transactional email activity aggregated per day
// Import classes:
//import sendinblue.ApiClient;
//import sendinblue.ApiException;
//import sendinblue.Configuration;
//import sendinblue.auth.*;
//import sibApi.TransactionalEmailsApi;
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");
TransactionalEmailsApi apiInstance = new TransactionalEmailsApi();
Long limit = 10L; // Long | Number of documents returned per page
Long offset = 0L; // Long | Index of the first document on the page
String startDate = "startDate_example"; // String | Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD)
String endDate = "endDate_example"; // String | Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD)
Long days = 789L; // Long | Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate'
String tag = "tag_example"; // String | Tag of the emails
String sort = "desc"; // String | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed
try {
GetReports result = apiInstance.getSmtpReport(limit, offset, startDate, endDate, days, tag, sort);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TransactionalEmailsApi#getSmtpReport");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
limit | Long | Number of documents returned per page | [optional] [default to 10] |
offset | Long | Index of the first document on the page | [optional] [default to 0] |
startDate | String | Mandatory if endDate is used. Starting date of the report (YYYY-MM-DD) | [optional] |
endDate | String | Mandatory if startDate is used. Ending date of the report (YYYY-MM-DD) | [optional] |
days | Long | Number of days in the past including today (positive integer). Not compatible with 'startDate' and 'endDate' | [optional] |
tag | String | Tag of the emails | [optional] |
sort | String | Sort the results in the ascending/descending order of record creation. Default order is descending if `sort` is not passed | [optional] [default to desc] [enum: asc, desc] |
- Content-Type: application/json
- Accept: application/json
GetSmtpTemplateOverview getSmtpTemplate(templateId)
Returns the template information
// Import classes:
//import sendinblue.ApiClient;
//import sendinblue.ApiException;
//import sendinblue.Configuration;
//import sendinblue.auth.*;
//import sibApi.TransactionalEmailsApi;
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");
TransactionalEmailsApi apiInstance = new TransactionalEmailsApi();
Long templateId = 789L; // Long | id of the template
try {
GetSmtpTemplateOverview result = apiInstance.getSmtpTemplate(templateId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TransactionalEmailsApi#getSmtpTemplate");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
templateId | Long | id of the template |
- Content-Type: application/json
- Accept: application/json
GetSmtpTemplates getSmtpTemplates(templateStatus, limit, offset, sort)
Get the list of email templates
// Import classes:
//import sendinblue.ApiClient;
//import sendinblue.ApiException;
//import sendinblue.Configuration;
//import sendinblue.auth.*;
//import sibApi.TransactionalEmailsApi;
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");
TransactionalEmailsApi apiInstance = new TransactionalEmailsApi();
Boolean templateStatus = true; // Boolean | Filter on the status of the template. Active = true, inactive = false
Long limit = 50L; // Long | Number of documents returned per page
Long offset = 0L; // Long | Index of the first document in the page
String sort = "desc"; // String | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed
try {
GetSmtpTemplates result = apiInstance.getSmtpTemplates(templateStatus, limit, offset, sort);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TransactionalEmailsApi#getSmtpTemplates");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
templateStatus | Boolean | Filter on the status of the template. Active = true, inactive = false | [optional] |
limit | Long | Number of documents returned per page | [optional] [default to 50] |
offset | Long | Index of the first document in the page | [optional] [default to 0] |
sort | String | Sort the results in the ascending/descending order of record creation. Default order is descending if `sort` is not passed | [optional] [default to desc] [enum: asc, desc] |
- Content-Type: application/json
- Accept: application/json
GetTransacBlockedContacts getTransacBlockedContacts(startDate, endDate, limit, offset, senders, sort)
Get the list of blocked or unsubscribed transactional contacts
// Import classes:
//import sendinblue.ApiClient;
//import sendinblue.ApiException;
//import sendinblue.Configuration;
//import sendinblue.auth.*;
//import sibApi.TransactionalEmailsApi;
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");
TransactionalEmailsApi apiInstance = new TransactionalEmailsApi();
String startDate = "startDate_example"; // String | Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the blocked or unsubscribed contacts
String endDate = "endDate_example"; // String | Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the blocked or unsubscribed contacts
Long limit = 50L; // Long | Number of documents returned per page
Long offset = 0L; // Long | Index of the first document on the page
List<String> senders = Arrays.asList("senders_example"); // List<String> | Comma separated list of emails of the senders from which contacts are blocked or unsubscribed
String sort = "desc"; // String | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed
try {
GetTransacBlockedContacts result = apiInstance.getTransacBlockedContacts(startDate, endDate, limit, offset, senders, sort);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TransactionalEmailsApi#getTransacBlockedContacts");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
startDate | String | Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the blocked or unsubscribed contacts | [optional] |
endDate | String | Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the blocked or unsubscribed contacts | [optional] |
limit | Long | Number of documents returned per page | [optional] [default to 50] |
offset | Long | Index of the first document on the page | [optional] [default to 0] |
senders | List<String> | Comma separated list of emails of the senders from which contacts are blocked or unsubscribed | [optional] |
sort | String | Sort the results in the ascending/descending order of record creation. Default order is descending if `sort` is not passed | [optional] [default to desc] [enum: asc, desc] |
- Content-Type: application/json
- Accept: application/json
GetTransacEmailContent getTransacEmailContent(uuid)
Get the personalized content of a sent transactional email
// Import classes:
//import sendinblue.ApiClient;
//import sendinblue.ApiException;
//import sendinblue.Configuration;
//import sendinblue.auth.*;
//import sibApi.TransactionalEmailsApi;
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");
TransactionalEmailsApi apiInstance = new TransactionalEmailsApi();
String uuid = "uuid_example"; // String | Unique id of the transactional email that has been sent to a particular contact
try {
GetTransacEmailContent result = apiInstance.getTransacEmailContent(uuid);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TransactionalEmailsApi#getTransacEmailContent");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
uuid | String | Unique id of the transactional email that has been sent to a particular contact |
- Content-Type: application/json
- Accept: application/json
GetTransacEmailsList getTransacEmailsList(email, templateId, messageId, startDate, endDate, sort, limit, offset)
Get the list of transactional emails on the basis of allowed filters
This endpoint will show the list of emails for past 30 days by default. To retrieve emails before that time, please pass startDate and endDate in query filters.
// Import classes:
//import sendinblue.ApiClient;
//import sendinblue.ApiException;
//import sendinblue.Configuration;
//import sendinblue.auth.*;
//import sibApi.TransactionalEmailsApi;
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");
TransactionalEmailsApi apiInstance = new TransactionalEmailsApi();
String email = "email_example"; // String | Mandatory if templateId and messageId are not passed in query filters. Email address to which transactional email has been sent.
Long templateId = 789L; // Long | Mandatory if email and messageId are not passed in query filters. Id of the template that was used to compose transactional email.
String messageId = "messageId_example"; // String | Mandatory if templateId and email are not passed in query filters. Message ID of the transactional email sent.
String startDate = "startDate_example"; // String | Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Maximum time period that can be selected is one month.
String endDate = "endDate_example"; // String | Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month.
String sort = "desc"; // String | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed
Long limit = 500L; // Long | Number of documents returned per page
Long offset = 0L; // Long | Index of the first document in the page
try {
GetTransacEmailsList result = apiInstance.getTransacEmailsList(email, templateId, messageId, startDate, endDate, sort, limit, offset);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TransactionalEmailsApi#getTransacEmailsList");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
String | Mandatory if templateId and messageId are not passed in query filters. Email address to which transactional email has been sent. | [optional] | |
templateId | Long | Mandatory if email and messageId are not passed in query filters. Id of the template that was used to compose transactional email. | [optional] |
messageId | String | Mandatory if templateId and email are not passed in query filters. Message ID of the transactional email sent. | [optional] |
startDate | String | Mandatory if endDate is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Maximum time period that can be selected is one month. | [optional] |
endDate | String | Mandatory if startDate is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. | [optional] |
sort | String | Sort the results in the ascending/descending order of record creation. Default order is descending if `sort` is not passed | [optional] [default to desc] [enum: asc, desc] |
limit | Long | Number of documents returned per page | [optional] [default to 500] |
offset | Long | Index of the first document in the page | [optional] [default to 0] |
- Content-Type: application/json
- Accept: application/json
sendTestTemplate(templateId, sendTestEmail)
Send a template to your test list
// Import classes:
//import sendinblue.ApiClient;
//import sendinblue.ApiException;
//import sendinblue.Configuration;
//import sendinblue.auth.*;
//import sibApi.TransactionalEmailsApi;
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");
TransactionalEmailsApi apiInstance = new TransactionalEmailsApi();
Long templateId = 789L; // Long | Id of the template
SendTestEmail sendTestEmail = new SendTestEmail(); // SendTestEmail |
try {
apiInstance.sendTestTemplate(templateId, sendTestEmail);
} catch (ApiException e) {
System.err.println("Exception when calling TransactionalEmailsApi#sendTestTemplate");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
templateId | Long | Id of the template | |
sendTestEmail | SendTestEmail |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
CreateSmtpEmail sendTransacEmail(sendSmtpEmail)
Send a transactional email
// Import classes:
//import sendinblue.ApiClient;
//import sendinblue.ApiException;
//import sendinblue.Configuration;
//import sendinblue.auth.*;
//import sibApi.TransactionalEmailsApi;
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");
TransactionalEmailsApi apiInstance = new TransactionalEmailsApi();
SendSmtpEmail sendSmtpEmail = new SendSmtpEmail(); // SendSmtpEmail | Values to send a transactional email
try {
CreateSmtpEmail result = apiInstance.sendTransacEmail(sendSmtpEmail);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TransactionalEmailsApi#sendTransacEmail");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
sendSmtpEmail | SendSmtpEmail | Values to send a transactional email |
- Content-Type: application/json
- Accept: application/json
smtpBlockedContactsEmailDelete(email)
Unblock or resubscribe a transactional contact
// Import classes:
//import sendinblue.ApiClient;
//import sendinblue.ApiException;
//import sendinblue.Configuration;
//import sendinblue.auth.*;
//import sibApi.TransactionalEmailsApi;
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");
TransactionalEmailsApi apiInstance = new TransactionalEmailsApi();
String email = "email_example"; // String | contact email (urlencoded) to unblock.
try {
apiInstance.smtpBlockedContactsEmailDelete(email);
} catch (ApiException e) {
System.err.println("Exception when calling TransactionalEmailsApi#smtpBlockedContactsEmailDelete");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
String | contact email (urlencoded) to unblock. |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
smtpLogMessageIdDelete(messageId)
Delete an SMTP transactional log
// Import classes:
//import sendinblue.ApiClient;
//import sendinblue.ApiException;
//import sendinblue.Configuration;
//import sendinblue.auth.*;
//import sibApi.TransactionalEmailsApi;
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");
TransactionalEmailsApi apiInstance = new TransactionalEmailsApi();
String messageId = "messageId_example"; // String | MessageId of the transactional log to delete
try {
apiInstance.smtpLogMessageIdDelete(messageId);
} catch (ApiException e) {
System.err.println("Exception when calling TransactionalEmailsApi#smtpLogMessageIdDelete");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
messageId | String | MessageId of the transactional log to delete |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
updateSmtpTemplate(templateId, smtpTemplate)
Update an email template
// Import classes:
//import sendinblue.ApiClient;
//import sendinblue.ApiException;
//import sendinblue.Configuration;
//import sendinblue.auth.*;
//import sibApi.TransactionalEmailsApi;
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");
TransactionalEmailsApi apiInstance = new TransactionalEmailsApi();
Long templateId = 789L; // Long | id of the template
UpdateSmtpTemplate smtpTemplate = new UpdateSmtpTemplate(); // UpdateSmtpTemplate | values to update in transactional email template
try {
apiInstance.updateSmtpTemplate(templateId, smtpTemplate);
} catch (ApiException e) {
System.err.println("Exception when calling TransactionalEmailsApi#updateSmtpTemplate");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
templateId | Long | id of the template | |
smtpTemplate | UpdateSmtpTemplate | values to update in transactional email template |
null (empty response body)
- Content-Type: application/json
- Accept: application/json