Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Elasticemail Php Laravel Package

elasticemail/elasticemail-php

PHP client for Elastic Email’s REST API. Authenticate with your API key and manage campaigns and other resources via GET/POST/PUT/DELETE. Supports PHP 7.4+ (incl. 8.0) and uses Guzzle with configurable timeouts and connection limits.

View on GitHub
Deep Wiki
Context7

ElasticEmail\SubAccountsApi

All URIs are relative to https://api.elasticemail.com/v4, except if the operation defines another base path.

Method HTTP request Description
subaccountsByEmailCreditsPatch() PATCH /subaccounts/{email}/credits Add, Subtract Email Credits
subaccountsByEmailDelete() DELETE /subaccounts/{email} Delete SubAccount
subaccountsByEmailGet() GET /subaccounts/{email} Load SubAccount
subaccountsByEmailSettingsEmailPut() PUT /subaccounts/{email}/settings/email Update SubAccount Email Settings
subaccountsGet() GET /subaccounts Load SubAccounts
subaccountsPost() POST /subaccounts Add SubAccount

subaccountsByEmailCreditsPatch()

subaccountsByEmailCreditsPatch($email, $subaccount_email_credits_payload)

Add, Subtract Email Credits

Update email credits of a subaccount by the given amount. Required Access Level: ModifySubAccounts

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: apikey
$config = ElasticEmail\Configuration::getDefaultConfiguration()->setApiKey('X-ElasticEmail-ApiKey', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ElasticEmail\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-ElasticEmail-ApiKey', 'Bearer');


$apiInstance = new ElasticEmail\Api\SubAccountsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$email = mail@example.com; // string | Email address of Sub-Account
$subaccount_email_credits_payload = new \ElasticEmail\Model\SubaccountEmailCreditsPayload(); // \ElasticEmail\Model\SubaccountEmailCreditsPayload | Amount of email credits to add or subtract from the current SubAccount email credits pool (positive or negative value)

try {
    $apiInstance->subaccountsByEmailCreditsPatch($email, $subaccount_email_credits_payload);
} catch (Exception $e) {
    echo 'Exception when calling SubAccountsApi->subaccountsByEmailCreditsPatch: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
email string Email address of Sub-Account
subaccount_email_credits_payload \ElasticEmail\Model\SubaccountEmailCreditsPayload Amount of email credits to add or subtract from the current SubAccount email credits pool (positive or negative value)

Return type

void (empty response body)

Authorization

apikey

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

subaccountsByEmailDelete()

subaccountsByEmailDelete($email)

Delete SubAccount

Deletes specified SubAccount. An email will be sent to confirm this change. Required Access Level: ModifySubAccounts

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: apikey
$config = ElasticEmail\Configuration::getDefaultConfiguration()->setApiKey('X-ElasticEmail-ApiKey', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ElasticEmail\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-ElasticEmail-ApiKey', 'Bearer');


$apiInstance = new ElasticEmail\Api\SubAccountsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$email = mail@example.com; // string | Email address of Sub-Account

try {
    $apiInstance->subaccountsByEmailDelete($email);
} catch (Exception $e) {
    echo 'Exception when calling SubAccountsApi->subaccountsByEmailDelete: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
email string Email address of Sub-Account

Return type

void (empty response body)

Authorization

apikey

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

subaccountsByEmailGet()

subaccountsByEmailGet($email): \ElasticEmail\Model\SubAccountInfo

Load SubAccount

Returns details for the specified SubAccount. Required Access Level: ViewSubAccounts

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: apikey
$config = ElasticEmail\Configuration::getDefaultConfiguration()->setApiKey('X-ElasticEmail-ApiKey', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ElasticEmail\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-ElasticEmail-ApiKey', 'Bearer');


$apiInstance = new ElasticEmail\Api\SubAccountsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$email = mail@example.com; // string | Email address of Sub-Account

try {
    $result = $apiInstance->subaccountsByEmailGet($email);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SubAccountsApi->subaccountsByEmailGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
email string Email address of Sub-Account

Return type

\ElasticEmail\Model\SubAccountInfo

Authorization

apikey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

subaccountsByEmailSettingsEmailPut()

subaccountsByEmailSettingsEmailPut($email, $subaccount_email_settings): \ElasticEmail\Model\SubaccountEmailSettings

Update SubAccount Email Settings

Update SubAccount email settings. Required Access Level: ModifySubAccounts

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: apikey
$config = ElasticEmail\Configuration::getDefaultConfiguration()->setApiKey('X-ElasticEmail-ApiKey', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ElasticEmail\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-ElasticEmail-ApiKey', 'Bearer');


$apiInstance = new ElasticEmail\Api\SubAccountsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$email = 'email_example'; // string
$subaccount_email_settings = new \ElasticEmail\Model\SubaccountEmailSettings(); // \ElasticEmail\Model\SubaccountEmailSettings | Updated Email Settings

try {
    $result = $apiInstance->subaccountsByEmailSettingsEmailPut($email, $subaccount_email_settings);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SubAccountsApi->subaccountsByEmailSettingsEmailPut: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
email string
subaccount_email_settings \ElasticEmail\Model\SubaccountEmailSettings Updated Email Settings

Return type

\ElasticEmail\Model\SubaccountEmailSettings

Authorization

apikey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

subaccountsGet()

subaccountsGet($limit, $offset): \ElasticEmail\Model\SubAccountInfo[]

Load SubAccounts

Returns a list of all your SubAccounts. Required Access Level: ViewSubAccounts

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: apikey
$config = ElasticEmail\Configuration::getDefaultConfiguration()->setApiKey('X-ElasticEmail-ApiKey', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ElasticEmail\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-ElasticEmail-ApiKey', 'Bearer');


$apiInstance = new ElasticEmail\Api\SubAccountsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$limit = 100; // int | Maximum number of returned items.
$offset = 20; // int | How many items should be returned ahead.

try {
    $result = $apiInstance->subaccountsGet($limit, $offset);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SubAccountsApi->subaccountsGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
limit int Maximum number of returned items. [optional]
offset int How many items should be returned ahead. [optional]

Return type

\ElasticEmail\Model\SubAccountInfo[]

Authorization

apikey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

subaccountsPost()

subaccountsPost($subaccount_payload): \ElasticEmail\Model\SubAccountInfo

Add SubAccount

Add a new SubAccount to your Account. To receive an access token for this SubAccount, make a POST security/apikeys request using the 'subaccount' parameter. Required Access Level: ModifySubAccounts

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: apikey
$config = ElasticEmail\Configuration::getDefaultConfiguration()->setApiKey('X-ElasticEmail-ApiKey', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ElasticEmail\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-ElasticEmail-ApiKey', 'Bearer');


$apiInstance = new ElasticEmail\Api\SubAccountsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$subaccount_payload = new \ElasticEmail\Model\SubaccountPayload(); // \ElasticEmail\Model\SubaccountPayload

try {
    $result = $apiInstance->subaccountsPost($subaccount_payload);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SubAccountsApi->subaccountsPost: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
subaccount_payload \ElasticEmail\Model\SubaccountPayload

Return type

\ElasticEmail\Model\SubAccountInfo

Authorization

apikey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky