Skip to content

Files

Latest commit

0ff2843 · Jul 3, 2024

History

History
60 lines (41 loc) · 1.66 KB

EmailApi.md

File metadata and controls

60 lines (41 loc) · 1.66 KB

Yoast\MyYoastApiClient\EmailApi

All URIs are relative to https://my.yoast.test

Method HTTP request Description
sendEmails POST /api/Emails/bulk-send

sendEmails

int sendEmails($body)

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');
    // Configure HTTP bearer authorization: bearer
    $config = Yoast\MyYoastApiClient\Configuration::getDefaultConfiguration()
    ->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Yoast\MyYoastApiClient\Api\EmailApi(
    // 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
);
$body = new \Yoast\MyYoastApiClient\Model\BulkSendEmailDto(); // \Yoast\MyYoastApiClient\Model\BulkSendEmailDto | 

try {
    $result = $apiInstance->sendEmails($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling EmailApi->sendEmails: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
body \Yoast\MyYoastApiClient\Model\BulkSendEmailDto

Return type

int

Authorization

bearer

HTTP request headers

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

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