use ElasticEmail::Object::CampaignsApi;
All URIs are relative to https://api.elasticemail.com/v4
Method | HTTP request | Description |
---|---|---|
campaigns_by_name_delete | DELETE /campaigns/{name} | Delete Campaign |
campaigns_by_name_get | GET /campaigns/{name} | Load Campaign |
campaigns_by_name_pause_put | PUT /campaigns/{name}/pause | Pause Campaign |
campaigns_by_name_put | PUT /campaigns/{name} | Update Campaign |
campaigns_get | GET /campaigns | Load Campaigns |
campaigns_post | POST /campaigns | Add Campaign |
campaigns_by_name_delete(name => $name)
Delete Campaign
Delete the specific campaign. This does not cancel in progress email, see Cancel In Progress. Required Access Level: ModifyCampaigns
use Data::Dumper;
use ElasticEmail::CampaignsApi;
my $api_instance = ElasticEmail::CampaignsApi->new(
# Configure API key authorization: apikey
api_key => {'X-ElasticEmail-ApiKey' => 'YOUR_API_KEY'},
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#api_key_prefix => {'X-ElasticEmail-ApiKey' => 'Bearer'},
);
my $name = "name_example"; # string | Name of Campaign to delete
eval {
$api_instance->campaigns_by_name_delete(name => $name);
};
if ($@) {
warn "Exception when calling CampaignsApi->campaigns_by_name_delete: $@\n";
}
Name | Type | Description | Notes |
---|---|---|---|
name | string | Name of Campaign to delete |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Campaign campaigns_by_name_get(name => $name)
Load Campaign
Returns the specified campaign details. Required Access Level: ViewCampaigns
use Data::Dumper;
use ElasticEmail::CampaignsApi;
my $api_instance = ElasticEmail::CampaignsApi->new(
# Configure API key authorization: apikey
api_key => {'X-ElasticEmail-ApiKey' => 'YOUR_API_KEY'},
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#api_key_prefix => {'X-ElasticEmail-ApiKey' => 'Bearer'},
);
my $name = "name_example"; # string | Name of Campaign to get
eval {
my $result = $api_instance->campaigns_by_name_get(name => $name);
print Dumper($result);
};
if ($@) {
warn "Exception when calling CampaignsApi->campaigns_by_name_get: $@\n";
}
Name | Type | Description | Notes |
---|---|---|---|
name | string | Name of Campaign to get |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
campaigns_by_name_pause_put(name => $name)
Pause Campaign
Pauses the specific campaign, cancelling emails that are waiting to be sent. Required Access Level: ModifyCampaigns
use Data::Dumper;
use ElasticEmail::CampaignsApi;
my $api_instance = ElasticEmail::CampaignsApi->new(
# Configure API key authorization: apikey
api_key => {'X-ElasticEmail-ApiKey' => 'YOUR_API_KEY'},
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#api_key_prefix => {'X-ElasticEmail-ApiKey' => 'Bearer'},
);
my $name = "name_example"; # string | Name of Campaign to pause
eval {
$api_instance->campaigns_by_name_pause_put(name => $name);
};
if ($@) {
warn "Exception when calling CampaignsApi->campaigns_by_name_pause_put: $@\n";
}
Name | Type | Description | Notes |
---|---|---|---|
name | string | Name of Campaign to pause |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Campaign campaigns_by_name_put(name => $name, campaign => $campaign)
Update Campaign
Updates a previously added campaign. Only Active and Paused campaigns can be updated. Required Access Level: ModifyCampaigns
use Data::Dumper;
use ElasticEmail::CampaignsApi;
my $api_instance = ElasticEmail::CampaignsApi->new(
# Configure API key authorization: apikey
api_key => {'X-ElasticEmail-ApiKey' => 'YOUR_API_KEY'},
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#api_key_prefix => {'X-ElasticEmail-ApiKey' => 'Bearer'},
);
my $name = "name_example"; # string | Name of Campaign to update
my $campaign = ElasticEmail::Object::Campaign->new(); # Campaign | JSON representation of a campaign
eval {
my $result = $api_instance->campaigns_by_name_put(name => $name, campaign => $campaign);
print Dumper($result);
};
if ($@) {
warn "Exception when calling CampaignsApi->campaigns_by_name_put: $@\n";
}
Name | Type | Description | Notes |
---|---|---|---|
name | string | Name of Campaign to update | |
campaign | Campaign | JSON representation of a campaign |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ARRAY[Campaign] campaigns_get(search => $search, offset => $offset, limit => $limit)
Load Campaigns
Returns a list all of your campaigns. Limited to 1000 results. Required Access Level: ViewCampaigns
use Data::Dumper;
use ElasticEmail::CampaignsApi;
my $api_instance = ElasticEmail::CampaignsApi->new(
# Configure API key authorization: apikey
api_key => {'X-ElasticEmail-ApiKey' => 'YOUR_API_KEY'},
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#api_key_prefix => {'X-ElasticEmail-ApiKey' => 'Bearer'},
);
my $search = "search_example"; # string | Text fragment used for searching in Campaign name (using the 'contains' rule)
my $offset = 20; # int | How many items should be returned ahead.
my $limit = 100; # int | Maximum number of returned items.
eval {
my $result = $api_instance->campaigns_get(search => $search, offset => $offset, limit => $limit);
print Dumper($result);
};
if ($@) {
warn "Exception when calling CampaignsApi->campaigns_get: $@\n";
}
Name | Type | Description | Notes |
---|---|---|---|
search | string | Text fragment used for searching in Campaign name (using the 'contains' rule) | [optional] |
offset | int | How many items should be returned ahead. | [optional] |
limit | int | Maximum number of returned items. | [optional] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Campaign campaigns_post(campaign => $campaign)
Add Campaign
Add a campaign for processing. Required Access Level: ModifyCampaigns
use Data::Dumper;
use ElasticEmail::CampaignsApi;
my $api_instance = ElasticEmail::CampaignsApi->new(
# Configure API key authorization: apikey
api_key => {'X-ElasticEmail-ApiKey' => 'YOUR_API_KEY'},
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#api_key_prefix => {'X-ElasticEmail-ApiKey' => 'Bearer'},
);
my $campaign = ElasticEmail::Object::Campaign->new(); # Campaign | JSON representation of a campaign
eval {
my $result = $api_instance->campaigns_post(campaign => $campaign);
print Dumper($result);
};
if ($@) {
warn "Exception when calling CampaignsApi->campaigns_post: $@\n";
}
Name | Type | Description | Notes |
---|---|---|---|
campaign | Campaign | JSON representation of a campaign |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]