Skip to content

Latest commit

 

History

History
484 lines (354 loc) · 19.5 KB

MasterAccountApi.md

File metadata and controls

484 lines (354 loc) · 19.5 KB

SendinBlue\Client\MasterAccountApi

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

Method HTTP request Description
corporateMasterAccountGet GET /corporate/masterAccount Get the details of requested master account
corporateSubAccountGet GET /corporate/subAccount Get the list of all the sub-accounts of the master account.
corporateSubAccountIdDelete DELETE /corporate/subAccount/{id} Delete a sub-account
corporateSubAccountIdGet GET /corporate/subAccount/{id} Get sub-account details
corporateSubAccountIdPlanPut PUT /corporate/subAccount/{id}/plan Update sub-account plan
corporateSubAccountKeyPost POST /corporate/subAccount/key Create an API key for a sub-account
corporateSubAccountPost POST /corporate/subAccount Create a new sub-account under a master account.
corporateSubAccountSsoTokenPost POST /corporate/subAccount/ssoToken Generate SSO token to access Sendinblue

corporateMasterAccountGet

\SendinBlue\Client\Model\MasterDetailsResponse corporateMasterAccountGet()

Get the details of requested master account

This endpoint will provide the details of the master account.

Example

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

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

$apiInstance = new SendinBlue\Client\Api\MasterAccountApi(
    // 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
);

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

Parameters

This endpoint does not need any parameter.

Return type

\SendinBlue\Client\Model\MasterDetailsResponse

Authorization

api-key, partner-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]

corporateSubAccountGet

\SendinBlue\Client\Model\SubAccountsResponse corporateSubAccountGet($offset, $limit)

Get the list of all the sub-accounts of the master account.

This endpoint will provide the list all the sub-accounts of the master account.

Example

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

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

$apiInstance = new SendinBlue\Client\Api\MasterAccountApi(
    // 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
);
$offset = 56; // int | Index of the first sub-account in the page
$limit = 56; // int | Number of sub-accounts to be displayed on each page

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

Parameters

Name Type Description Notes
offset int Index of the first sub-account in the page
limit int Number of sub-accounts to be displayed on each page

Return type

\SendinBlue\Client\Model\SubAccountsResponse

Authorization

api-key, partner-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]

corporateSubAccountIdDelete

corporateSubAccountIdDelete($id)

Delete a sub-account

Example

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

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

$apiInstance = new SendinBlue\Client\Api\MasterAccountApi(
    // 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
);
$id = 789; // int | Id of the sub-account organization to be deleted

try {
    $apiInstance->corporateSubAccountIdDelete($id);
} catch (Exception $e) {
    echo 'Exception when calling MasterAccountApi->corporateSubAccountIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
id int Id of the sub-account organization to be deleted

Return type

void (empty response body)

Authorization

api-key, partner-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]

corporateSubAccountIdGet

\SendinBlue\Client\Model\SubAccountDetailsResponse corporateSubAccountIdGet($id)

Get sub-account details

This endpoint will provide the details for the specified sub-account company

Example

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

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

$apiInstance = new SendinBlue\Client\Api\MasterAccountApi(
    // 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
);
$id = 789; // int | Id of the sub-account organization

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

Parameters

Name Type Description Notes
id int Id of the sub-account organization

Return type

\SendinBlue\Client\Model\SubAccountDetailsResponse

Authorization

api-key, partner-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]

corporateSubAccountIdPlanPut

corporateSubAccountIdPlanPut($id, $updatePlanDetails)

Update sub-account plan

This endpoint will update the sub-account plan

Example

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

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

$apiInstance = new SendinBlue\Client\Api\MasterAccountApi(
    // 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
);
$id = 789; // int | Id of the sub-account organization
$updatePlanDetails = new \SendinBlue\Client\Model\SubAccountUpdatePlanRequest(); // \SendinBlue\Client\Model\SubAccountUpdatePlanRequest | Values to update a sub-account plan

try {
    $apiInstance->corporateSubAccountIdPlanPut($id, $updatePlanDetails);
} catch (Exception $e) {
    echo 'Exception when calling MasterAccountApi->corporateSubAccountIdPlanPut: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
id int Id of the sub-account organization
updatePlanDetails \SendinBlue\Client\Model\SubAccountUpdatePlanRequest Values to update a sub-account plan

Return type

void (empty response body)

Authorization

api-key, partner-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]

corporateSubAccountKeyPost

\SendinBlue\Client\Model\CreateApiKeyResponse corporateSubAccountKeyPost($createApiKeyRequest)

Create an API key for a sub-account

This endpoint will generate an API v3 key for a sub account

Example

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

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

$apiInstance = new SendinBlue\Client\Api\MasterAccountApi(
    // 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
);
$createApiKeyRequest = new \SendinBlue\Client\Model\CreateApiKeyRequest(); // \SendinBlue\Client\Model\CreateApiKeyRequest | Values to generate API key for sub-account

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

Parameters

Name Type Description Notes
createApiKeyRequest \SendinBlue\Client\Model\CreateApiKeyRequest Values to generate API key for sub-account

Return type

\SendinBlue\Client\Model\CreateApiKeyResponse

Authorization

api-key, partner-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]

corporateSubAccountPost

\SendinBlue\Client\Model\CreateSubAccountResponse corporateSubAccountPost($subAccountCreate)

Create a new sub-account under a master account.

This endpoint will create a new sub-account under a master account

Example

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

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

$apiInstance = new SendinBlue\Client\Api\MasterAccountApi(
    // 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
);
$subAccountCreate = new \SendinBlue\Client\Model\CreateSubAccount(); // \SendinBlue\Client\Model\CreateSubAccount | values to create new sub-account

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

Parameters

Name Type Description Notes
subAccountCreate \SendinBlue\Client\Model\CreateSubAccount values to create new sub-account

Return type

\SendinBlue\Client\Model\CreateSubAccountResponse

Authorization

api-key, partner-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]

corporateSubAccountSsoTokenPost

\SendinBlue\Client\Model\GetSsoToken corporateSubAccountSsoTokenPost($ssoTokenRequest)

Generate SSO token to access Sendinblue

This endpoint generates an sso token to authenticate and access a sub-account of the master using the account endpoint https://account-app.sendinblue.com/account/login/sub-account/sso/[token], where [token] will be replaced by the actual token.

Example

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

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

$apiInstance = new SendinBlue\Client\Api\MasterAccountApi(
    // 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
);
$ssoTokenRequest = new \SendinBlue\Client\Model\SsoTokenRequest(); // \SendinBlue\Client\Model\SsoTokenRequest | Values to generate SSO token for sub-account

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

Parameters

Name Type Description Notes
ssoTokenRequest \SendinBlue\Client\Model\SsoTokenRequest Values to generate SSO token for sub-account

Return type

\SendinBlue\Client\Model\GetSsoToken

Authorization

api-key, partner-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]