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
This Python package is automatically generated by the OpenAPI Generator project:
- API version: 4.0.0
- Package version: 4.1.3
- Generator version: 7.5.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
Python 3.7+
If the python package is hosted on a repository, you can install directly using:
pip install git+https://github.com/elasticemail/elasticemail-python.git
(you may need to run pip
with root permission: sudo pip install git+https://github.com/elasticemail/elasticemail-python.git
)
Then import the package:
import ElasticEmail
Install via Setuptools.
python setup.py install --user
(or sudo python setup.py install
to install the package for all users)
Then import the package:
import ElasticEmail
Execute pytest
to run the tests.
Please follow the installation procedure and then run the following:
import ElasticEmail
from ElasticEmail.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.elasticemail.com/v4
# See configuration.py for a list of all supported configuration parameters.
configuration = ElasticEmail.Configuration(
host = "https://api.elasticemail.com/v4"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: apikey
configuration.api_key['apikey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['apikey'] = 'Bearer'
# Enter a context with an instance of the API client
with ElasticEmail.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ElasticEmail.CampaignsApi(api_client)
name = 'name_example' # str | Name of Campaign to delete
try:
# Delete Campaign
api_instance.campaigns_by_name_delete(name)
except ApiException as e:
print("Exception when calling CampaignsApi->campaigns_by_name_delete: %s\n" % e)
All URIs are relative to https://api.elasticemail.com/v4
Class | Method | HTTP request | Description |
---|---|---|---|
CampaignsApi | campaigns_by_name_delete | DELETE /campaigns/{name} | Delete Campaign |
CampaignsApi | campaigns_by_name_get | GET /campaigns/{name} | Load Campaign |
CampaignsApi | campaigns_by_name_pause_put | PUT /campaigns/{name}/pause | Pause Campaign |
CampaignsApi | campaigns_by_name_put | PUT /campaigns/{name} | Update Campaign |
CampaignsApi | campaigns_get | GET /campaigns | Load Campaigns |
CampaignsApi | campaigns_post | POST /campaigns | Add Campaign |
ContactsApi | contacts_by_email_delete | DELETE /contacts/{email} | Delete Contact |
ContactsApi | contacts_by_email_get | GET /contacts/{email} | Load Contact |
ContactsApi | contacts_by_email_put | PUT /contacts/{email} | Update Contact |
ContactsApi | contacts_delete_post | POST /contacts/delete | Delete Contacts Bulk |
ContactsApi | contacts_export_by_id_status_get | GET /contacts/export/{id}/status | Check Export Status |
ContactsApi | contacts_export_post | POST /contacts/export | Export Contacts |
ContactsApi | contacts_get | GET /contacts | Load Contacts |
ContactsApi | contacts_import_post | POST /contacts/import | Upload Contacts |
ContactsApi | contacts_post | POST /contacts | Add Contact |
DomainsApi | domains_by_domain_delete | DELETE /domains/{domain} | Delete Domain |
DomainsApi | domains_by_domain_get | GET /domains/{domain} | Load Domain |
DomainsApi | domains_by_domain_put | PUT /domains/{domain} | Update Domain |
DomainsApi | domains_by_domain_restricted_get | GET /domains/{domain}/restricted | Check for domain restriction |
DomainsApi | domains_by_domain_verification_put | PUT /domains/{domain}/verification | Verify Domain |
DomainsApi | domains_by_email_default_patch | PATCH /domains/{email}/default | Set Default |
DomainsApi | domains_get | GET /domains | Load Domains |
DomainsApi | domains_post | POST /domains | Add Domain |
EmailsApi | emails_by_msgid_view_get | GET /emails/{msgid}/view | View Email |
EmailsApi | emails_by_transactionid_status_get | GET /emails/{transactionid}/status | Get Status |
EmailsApi | emails_mergefile_post | POST /emails/mergefile | Send Bulk Emails CSV |
EmailsApi | emails_post | POST /emails | Send Bulk Emails |
EmailsApi | emails_transactional_post | POST /emails/transactional | Send Transactional Email |
EventsApi | events_by_transactionid_get | GET /events/{transactionid} | Load Email Events |
EventsApi | events_channels_by_name_export_post | POST /events/channels/{name}/export | Export Channel Events |
EventsApi | events_channels_by_name_get | GET /events/channels/{name} | Load Channel Events |
EventsApi | events_channels_export_by_id_status_get | GET /events/channels/export/{id}/status | Check Channel Export Status |
EventsApi | events_export_by_id_status_get | GET /events/export/{id}/status | Check Export Status |
EventsApi | events_export_post | POST /events/export | Export Events |
EventsApi | events_get | GET /events | Load Events |
FilesApi | files_by_name_delete | DELETE /files/{name} | Delete File |
FilesApi | files_by_name_get | GET /files/{name} | Download File |
FilesApi | files_by_name_info_get | GET /files/{name}/info | Load File Details |
FilesApi | files_get | GET /files | List Files |
FilesApi | files_post | POST /files | Upload File |
InboundRouteApi | inboundroute_by_id_delete | DELETE /inboundroute/{id} | Delete Route |
InboundRouteApi | inboundroute_by_id_get | GET /inboundroute/{id} | Get Route |
InboundRouteApi | inboundroute_by_id_put | PUT /inboundroute/{id} | Update Route |
InboundRouteApi | inboundroute_get | GET /inboundroute | Get Routes |
InboundRouteApi | inboundroute_order_put | PUT /inboundroute/order | Update Sorting |
InboundRouteApi | inboundroute_post | POST /inboundroute | Create Route |
ListsApi | lists_by_listname_contacts_get | GET /lists/{listname}/contacts | Load Contacts in List |
ListsApi | lists_by_name_contacts_post | POST /lists/{name}/contacts | Add Contacts to List |
ListsApi | lists_by_name_contacts_remove_post | POST /lists/{name}/contacts/remove | Remove Contacts from List |
ListsApi | lists_by_name_delete | DELETE /lists/{name} | Delete List |
ListsApi | lists_by_name_get | GET /lists/{name} | Load List |
ListsApi | lists_by_name_put | PUT /lists/{name} | Update List |
ListsApi | lists_get | GET /lists | Load Lists |
ListsApi | lists_post | POST /lists | Add List |
SecurityApi | security_apikeys_by_name_delete | DELETE /security/apikeys/{name} | Delete ApiKey |
SecurityApi | security_apikeys_by_name_get | GET /security/apikeys/{name} | Load ApiKey |
SecurityApi | security_apikeys_by_name_put | PUT /security/apikeys/{name} | Update ApiKey |
SecurityApi | security_apikeys_get | GET /security/apikeys | List ApiKeys |
SecurityApi | security_apikeys_post | POST /security/apikeys | Add ApiKey |
SecurityApi | security_smtp_by_name_delete | DELETE /security/smtp/{name} | Delete SMTP Credential |
SecurityApi | security_smtp_by_name_get | GET /security/smtp/{name} | Load SMTP Credential |
SecurityApi | security_smtp_by_name_put | PUT /security/smtp/{name} | Update SMTP Credential |
SecurityApi | security_smtp_get | GET /security/smtp | List SMTP Credentials |
SecurityApi | security_smtp_post | POST /security/smtp | Add SMTP Credential |
SegmentsApi | segments_by_name_delete | DELETE /segments/{name} | Delete Segment |
SegmentsApi | segments_by_name_get | GET /segments/{name} | Load Segment |
SegmentsApi | segments_by_name_put | PUT /segments/{name} | Update Segment |
SegmentsApi | segments_get | GET /segments | Load Segments |
SegmentsApi | segments_post | POST /segments | Add Segment |
StatisticsApi | statistics_campaigns_by_name_get | GET /statistics/campaigns/{name} | Load Campaign Stats |
StatisticsApi | statistics_campaigns_get | GET /statistics/campaigns | Load Campaigns Stats |
StatisticsApi | statistics_channels_by_name_get | GET /statistics/channels/{name} | Load Channel Stats |
StatisticsApi | statistics_channels_get | GET /statistics/channels | Load Channels Stats |
StatisticsApi | statistics_get | GET /statistics | Load Statistics |
SubAccountsApi | subaccounts_by_email_credits_patch | PATCH /subaccounts/{email}/credits | Add, Subtract Email Credits |
SubAccountsApi | subaccounts_by_email_delete | DELETE /subaccounts/{email} | Delete SubAccount |
SubAccountsApi | subaccounts_by_email_get | GET /subaccounts/{email} | Load SubAccount |
SubAccountsApi | subaccounts_by_email_settings_email_put | PUT /subaccounts/{email}/settings/email | Update SubAccount Email Settings |
SubAccountsApi | subaccounts_get | GET /subaccounts | Load SubAccounts |
SubAccountsApi | subaccounts_post | POST /subaccounts | Add SubAccount |
SuppressionsApi | suppressions_bounces_get | GET /suppressions/bounces | Get Bounce List |
SuppressionsApi | suppressions_bounces_import_post | POST /suppressions/bounces/import | Add Bounces Async |
SuppressionsApi | suppressions_bounces_post | POST /suppressions/bounces | Add Bounces |
SuppressionsApi | suppressions_by_email_delete | DELETE /suppressions/{email} | Delete Suppression |
SuppressionsApi | suppressions_by_email_get | GET /suppressions/{email} | Get Suppression |
SuppressionsApi | suppressions_complaints_get | GET /suppressions/complaints | Get Complaints List |
SuppressionsApi | suppressions_complaints_import_post | POST /suppressions/complaints/import | Add Complaints Async |
SuppressionsApi | suppressions_complaints_post | POST /suppressions/complaints | Add Complaints |
SuppressionsApi | suppressions_get | GET /suppressions | Get Suppressions |
SuppressionsApi | suppressions_unsubscribes_get | GET /suppressions/unsubscribes | Get Unsubscribes List |
SuppressionsApi | suppressions_unsubscribes_import_post | POST /suppressions/unsubscribes/import | Add Unsubscribes Async |
SuppressionsApi | suppressions_unsubscribes_post | POST /suppressions/unsubscribes | Add Unsubscribes |
TemplatesApi | templates_by_name_delete | DELETE /templates/{name} | Delete Template |
TemplatesApi | templates_by_name_get | GET /templates/{name} | Load Template |
TemplatesApi | templates_by_name_put | PUT /templates/{name} | Update Template |
TemplatesApi | templates_get | GET /templates | Load Templates |
TemplatesApi | templates_post | POST /templates | Add Template |
VerificationsApi | verifications_by_email_delete | DELETE /verifications/{email} | Delete Email Verification Result |
VerificationsApi | verifications_by_email_get | GET /verifications/{email} | Get Email Verification Result |
VerificationsApi | verifications_by_email_post | POST /verifications/{email} | Verify Email |
VerificationsApi | verifications_files_by_id_delete | DELETE /verifications/files/{id} | Delete File Verification Result |
VerificationsApi | verifications_files_by_id_result_download_get | GET /verifications/files/{id}/result/download | Download File Verification Result |
VerificationsApi | verifications_files_by_id_result_get | GET /verifications/files/{id}/result | Get Detailed File Verification Result |
VerificationsApi | verifications_files_by_id_verification_post | POST /verifications/files/{id}/verification | Start verification |
VerificationsApi | verifications_files_post | POST /verifications/files | Upload File with Emails |
VerificationsApi | verifications_files_result_get | GET /verifications/files/result | Get Files Verification Results |
VerificationsApi | verifications_get | GET /verifications | Get Emails Verification Results |
- AccessLevel
- AccountStatusEnum
- ApiKey
- ApiKeyPayload
- BodyContentType
- BodyPart
- Campaign
- CampaignOptions
- CampaignRecipient
- CampaignStatus
- CampaignTemplate
- CertificateValidationStatus
- ChannelLogStatusSummary
- CompressionFormat
- ConsentData
- ConsentTracking
- Contact
- ContactActivity
- ContactPayload
- ContactSource
- ContactStatus
- ContactUpdatePayload
- ContactsList
- DeliveryOptimizationType
- DomainData
- DomainDetail
- DomainOwner
- DomainPayload
- DomainUpdatePayload
- 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
- MessageCategoryEnum
- NewApiKey
- NewSmtpCredentials
- Options
- RecipientEvent
- Segment
- SegmentPayload
- SmtpCredentials
- SmtpCredentialsPayload
- SortOrderItem
- SplitOptimizationType
- SplitOptions
- SubAccountInfo
- SubaccountEmailCreditsPayload
- SubaccountEmailSettings
- SubaccountEmailSettingsPayload
- SubaccountPayload
- SubaccountSettingsInfo
- SubaccountSettingsInfoPayload
- Suppression
- Template
- TemplatePayload
- TemplateScope
- TemplateType
- TrackingType
- TrackingValidationStatus
- TransactionalRecipient
- Utm
- VerificationFileResult
- VerificationFileResultDetails
- VerificationStatus
Authentication schemes defined for the API:
- Type: API key
- API key parameter name: X-ElasticEmail-ApiKey
- Location: HTTP header