Elastic Email REST API
- API version: 4.0.0
- Build date: 2024-07-08T09:36:05.709243Z[Etc/UTC]
- Generator version: 7.7.0
This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach.
Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used.
The API has a limit of 20 concurrent connections and a hard timeout of 600 seconds per request.
To start using this API, you will need your Access Token (available here). Remember to keep it safe. Required access levels are listed in the given request’s description.
Downloadable library clients can be found in our Github repository here
Automatically generated by the OpenAPI Generator
Building the API client library requires:
- Java 1.8+
- Maven (3.8.3+)/Gradle (7.2+)
To install the API client library to your local Maven repository, simply execute:
mvn clean install
To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
mvn clean deploy
Refer to the OSSRH Guide for more information.
Add this dependency to your project's POM:
<dependency>
<groupId>com.elasticemail</groupId>
<artifactId>elasticemail</artifactId>
<version>4.1.0</version>
<scope>compile</scope>
</dependency>
Add this dependency to your project's build file:
repositories {
mavenCentral() // Needed if the 'elasticemail' jar has been published to maven central.
mavenLocal() // Needed if the 'elasticemail' jar has been published to the local maven repo.
}
dependencies {
implementation "com.elasticemail:elasticemail:4.1.0"
}
At first generate the JAR by executing:
mvn clean package
Then manually install the following JARs:
target/elasticemail-4.1.0.jar
target/lib/*.jar
Please follow the installation instruction and execute the following Java code:
// Import classes:
import com.elasticemail.client.ApiClient;
import com.elasticemail.client.ApiException;
import com.elasticemail.client.Configuration;
import com.elasticemail.client.auth.*;
import com.elasticemail.client.models.*;
import com.elasticemail.api.CampaignsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.elasticemail.com/v4");
// Configure API key authorization: apikey
ApiKeyAuth apikey = (ApiKeyAuth) defaultClient.getAuthentication("apikey");
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");
CampaignsApi apiInstance = new CampaignsApi(defaultClient);
String name = "name_example"; // String | Name of Campaign to delete
try {
apiInstance.campaignsByNameDelete(name);
} catch (ApiException e) {
System.err.println("Exception when calling CampaignsApi#campaignsByNameDelete");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
All URIs are relative to https://api.elasticemail.com/v4
Class | Method | HTTP request | Description |
---|---|---|---|
CampaignsApi | campaignsByNameDelete | DELETE /campaigns/{name} | Delete Campaign |
CampaignsApi | campaignsByNameGet | GET /campaigns/{name} | Load Campaign |
CampaignsApi | campaignsByNamePut | PUT /campaigns/{name} | Update Campaign |
CampaignsApi | campaignsGet | GET /campaigns | Load Campaigns |
CampaignsApi | campaignsPost | POST /campaigns | Add Campaign |
ContactsApi | contactsByEmailDelete | DELETE /contacts/{email} | Delete Contact |
ContactsApi | contactsByEmailGet | GET /contacts/{email} | Load Contact |
ContactsApi | contactsByEmailPut | PUT /contacts/{email} | Update Contact |
ContactsApi | contactsDeletePost | POST /contacts/delete | Delete Contacts Bulk |
ContactsApi | contactsExportByIdStatusGet | GET /contacts/export/{id}/status | Check Export Status |
ContactsApi | contactsExportPost | POST /contacts/export | Export Contacts |
ContactsApi | contactsGet | GET /contacts | Load Contacts |
ContactsApi | contactsImportPost | POST /contacts/import | Upload Contacts |
ContactsApi | contactsPost | POST /contacts | Add Contact |
EmailsApi | emailsByMsgidViewGet | GET /emails/{msgid}/view | View Email |
EmailsApi | emailsByTransactionidStatusGet | GET /emails/{transactionid}/status | Get Status |
EmailsApi | emailsMergefilePost | POST /emails/mergefile | Send Bulk Emails CSV |
EmailsApi | emailsPost | POST /emails | Send Bulk Emails |
EmailsApi | emailsTransactionalPost | POST /emails/transactional | Send Transactional Email |
EventsApi | eventsByTransactionidGet | GET /events/{transactionid} | Load Email Events |
EventsApi | eventsChannelsByNameExportPost | POST /events/channels/{name}/export | Export Channel Events |
EventsApi | eventsChannelsByNameGet | GET /events/channels/{name} | Load Channel Events |
EventsApi | eventsChannelsExportByIdStatusGet | GET /events/channels/export/{id}/status | Check Channel Export Status |
EventsApi | eventsExportByIdStatusGet | GET /events/export/{id}/status | Check Export Status |
EventsApi | eventsExportPost | POST /events/export | Export Events |
EventsApi | eventsGet | GET /events | Load Events |
FilesApi | filesByNameDelete | DELETE /files/{name} | Delete File |
FilesApi | filesByNameGet | GET /files/{name} | Download File |
FilesApi | filesByNameInfoGet | GET /files/{name}/info | Load File Details |
FilesApi | filesGet | GET /files | List Files |
FilesApi | filesPost | POST /files | Upload File |
InboundRouteApi | inboundrouteByIdDelete | DELETE /inboundroute/{id} | Delete Route |
InboundRouteApi | inboundrouteByIdGet | GET /inboundroute/{id} | Get Route |
InboundRouteApi | inboundrouteByIdPut | PUT /inboundroute/{id} | Update Route |
InboundRouteApi | inboundrouteGet | GET /inboundroute | Get Routes |
InboundRouteApi | inboundrouteOrderPut | PUT /inboundroute/order | Update Sorting |
InboundRouteApi | inboundroutePost | POST /inboundroute | Create Route |
ListsApi | listsByListnameContactsGet | GET /lists/{listname}/contacts | Load Contacts in List |
ListsApi | listsByNameContactsPost | POST /lists/{name}/contacts | Add Contacts to List |
ListsApi | listsByNameContactsRemovePost | POST /lists/{name}/contacts/remove | Remove Contacts from List |
ListsApi | listsByNameDelete | DELETE /lists/{name} | Delete List |
ListsApi | listsByNameGet | GET /lists/{name} | Load List |
ListsApi | listsByNamePut | PUT /lists/{name} | Update List |
ListsApi | listsGet | GET /lists | Load Lists |
ListsApi | listsPost | POST /lists | Add List |
SecurityApi | securityApikeysByNameDelete | DELETE /security/apikeys/{name} | Delete ApiKey |
SecurityApi | securityApikeysByNameGet | GET /security/apikeys/{name} | Load ApiKey |
SecurityApi | securityApikeysByNamePut | PUT /security/apikeys/{name} | Update ApiKey |
SecurityApi | securityApikeysGet | GET /security/apikeys | List ApiKeys |
SecurityApi | securityApikeysPost | POST /security/apikeys | Add ApiKey |
SecurityApi | securitySmtpByNameDelete | DELETE /security/smtp/{name} | Delete SMTP Credential |
SecurityApi | securitySmtpByNameGet | GET /security/smtp/{name} | Load SMTP Credential |
SecurityApi | securitySmtpByNamePut | PUT /security/smtp/{name} | Update SMTP Credential |
SecurityApi | securitySmtpGet | GET /security/smtp | List SMTP Credentials |
SecurityApi | securitySmtpPost | POST /security/smtp | Add SMTP Credential |
SegmentsApi | segmentsByNameDelete | DELETE /segments/{name} | Delete Segment |
SegmentsApi | segmentsByNameGet | GET /segments/{name} | Load Segment |
SegmentsApi | segmentsByNamePut | PUT /segments/{name} | Update Segment |
SegmentsApi | segmentsGet | GET /segments | Load Segments |
SegmentsApi | segmentsPost | POST /segments | Add Segment |
StatisticsApi | statisticsCampaignsByNameGet | GET /statistics/campaigns/{name} | Load Campaign Stats |
StatisticsApi | statisticsCampaignsGet | GET /statistics/campaigns | Load Campaigns Stats |
StatisticsApi | statisticsChannelsByNameGet | GET /statistics/channels/{name} | Load Channel Stats |
StatisticsApi | statisticsChannelsGet | GET /statistics/channels | Load Channels Stats |
StatisticsApi | statisticsGet | GET /statistics | Load Statistics |
SubAccountsApi | subaccountsByEmailCreditsPatch | PATCH /subaccounts/{email}/credits | Add, Subtract Email Credits |
SubAccountsApi | subaccountsByEmailDelete | DELETE /subaccounts/{email} | Delete SubAccount |
SubAccountsApi | subaccountsByEmailGet | GET /subaccounts/{email} | Load SubAccount |
SubAccountsApi | subaccountsByEmailSettingsEmailPut | PUT /subaccounts/{email}/settings/email | Update SubAccount Email Settings |
SubAccountsApi | subaccountsGet | GET /subaccounts | Load SubAccounts |
SubAccountsApi | subaccountsPost | POST /subaccounts | Add SubAccount |
SuppressionsApi | suppressionsBouncesGet | GET /suppressions/bounces | Get Bounce List |
SuppressionsApi | suppressionsBouncesImportPost | POST /suppressions/bounces/import | Add Bounces Async |
SuppressionsApi | suppressionsBouncesPost | POST /suppressions/bounces | Add Bounces |
SuppressionsApi | suppressionsByEmailDelete | DELETE /suppressions/{email} | Delete Suppression |
SuppressionsApi | suppressionsByEmailGet | GET /suppressions/{email} | Get Suppression |
SuppressionsApi | suppressionsComplaintsGet | GET /suppressions/complaints | Get Complaints List |
SuppressionsApi | suppressionsComplaintsImportPost | POST /suppressions/complaints/import | Add Complaints Async |
SuppressionsApi | suppressionsComplaintsPost | POST /suppressions/complaints | Add Complaints |
SuppressionsApi | suppressionsGet | GET /suppressions | Get Suppressions |
SuppressionsApi | suppressionsUnsubscribesGet | GET /suppressions/unsubscribes | Get Unsubscribes List |
SuppressionsApi | suppressionsUnsubscribesImportPost | POST /suppressions/unsubscribes/import | Add Unsubscribes Async |
SuppressionsApi | suppressionsUnsubscribesPost | POST /suppressions/unsubscribes | Add Unsubscribes |
TemplatesApi | templatesByNameDelete | DELETE /templates/{name} | Delete Template |
TemplatesApi | templatesByNameGet | GET /templates/{name} | Load Template |
TemplatesApi | templatesByNamePut | PUT /templates/{name} | Update Template |
TemplatesApi | templatesGet | GET /templates | Load Templates |
TemplatesApi | templatesPost | POST /templates | Add Template |
VerificationsApi | verificationsByEmailDelete | DELETE /verifications/{email} | Delete Email Verification Result |
VerificationsApi | verificationsByEmailGet | GET /verifications/{email} | Get Email Verification Result |
VerificationsApi | verificationsByEmailPost | POST /verifications/{email} | Verify Email |
VerificationsApi | verificationsFilesByIdDelete | DELETE /verifications/files/{id} | Delete File Verification Result |
VerificationsApi | verificationsFilesByIdResultDownloadGet | GET /verifications/files/{id}/result/download | Download File Verification Result |
VerificationsApi | verificationsFilesByIdResultGet | GET /verifications/files/{id}/result | Get Detailed File Verification Result |
VerificationsApi | verificationsFilesByIdVerificationPost | POST /verifications/files/{id}/verification | Start verification |
VerificationsApi | verificationsFilesPost | POST /verifications/files | Upload File with Emails |
VerificationsApi | verificationsFilesResultGet | GET /verifications/files/result | Get Files Verification Results |
VerificationsApi | verificationsGet | GET /verifications | Get Emails Verification Results |
- AccessLevel
- AccountStatusEnum
- ApiKey
- ApiKeyPayload
- BodyContentType
- BodyPart
- Campaign
- CampaignOptions
- CampaignRecipient
- CampaignStatus
- CampaignTemplate
- ChannelLogStatusSummary
- CompressionFormat
- ConsentData
- ConsentTracking
- Contact
- ContactActivity
- ContactPayload
- ContactSource
- ContactStatus
- ContactUpdatePayload
- ContactsList
- DeliveryOptimizationType
- EmailContent
- EmailData
- EmailJobFailedStatus
- EmailJobStatus
- EmailMessageData
- EmailPredictedValidationStatus
- EmailRecipient
- EmailSend
- EmailStatus
- EmailTransactionalMessageData
- EmailValidationResult
- EmailValidationStatus
- EmailView
- EmailsPayload
- EncodingType
- EventType
- EventsOrderBy
- ExportFileFormats
- ExportLink
- ExportStatus
- FileInfo
- FilePayload
- FileUploadResult
- InboundPayload
- InboundRoute
- InboundRouteActionType
- InboundRouteFilterType
- ListPayload
- ListUpdatePayload
- LogJobStatus
- LogStatusSummary
- MergeEmailPayload
- MessageAttachment
- MessageCategory
- NewApiKey
- NewSmtpCredentials
- Options
- RecipientEvent
- Segment
- SegmentPayload
- SmtpCredentials
- SmtpCredentialsPayload
- SortOrderItem
- SplitOptimizationType
- SplitOptions
- SubAccountInfo
- SubaccountEmailCreditsPayload
- SubaccountEmailSettings
- SubaccountEmailSettingsPayload
- SubaccountPayload
- SubaccountSettingsInfo
- SubaccountSettingsInfoPayload
- Suppression
- Template
- TemplatePayload
- TemplateScope
- TemplateType
- TransactionalRecipient
- Utm
- VerificationFileResult
- VerificationFileResultDetails
- VerificationStatus
Authentication schemes defined for the API:
- Type: API key
- API key parameter name: X-ElasticEmail-ApiKey
- Location: HTTP header
It's recommended to create an instance of ApiClient
per thread in a multithreaded environment to avoid any potential issues.