Elastic Email REST API
Project description
ElasticEmail
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.0.19
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
Requirements.
Python >=3.6
Installation & Usage
pip install
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
Setuptools
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
Getting Started
Please follow the installation procedure and then run the following:
import time
import ElasticEmail
from pprint import pprint
from ElasticEmail.api import campaigns_api
from ElasticEmail.model.campaign import Campaign
# 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'] = 'YOUR_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 = campaigns_api.CampaignsApi(api_client)
name = "name_example" # str | Name of Campaign to delete
try:
# Delete Campaign
api_instance.campaigns_by_name_delete(name)
except ElasticEmail.ApiException as e:
print("Exception when calling CampaignsApi->campaigns_by_name_delete: %s\n" % e)
Documentation for API Endpoints
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_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_history_get | GET /contacts/{email}/history | Load History |
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 |
EmailsApi | emails_by_msgid_view_get | GET /emails/{msgid}/view | View Email |
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_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 |
Documentation For Models
- AccessLevel
- AccountStatusEnum
- ApiKey
- ApiKeyPayload
- BodyContentType
- BodyPart
- Campaign
- CampaignOptions
- CampaignRecipient
- CampaignStatus
- CampaignTemplate
- ChannelLogStatusSummary
- CompressionFormat
- ConsentData
- ConsentTracking
- Contact
- ContactActivity
- ContactHistEventType
- ContactHistory
- ContactPayload
- ContactSource
- ContactStatus
- ContactUpdatePayload
- ContactsList
- DeliveryOptimizationType
- EmailContent
- EmailData
- EmailMessageData
- 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
Documentation For Authorization
apikey
- Type: API key
- API key parameter name: X-ElasticEmail-ApiKey
- Location: HTTP header
Author
Notes for Large OpenAPI documents
If the OpenAPI document is large, imports in ElasticEmail.apis and ElasticEmail.models may fail with a RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions:
Solution 1: Use specific imports for apis and models like:
from ElasticEmail.api.default_api import DefaultApi
from ElasticEmail.model.pet import Pet
Solution 2: Before importing the package, adjust the maximum recursion limit as shown below:
import sys
sys.setrecursionlimit(1500)
import ElasticEmail
from ElasticEmail.apis import *
from ElasticEmail.models import *
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for ElasticEmail-4.0.19-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d73e99ce8988db0d081ac81d6e191d81513bb67e1246beb82e322ea3f1fdf773 |
|
MD5 | e1a5dd7a6345141304bd11024f5b557b |
|
BLAKE2b-256 | 9e5d93254c15aa131128ab240c461a39ec2156ccfbf7e3a8b4e086bda2cf91ca |