Package software.xdev.brevo.api
Class TransactionalEmailsApi
java.lang.Object
software.xdev.brevo.client.BaseApi
software.xdev.brevo.api.TransactionalEmailsApi
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidblockNewDomain(BlockDomain blockDomain) Add a new domain to the list of blocked domains Blocks a new domain in order to avoid messages being sent to the samevoidblockNewDomain(BlockDomain blockDomain, Map<String, String> additionalHeaders) Add a new domain to the list of blocked domains Blocks a new domain in order to avoid messages being sent to the samecreateSmtpTemplate(CreateSmtpTemplate createSmtpTemplate) Create an email templatecreateSmtpTemplate(CreateSmtpTemplate createSmtpTemplate, Map<String, String> additionalHeaders) Create an email templatevoiddeleteBlockedDomain(String domain) Unblock an existing domain from the list of blocked domains Unblocks an existing domain from the list of blocked domainsvoiddeleteBlockedDomain(String domain, Map<String, String> additionalHeaders) Unblock an existing domain from the list of blocked domains Unblocks an existing domain from the list of blocked domainsvoiddeleteHardbounces(DeleteHardbounces deleteHardbounces) Delete hardbounces Delete hardbounces.voiddeleteHardbounces(DeleteHardbounces deleteHardbounces, Map<String, String> additionalHeaders) Delete hardbounces Delete hardbounces.voiddeleteScheduledEmailById(String identifier) Delete scheduled emails by batchId or messageId Delete scheduled batch of emails by batchId or single scheduled email by messageIdvoiddeleteScheduledEmailById(String identifier, Map<String, String> additionalHeaders) Delete scheduled emails by batchId or messageId Delete scheduled batch of emails by batchId or single scheduled email by messageIdvoiddeleteSmtpTemplate(Long templateId) Delete an inactive email templatevoiddeleteSmtpTemplate(Long templateId, Map<String, String> additionalHeaders) Delete an inactive email templategetAggregatedSmtpReport(String startDate, String endDate, Long days, String 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.getAggregatedSmtpReport(String startDate, String endDate, Long days, String tag, Map<String, String> additionalHeaders) 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.Get the list of blocked domains Get the list of blocked domainsgetBlockedDomains(Map<String, String> additionalHeaders) Get the list of blocked domains Get the list of blocked domainsgetEmailEventReport(Long limit, Long offset, String startDate, String endDate, Long days, String email, String event, String tags, String messageId, Long templateId, String 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.getEmailEventReport(Long limit, Long offset, String startDate, String endDate, Long days, String email, String event, String tags, String messageId, Long templateId, String sort, Map<String, String> additionalHeaders) 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.getScheduledEmailById(String identifier, LocalDate startDate, LocalDate endDate, String sort, String status, Long limit, Long offset) Fetch scheduled emails by batchId or messageId Fetch scheduled batch of emails by batchId or single scheduled email by messageId (Can retrieve data upto 30 days old)getScheduledEmailById(String identifier, LocalDate startDate, LocalDate endDate, String sort, String status, Long limit, Long offset, Map<String, String> additionalHeaders) Fetch scheduled emails by batchId or messageId Fetch scheduled batch of emails by batchId or single scheduled email by messageId (Can retrieve data upto 30 days old)getSmtpReport(Long limit, Long offset, String startDate, String endDate, Long days, String tag, String sort) Get your transactional email activity aggregated per daygetSmtpReport(Long limit, Long offset, String startDate, String endDate, Long days, String tag, String sort, Map<String, String> additionalHeaders) Get your transactional email activity aggregated per daygetSmtpTemplate(Long templateId) Returns the template informationgetSmtpTemplate(Long templateId, Map<String, String> additionalHeaders) Returns the template informationgetSmtpTemplates(Boolean templateStatus, Long limit, Long offset, String sort) Get the list of email templatesgetSmtpTemplates(Boolean templateStatus, Long limit, Long offset, String sort, Map<String, String> additionalHeaders) Get the list of email templatesgetTransacBlockedContacts(String startDate, String endDate, Long limit, Long offset, List<String> senders, String sort) Get the list of blocked or unsubscribed transactional contactsgetTransacBlockedContacts(String startDate, String endDate, Long limit, Long offset, List<String> senders, String sort, Map<String, String> additionalHeaders) Get the list of blocked or unsubscribed transactional contactsgetTransacEmailContent(String uuid) Get the personalized content of a sent transactional emailgetTransacEmailContent(String uuid, Map<String, String> additionalHeaders) Get the personalized content of a sent transactional emailgetTransacEmailsList(String email, Long templateId, String messageId, String startDate, String endDate, String sort, Long limit, Long 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.getTransacEmailsList(String email, Long templateId, String messageId, String startDate, String endDate, String sort, Long limit, Long offset, Map<String, String> additionalHeaders) 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.<T> TinvokeAPI(String url, String method, Object request, com.fasterxml.jackson.core.type.TypeReference<T> returnType, Map<String, String> additionalHeaders) Directly invoke the API for the given URL.voidsendTestTemplate(Long templateId, SendTestEmail sendTestEmail) Send a template to your test listvoidsendTestTemplate(Long templateId, SendTestEmail sendTestEmail, Map<String, String> additionalHeaders) Send a template to your test listsendTransacEmail(SendSmtpEmail sendSmtpEmail) Send a transactional emailsendTransacEmail(SendSmtpEmail sendSmtpEmail, Map<String, String> additionalHeaders) Send a transactional emailvoidUnblock or resubscribe a transactional contactvoidsmtpBlockedContactsEmailDelete(String email, Map<String, String> additionalHeaders) Unblock or resubscribe a transactional contactvoidsmtpLogIdentifierDelete(String identifier) Delete an SMTP transactional logvoidsmtpLogIdentifierDelete(String identifier, Map<String, String> additionalHeaders) Delete an SMTP transactional logtemplatePreview(TemplatePreviewRequestBody templatePreviewRequestBody) Generate the rendered preview of transactional templatetemplatePreview(TemplatePreviewRequestBody templatePreviewRequestBody, Map<String, String> additionalHeaders) Generate the rendered preview of transactional templatevoidupdateSmtpTemplate(Long templateId, UpdateSmtpTemplate updateSmtpTemplate) Update an email templatevoidupdateSmtpTemplate(Long templateId, UpdateSmtpTemplate updateSmtpTemplate, Map<String, String> additionalHeaders) Update an email templateMethods inherited from class software.xdev.brevo.client.BaseApi
getApiClient, invokeAPI, invokeAPI, invokeAPI, invokeAPI, invokeAPI, invokeAPI, setApiClient
-
Constructor Details
-
TransactionalEmailsApi
public TransactionalEmailsApi() -
TransactionalEmailsApi
-
-
Method Details
-
blockNewDomain
Add a new domain to the list of blocked domains Blocks a new domain in order to avoid messages being sent to the same- Parameters:
blockDomain- Name of the domain to be blocked (required)- Throws:
ApiException- if fails to make API call
-
blockNewDomain
public void blockNewDomain(@Nonnull BlockDomain blockDomain, Map<String, String> additionalHeaders) throws ApiExceptionAdd a new domain to the list of blocked domains Blocks a new domain in order to avoid messages being sent to the same- Parameters:
blockDomain- Name of the domain to be blocked (required)additionalHeaders- additionalHeaders for this call- Throws:
ApiException- if fails to make API call
-
createSmtpTemplate
public CreateModel createSmtpTemplate(@Nonnull CreateSmtpTemplate createSmtpTemplate) throws ApiException Create an email template- Parameters:
createSmtpTemplate- values to update in transactional email template (required)- Returns:
- CreateModel
- Throws:
ApiException- if fails to make API call
-
createSmtpTemplate
public CreateModel createSmtpTemplate(@Nonnull CreateSmtpTemplate createSmtpTemplate, Map<String, String> additionalHeaders) throws ApiExceptionCreate an email template- Parameters:
createSmtpTemplate- values to update in transactional email template (required)additionalHeaders- additionalHeaders for this call- Returns:
- CreateModel
- Throws:
ApiException- if fails to make API call
-
deleteBlockedDomain
Unblock an existing domain from the list of blocked domains Unblocks an existing domain from the list of blocked domains- Parameters:
domain- The name of the domain to be deleted (required)- Throws:
ApiException- if fails to make API call
-
deleteBlockedDomain
public void deleteBlockedDomain(@Nonnull String domain, Map<String, String> additionalHeaders) throws ApiExceptionUnblock an existing domain from the list of blocked domains Unblocks an existing domain from the list of blocked domains- Parameters:
domain- The name of the domain to be deleted (required)additionalHeaders- additionalHeaders for this call- Throws:
ApiException- if fails to make API call
-
deleteHardbounces
Delete hardbounces Delete hardbounces. To use carefully (e.g. in case of temporary ISP failures)- Parameters:
deleteHardbounces- values to delete hardbounces (optional)- Throws:
ApiException- if fails to make API call
-
deleteHardbounces
public void deleteHardbounces(@Nullable DeleteHardbounces deleteHardbounces, Map<String, String> additionalHeaders) throws ApiExceptionDelete hardbounces Delete hardbounces. To use carefully (e.g. in case of temporary ISP failures)- Parameters:
deleteHardbounces- values to delete hardbounces (optional)additionalHeaders- additionalHeaders for this call- Throws:
ApiException- if fails to make API call
-
deleteScheduledEmailById
Delete scheduled emails by batchId or messageId Delete scheduled batch of emails by batchId or single scheduled email by messageId- Parameters:
identifier- The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email. (required)- Throws:
ApiException- if fails to make API call
-
deleteScheduledEmailById
public void deleteScheduledEmailById(@Nonnull String identifier, Map<String, String> additionalHeaders) throws ApiExceptionDelete scheduled emails by batchId or messageId Delete scheduled batch of emails by batchId or single scheduled email by messageId- Parameters:
identifier- The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email. (required)additionalHeaders- additionalHeaders for this call- Throws:
ApiException- if fails to make API call
-
deleteSmtpTemplate
Delete an inactive email template- Parameters:
templateId- id of the template (required)- Throws:
ApiException- if fails to make API call
-
deleteSmtpTemplate
public void deleteSmtpTemplate(@Nonnull Long templateId, Map<String, String> additionalHeaders) throws ApiExceptionDelete an inactive email template- Parameters:
templateId- id of the template (required)additionalHeaders- additionalHeaders for this call- Throws:
ApiException- if fails to make API call
-
getAggregatedSmtpReport
public GetAggregatedReport getAggregatedSmtpReport(@Nullable String startDate, @Nullable String endDate, @Nullable Long days, @Nullable String tag) throws ApiException 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- Parameters:
startDate- **Mandatory if endDate is used.** Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional)endDate- **Mandatory if startDate is used.** Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional)days- Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_ (optional)tag- Tag of the emails (optional)- Returns:
- GetAggregatedReport
- Throws:
ApiException- if fails to make API call
-
getAggregatedSmtpReport
public GetAggregatedReport getAggregatedSmtpReport(@Nullable String startDate, @Nullable String endDate, @Nullable Long days, @Nullable String tag, Map<String, String> additionalHeaders) throws ApiExceptionGet 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- Parameters:
startDate- **Mandatory if endDate is used.** Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional)endDate- **Mandatory if startDate is used.** Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional)days- Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_ (optional)tag- Tag of the emails (optional)additionalHeaders- additionalHeaders for this call- Returns:
- GetAggregatedReport
- Throws:
ApiException- if fails to make API call
-
getBlockedDomains
Get the list of blocked domains Get the list of blocked domains- Returns:
- GetBlockedDomains
- Throws:
ApiException- if fails to make API call
-
getBlockedDomains
public GetBlockedDomains getBlockedDomains(Map<String, String> additionalHeaders) throws ApiExceptionGet the list of blocked domains Get the list of blocked domains- Parameters:
additionalHeaders- additionalHeaders for this call- Returns:
- GetBlockedDomains
- Throws:
ApiException- if fails to make API call
-
getEmailEventReport
public GetEmailEventReport getEmailEventReport(@Nullable Long limit, @Nullable Long offset, @Nullable String startDate, @Nullable String endDate, @Nullable Long days, @Nullable String email, @Nullable String event, @Nullable String tags, @Nullable String messageId, @Nullable Long templateId, @Nullable String sort) throws ApiException 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- Parameters:
limit- Number limitation for the result returned (optional, default to 2500)offset- Beginning point in the list to retrieve from. (optional, default to 0)startDate- **Mandatory if endDate is used.** Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional)endDate- **Mandatory if startDate is used.** Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional)days- Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_ (optional)email- Filter the report for a specific email addresses (optional)event- Filter the report for a specific event type (optional)tags- Filter the report for tags (serialized and urlencoded array). To pass multiple tags, a format of string separated by commas is used such as **\"one, two, three\"** (optional)messageId- Filter on a specific message id (optional)templateId- Filter on a specific template id (optional)sort- Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc)- Returns:
- GetEmailEventReport
- Throws:
ApiException- if fails to make API call
-
getEmailEventReport
public GetEmailEventReport getEmailEventReport(@Nullable Long limit, @Nullable Long offset, @Nullable String startDate, @Nullable String endDate, @Nullable Long days, @Nullable String email, @Nullable String event, @Nullable String tags, @Nullable String messageId, @Nullable Long templateId, @Nullable String sort, Map<String, String> additionalHeaders) throws ApiExceptionGet 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- Parameters:
limit- Number limitation for the result returned (optional, default to 2500)offset- Beginning point in the list to retrieve from. (optional, default to 0)startDate- **Mandatory if endDate is used.** Starting date of the report (YYYY-MM-DD). Must be lower than equal to endDate (optional)endDate- **Mandatory if startDate is used.** Ending date of the report (YYYY-MM-DD). Must be greater than equal to startDate (optional)days- Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_ (optional)email- Filter the report for a specific email addresses (optional)event- Filter the report for a specific event type (optional)tags- Filter the report for tags (serialized and urlencoded array). To pass multiple tags, a format of string separated by commas is used such as **\"one, two, three\"** (optional)messageId- Filter on a specific message id (optional)templateId- Filter on a specific template id (optional)sort- Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc)additionalHeaders- additionalHeaders for this call- Returns:
- GetEmailEventReport
- Throws:
ApiException- if fails to make API call
-
getScheduledEmailById
public GetScheduledEmailById200Response getScheduledEmailById(@Nonnull String identifier, @Nullable LocalDate startDate, @Nullable LocalDate endDate, @Nullable String sort, @Nullable String status, @Nullable Long limit, @Nullable Long offset) throws ApiException Fetch scheduled emails by batchId or messageId Fetch scheduled batch of emails by batchId or single scheduled email by messageId (Can retrieve data upto 30 days old)- Parameters:
identifier- The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email. (required)startDate- 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- 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- Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed. Not valid when identifier is `messageId`. (optional, default to desc)status- Filter the records by `status` of the scheduled email batch or message. Not valid when identifier is `messageId`. (optional)limit- Number of documents returned per page. Not valid when identifier is `messageId`. (optional, default to 100)offset- Index of the first document on the page. Not valid when identifier is `messageId`. (optional, default to 0)- Returns:
- GetScheduledEmailById200Response
- Throws:
ApiException- if fails to make API call
-
getScheduledEmailById
public GetScheduledEmailById200Response getScheduledEmailById(@Nonnull String identifier, @Nullable LocalDate startDate, @Nullable LocalDate endDate, @Nullable String sort, @Nullable String status, @Nullable Long limit, @Nullable Long offset, Map<String, String> additionalHeaders) throws ApiExceptionFetch scheduled emails by batchId or messageId Fetch scheduled batch of emails by batchId or single scheduled email by messageId (Can retrieve data upto 30 days old)- Parameters:
identifier- The `batchId` of scheduled emails batch (Should be a valid UUIDv4) or the `messageId` of scheduled email. (required)startDate- 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- 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- Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed. Not valid when identifier is `messageId`. (optional, default to desc)status- Filter the records by `status` of the scheduled email batch or message. Not valid when identifier is `messageId`. (optional)limit- Number of documents returned per page. Not valid when identifier is `messageId`. (optional, default to 100)offset- Index of the first document on the page. Not valid when identifier is `messageId`. (optional, default to 0)additionalHeaders- additionalHeaders for this call- Returns:
- GetScheduledEmailById200Response
- Throws:
ApiException- if fails to make API call
-
getSmtpReport
public GetReports getSmtpReport(@Nullable Long limit, @Nullable Long offset, @Nullable String startDate, @Nullable String endDate, @Nullable Long days, @Nullable String tag, @Nullable String sort) throws ApiException Get your transactional email activity aggregated per day- Parameters:
limit- Number of documents returned per page (optional, default to 10)offset- Index of the first document on the page (optional, default to 0)startDate- **Mandatory if endDate is used.** Starting date of the report (YYYY-MM-DD) (optional)endDate- **Mandatory if startDate is used.** Ending date of the report (YYYY-MM-DD) (optional)days- Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_ (optional)tag- Tag of the emails (optional)sort- Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc)- Returns:
- GetReports
- Throws:
ApiException- if fails to make API call
-
getSmtpReport
public GetReports getSmtpReport(@Nullable Long limit, @Nullable Long offset, @Nullable String startDate, @Nullable String endDate, @Nullable Long days, @Nullable String tag, @Nullable String sort, Map<String, String> additionalHeaders) throws ApiExceptionGet your transactional email activity aggregated per day- Parameters:
limit- Number of documents returned per page (optional, default to 10)offset- Index of the first document on the page (optional, default to 0)startDate- **Mandatory if endDate is used.** Starting date of the report (YYYY-MM-DD) (optional)endDate- **Mandatory if startDate is used.** Ending date of the report (YYYY-MM-DD) (optional)days- Number of days in the past including today (positive integer). _Not compatible with 'startDate' and 'endDate'_ (optional)tag- Tag of the emails (optional)sort- Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc)additionalHeaders- additionalHeaders for this call- Returns:
- GetReports
- Throws:
ApiException- if fails to make API call
-
getSmtpTemplate
Returns the template information- Parameters:
templateId- id of the template (required)- Returns:
- GetSmtpTemplateOverview
- Throws:
ApiException- if fails to make API call
-
getSmtpTemplate
public GetSmtpTemplateOverview getSmtpTemplate(@Nonnull Long templateId, Map<String, String> additionalHeaders) throws ApiExceptionReturns the template information- Parameters:
templateId- id of the template (required)additionalHeaders- additionalHeaders for this call- Returns:
- GetSmtpTemplateOverview
- Throws:
ApiException- if fails to make API call
-
getSmtpTemplates
public GetSmtpTemplates getSmtpTemplates(@Nullable Boolean templateStatus, @Nullable Long limit, @Nullable Long offset, @Nullable String sort) throws ApiException Get the list of email templates- Parameters:
templateStatus- Filter on the status of the template. Active = true, inactive = false (optional)limit- Number of documents returned per page (optional, default to 50)offset- Index of the first document in the page (optional, default to 0)sort- Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc)- Returns:
- GetSmtpTemplates
- Throws:
ApiException- if fails to make API call
-
getSmtpTemplates
public GetSmtpTemplates getSmtpTemplates(@Nullable Boolean templateStatus, @Nullable Long limit, @Nullable Long offset, @Nullable String sort, Map<String, String> additionalHeaders) throws ApiExceptionGet the list of email templates- Parameters:
templateStatus- Filter on the status of the template. Active = true, inactive = false (optional)limit- Number of documents returned per page (optional, default to 50)offset- Index of the first document in the page (optional, default to 0)sort- Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc)additionalHeaders- additionalHeaders for this call- Returns:
- GetSmtpTemplates
- Throws:
ApiException- if fails to make API call
-
getTransacBlockedContacts
public GetTransacBlockedContacts getTransacBlockedContacts(@Nullable String startDate, @Nullable String endDate, @Nullable Long limit, @Nullable Long offset, @Nullable List<String> senders, @Nullable String sort) throws ApiException Get the list of blocked or unsubscribed transactional contacts- Parameters:
startDate- **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) from which you want to fetch the blocked or unsubscribed contacts (optional)endDate- **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) till which you want to fetch the blocked or unsubscribed contacts (optional)limit- Number of documents returned per page (optional, default to 50)offset- Index of the first document on the page (optional, default to 0)senders- Comma separated list of emails of the senders from which contacts are blocked or unsubscribed (optional)sort- Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc)- Returns:
- GetTransacBlockedContacts
- Throws:
ApiException- if fails to make API call
-
getTransacBlockedContacts
public GetTransacBlockedContacts getTransacBlockedContacts(@Nullable String startDate, @Nullable String endDate, @Nullable Long limit, @Nullable Long offset, @Nullable List<String> senders, @Nullable String sort, Map<String, String> additionalHeaders) throws ApiExceptionGet the list of blocked or unsubscribed transactional contacts- Parameters:
startDate- **Mandatory if endDate is used.** Starting date (YYYY-MM-DD) from which you want to fetch the blocked or unsubscribed contacts (optional)endDate- **Mandatory if startDate is used.** Ending date (YYYY-MM-DD) till which you want to fetch the blocked or unsubscribed contacts (optional)limit- Number of documents returned per page (optional, default to 50)offset- Index of the first document on the page (optional, default to 0)senders- Comma separated list of emails of the senders from which contacts are blocked or unsubscribed (optional)sort- Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc)additionalHeaders- additionalHeaders for this call- Returns:
- GetTransacBlockedContacts
- Throws:
ApiException- if fails to make API call
-
getTransacEmailContent
Get the personalized content of a sent transactional email- Parameters:
uuid- Unique id of the transactional email that has been sent to a particular contact (required)- Returns:
- GetTransacEmailContent
- Throws:
ApiException- if fails to make API call
-
getTransacEmailContent
public GetTransacEmailContent getTransacEmailContent(@Nonnull String uuid, Map<String, String> additionalHeaders) throws ApiExceptionGet the personalized content of a sent transactional email- Parameters:
uuid- Unique id of the transactional email that has been sent to a particular contact (required)additionalHeaders- additionalHeaders for this call- Returns:
- GetTransacEmailContent
- Throws:
ApiException- if fails to make API call
-
getTransacEmailsList
public GetTransacEmailsList getTransacEmailsList(@Nullable String email, @Nullable Long templateId, @Nullable String messageId, @Nullable String startDate, @Nullable String endDate, @Nullable String sort, @Nullable Long limit, @Nullable Long offset) throws ApiException 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.- Parameters:
email- **Mandatory if templateId and messageId are not passed in query filters.** Email address to which transactional email has been sent. (optional)templateId- **Mandatory if email and messageId are not passed in query filters.** Id of the template that was used to compose transactional email. (optional)messageId- **Mandatory if templateId and email are not passed in query filters.** Message ID of the transactional email sent. (optional)startDate- **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- **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- Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc)limit- Number of documents returned per page (optional, default to 500)offset- Index of the first document in the page (optional, default to 0)- Returns:
- GetTransacEmailsList
- Throws:
ApiException- if fails to make API call
-
getTransacEmailsList
public GetTransacEmailsList getTransacEmailsList(@Nullable String email, @Nullable Long templateId, @Nullable String messageId, @Nullable String startDate, @Nullable String endDate, @Nullable String sort, @Nullable Long limit, @Nullable Long offset, Map<String, String> additionalHeaders) throws ApiExceptionGet 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.- Parameters:
email- **Mandatory if templateId and messageId are not passed in query filters.** Email address to which transactional email has been sent. (optional)templateId- **Mandatory if email and messageId are not passed in query filters.** Id of the template that was used to compose transactional email. (optional)messageId- **Mandatory if templateId and email are not passed in query filters.** Message ID of the transactional email sent. (optional)startDate- **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- **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- Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional, default to desc)limit- Number of documents returned per page (optional, default to 500)offset- Index of the first document in the page (optional, default to 0)additionalHeaders- additionalHeaders for this call- Returns:
- GetTransacEmailsList
- Throws:
ApiException- if fails to make API call
-
sendTestTemplate
public void sendTestTemplate(@Nonnull Long templateId, @Nonnull SendTestEmail sendTestEmail) throws ApiException Send a template to your test list- Parameters:
templateId- Id of the template (required)sendTestEmail- (required)- Throws:
ApiException- if fails to make API call
-
sendTestTemplate
public void sendTestTemplate(@Nonnull Long templateId, @Nonnull SendTestEmail sendTestEmail, Map<String, String> additionalHeaders) throws ApiExceptionSend a template to your test list- Parameters:
templateId- Id of the template (required)sendTestEmail- (required)additionalHeaders- additionalHeaders for this call- Throws:
ApiException- if fails to make API call
-
sendTransacEmail
Send a transactional email- Parameters:
sendSmtpEmail- Values to send a transactional email (required)- Returns:
- CreateSmtpEmail
- Throws:
ApiException- if fails to make API call
-
sendTransacEmail
public CreateSmtpEmail sendTransacEmail(@Nonnull SendSmtpEmail sendSmtpEmail, Map<String, String> additionalHeaders) throws ApiExceptionSend a transactional email- Parameters:
sendSmtpEmail- Values to send a transactional email (required)additionalHeaders- additionalHeaders for this call- Returns:
- CreateSmtpEmail
- Throws:
ApiException- if fails to make API call
-
smtpBlockedContactsEmailDelete
Unblock or resubscribe a transactional contact- Parameters:
email- contact email (urlencoded) to unblock. (required)- Throws:
ApiException- if fails to make API call
-
smtpBlockedContactsEmailDelete
public void smtpBlockedContactsEmailDelete(@Nonnull String email, Map<String, String> additionalHeaders) throws ApiExceptionUnblock or resubscribe a transactional contact- Parameters:
email- contact email (urlencoded) to unblock. (required)additionalHeaders- additionalHeaders for this call- Throws:
ApiException- if fails to make API call
-
smtpLogIdentifierDelete
Delete an SMTP transactional log- Parameters:
identifier- MessageId of the transactional log(s) to delete (required)- Throws:
ApiException- if fails to make API call
-
smtpLogIdentifierDelete
public void smtpLogIdentifierDelete(@Nonnull String identifier, Map<String, String> additionalHeaders) throws ApiExceptionDelete an SMTP transactional log- Parameters:
identifier- MessageId of the transactional log(s) to delete (required)additionalHeaders- additionalHeaders for this call- Throws:
ApiException- if fails to make API call
-
templatePreview
public TemplatePreviewModel templatePreview(@Nullable TemplatePreviewRequestBody templatePreviewRequestBody) throws ApiException Generate the rendered preview of transactional template- Parameters:
templatePreviewRequestBody- Values to fetch Template preview (required)- Returns:
- TemplatePreviewModel
- Throws:
ApiException- if fails to make API call
-
templatePreview
public TemplatePreviewModel templatePreview(@Nullable TemplatePreviewRequestBody templatePreviewRequestBody, Map<String, String> additionalHeaders) throws ApiExceptionGenerate the rendered preview of transactional template- Parameters:
templatePreviewRequestBody- Values to fetch Template preview (required)additionalHeaders- additionalHeaders for this call- Returns:
- TemplatePreviewModel
- Throws:
ApiException- if fails to make API call
-
updateSmtpTemplate
public void updateSmtpTemplate(@Nonnull Long templateId, @Nonnull UpdateSmtpTemplate updateSmtpTemplate) throws ApiException Update an email template- Parameters:
templateId- id of the template (required)updateSmtpTemplate- values to update in transactional email template (required)- Throws:
ApiException- if fails to make API call
-
updateSmtpTemplate
public void updateSmtpTemplate(@Nonnull Long templateId, @Nonnull UpdateSmtpTemplate updateSmtpTemplate, Map<String, String> additionalHeaders) throws ApiExceptionUpdate an email template- Parameters:
templateId- id of the template (required)updateSmtpTemplate- values to update in transactional email template (required)additionalHeaders- additionalHeaders for this call- Throws:
ApiException- if fails to make API call
-
invokeAPI
public <T> T invokeAPI(String url, String method, Object request, com.fasterxml.jackson.core.type.TypeReference<T> returnType, Map<String, String> additionalHeaders) throws ApiExceptionDescription copied from class:BaseApiDirectly invoke the API for the given URL. Useful if the API returns direct links/URLs for subsequent requests.- Specified by:
invokeAPIin classBaseApi- Parameters:
url- The URL for the request, either full URL or only the path.method- The HTTP method for the request.request- The request object.returnType- The return type.additionalHeaders- Additional headers for the request.- Returns:
- The API response in the specified type.
- Throws:
ApiException- if fails to make API call.
-