Skip to content

Latest commit

 

History

History
300 lines (207 loc) · 9.22 KB

SendersApi.md

File metadata and controls

300 lines (207 loc) · 9.22 KB

Swagger\Client\SendersApi

All URIs are relative to https://api.mailvio.com/v3/

Method HTTP request Description
createSender POST /senders Create a new sender
deleteSender DELETE /senders/{senderId} Delete a sender
getIps GET /senders/ips Return all the dedicated IPs for your account
getIpsFromSender GET /senders/{senderId}/ips Return all the dedicated IPs for a sender
getSenders GET /senders Get the list of all your senders
updateSender PUT /senders/{senderId} Update a sender

createSender

\Swagger\Client\Model\CreateSenderModel createSender($sender)

Create a new sender

Example

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

// Configure API key authorization: api-key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer');

$api_instance = new Swagger\Client\Api\SendersApi();
$sender = new \Swagger\Client\Model\CreateSender(); // \Swagger\Client\Model\CreateSender | sender's name

try {
    $result = $api_instance->createSender($sender);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SendersApi->createSender: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
sender \Swagger\Client\Model\CreateSender sender's name [optional]

Return type

\Swagger\Client\Model\CreateSenderModel

Authorization

api-key

HTTP request headers

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

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

deleteSender

deleteSender($sender_id)

Delete a sender

Example

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

// Configure API key authorization: api-key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer');

$api_instance = new Swagger\Client\Api\SendersApi();
$sender_id = 789; // int | Id of the sender

try {
    $api_instance->deleteSender($sender_id);
} catch (Exception $e) {
    echo 'Exception when calling SendersApi->deleteSender: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
sender_id int Id of the sender

Return type

void (empty response body)

Authorization

api-key

HTTP request headers

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

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

getIps

\Swagger\Client\Model\GetIps getIps()

Return all the dedicated IPs for your account

Example

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

// Configure API key authorization: api-key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer');

$api_instance = new Swagger\Client\Api\SendersApi();

try {
    $result = $api_instance->getIps();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SendersApi->getIps: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

This endpoint does not need any parameter.

Return type

\Swagger\Client\Model\GetIps

Authorization

api-key

HTTP request headers

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

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

getIpsFromSender

\Swagger\Client\Model\GetIpsFromSender getIpsFromSender($sender_id)

Return all the dedicated IPs for a sender

Example

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

// Configure API key authorization: api-key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer');

$api_instance = new Swagger\Client\Api\SendersApi();
$sender_id = 789; // int | Id of the sender

try {
    $result = $api_instance->getIpsFromSender($sender_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SendersApi->getIpsFromSender: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
sender_id int Id of the sender

Return type

\Swagger\Client\Model\GetIpsFromSender

Authorization

api-key

HTTP request headers

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

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

getSenders

\Swagger\Client\Model\GetSendersList getSenders($ip, $domain)

Get the list of all your senders

Example

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

// Configure API key authorization: api-key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer');

$api_instance = new Swagger\Client\Api\SendersApi();
$ip = "ip_example"; // string | Filter your senders for a specific ip (available for dedicated IP usage only)
$domain = "domain_example"; // string | Filter your senders for a specific domain

try {
    $result = $api_instance->getSenders($ip, $domain);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SendersApi->getSenders: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
ip string Filter your senders for a specific ip (available for dedicated IP usage only) [optional]
domain string Filter your senders for a specific domain [optional]

Return type

\Swagger\Client\Model\GetSendersList

Authorization

api-key

HTTP request headers

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

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

updateSender

updateSender($sender_id, $sender)

Update a sender

Example

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

// Configure API key authorization: api-key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer');

$api_instance = new Swagger\Client\Api\SendersApi();
$sender_id = 789; // int | Id of the sender
$sender = new \Swagger\Client\Model\UpdateSender(); // \Swagger\Client\Model\UpdateSender | sender's name

try {
    $api_instance->updateSender($sender_id, $sender);
} catch (Exception $e) {
    echo 'Exception when calling SendersApi->updateSender: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
sender_id int Id of the sender
sender \Swagger\Client\Model\UpdateSender sender's name [optional]

Return type

void (empty response body)

Authorization

api-key

HTTP request headers

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

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