# SibApiV3Sdk::MasterAccountApi All URIs are relative to *https://api.sendinblue.com/v3* Method | HTTP request | Description ------------- | ------------- | ------------- [**corporate_master_account_get**](MasterAccountApi.md#corporate_master_account_get) | **GET** /corporate/masterAccount | Get the details of requested master account [**corporate_sub_account_get**](MasterAccountApi.md#corporate_sub_account_get) | **GET** /corporate/subAccount | Get the list of all the sub-accounts of the master account. [**corporate_sub_account_id_delete**](MasterAccountApi.md#corporate_sub_account_id_delete) | **DELETE** /corporate/subAccount/{id} | Delete a sub-account [**corporate_sub_account_id_get**](MasterAccountApi.md#corporate_sub_account_id_get) | **GET** /corporate/subAccount/{id} | Get sub-account details [**corporate_sub_account_id_plan_put**](MasterAccountApi.md#corporate_sub_account_id_plan_put) | **PUT** /corporate/subAccount/{id}/plan | Update sub-account plan [**corporate_sub_account_post**](MasterAccountApi.md#corporate_sub_account_post) | **POST** /corporate/subAccount | Create a new sub-account under a master account. [**corporate_sub_account_sso_token_post**](MasterAccountApi.md#corporate_sub_account_sso_token_post) | **POST** /corporate/subAccount/ssoToken | Generate SSO token to access Sendinblue # **corporate_master_account_get** > MasterDetailsResponse corporate_master_account_get Get the details of requested master account This endpoint will provide the details of the master account. ### Example ```ruby # load the gem require 'sib-api-v3-sdk' # setup authorization SibApiV3Sdk.configure do |config| # Configure API key authorization: api-key config.api_key['api-key'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) #config.api_key_prefix['api-key'] = 'Bearer' # Configure API key authorization: partner-key config.api_key['partner-key'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) #config.api_key_prefix['partner-key'] = 'Bearer' end api_instance = SibApiV3Sdk::MasterAccountApi.new begin #Get the details of requested master account result = api_instance.corporate_master_account_get p result rescue SibApiV3Sdk::ApiError => e puts "Exception when calling MasterAccountApi->corporate_master_account_get: #{e}" end ``` ### Parameters This endpoint does not need any parameter. ### Return type [**MasterDetailsResponse**](MasterDetailsResponse.md) ### Authorization [api-key](../README.md#api-key), [partner-key](../README.md#partner-key) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **corporate_sub_account_get** > SubAccountsResponse corporate_sub_account_get(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 ```ruby # load the gem require 'sib-api-v3-sdk' # setup authorization SibApiV3Sdk.configure do |config| # Configure API key authorization: api-key config.api_key['api-key'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) #config.api_key_prefix['api-key'] = 'Bearer' # Configure API key authorization: partner-key config.api_key['partner-key'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) #config.api_key_prefix['partner-key'] = 'Bearer' end api_instance = SibApiV3Sdk::MasterAccountApi.new offset = 56 # Integer | Page number of sub-accounts listing limit = 56 # Integer | Number of sub-accounts to be displayed on each page begin #Get the list of all the sub-accounts of the master account. result = api_instance.corporate_sub_account_get(offset, limit) p result rescue SibApiV3Sdk::ApiError => e puts "Exception when calling MasterAccountApi->corporate_sub_account_get: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **offset** | **Integer**| Page number of sub-accounts listing | **limit** | **Integer**| Number of sub-accounts to be displayed on each page | ### Return type [**SubAccountsResponse**](SubAccountsResponse.md) ### Authorization [api-key](../README.md#api-key), [partner-key](../README.md#partner-key) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **corporate_sub_account_id_delete** > corporate_sub_account_id_delete(id) Delete a sub-account ### Example ```ruby # load the gem require 'sib-api-v3-sdk' # setup authorization SibApiV3Sdk.configure do |config| # Configure API key authorization: api-key config.api_key['api-key'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) #config.api_key_prefix['api-key'] = 'Bearer' # Configure API key authorization: partner-key config.api_key['partner-key'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) #config.api_key_prefix['partner-key'] = 'Bearer' end api_instance = SibApiV3Sdk::MasterAccountApi.new id = 789 # Integer | Id of the sub-account organization to be deleted begin #Delete a sub-account api_instance.corporate_sub_account_id_delete(id) rescue SibApiV3Sdk::ApiError => e puts "Exception when calling MasterAccountApi->corporate_sub_account_id_delete: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **Integer**| Id of the sub-account organization to be deleted | ### Return type nil (empty response body) ### Authorization [api-key](../README.md#api-key), [partner-key](../README.md#partner-key) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **corporate_sub_account_id_get** > SubAccountDetailsResponse corporate_sub_account_id_get(id) Get sub-account details This endpoint will provide the details of specified sub-account organization ### Example ```ruby # load the gem require 'sib-api-v3-sdk' # setup authorization SibApiV3Sdk.configure do |config| # Configure API key authorization: api-key config.api_key['api-key'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) #config.api_key_prefix['api-key'] = 'Bearer' # Configure API key authorization: partner-key config.api_key['partner-key'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) #config.api_key_prefix['partner-key'] = 'Bearer' end api_instance = SibApiV3Sdk::MasterAccountApi.new id = 789 # Integer | Id of the sub-account organization begin #Get sub-account details result = api_instance.corporate_sub_account_id_get(id) p result rescue SibApiV3Sdk::ApiError => e puts "Exception when calling MasterAccountApi->corporate_sub_account_id_get: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **Integer**| Id of the sub-account organization | ### Return type [**SubAccountDetailsResponse**](SubAccountDetailsResponse.md) ### Authorization [api-key](../README.md#api-key), [partner-key](../README.md#partner-key) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **corporate_sub_account_id_plan_put** > corporate_sub_account_id_plan_put(id, update_plan_details) Update sub-account plan This endpoint will update the sub-account plan ### Example ```ruby # load the gem require 'sib-api-v3-sdk' # setup authorization SibApiV3Sdk.configure do |config| # Configure API key authorization: api-key config.api_key['api-key'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) #config.api_key_prefix['api-key'] = 'Bearer' # Configure API key authorization: partner-key config.api_key['partner-key'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) #config.api_key_prefix['partner-key'] = 'Bearer' end api_instance = SibApiV3Sdk::MasterAccountApi.new id = 789 # Integer | Id of the sub-account organization update_plan_details = SibApiV3Sdk::SubAccountUpdatePlanRequest.new # SubAccountUpdatePlanRequest | Values to update a sub-account plan begin #Update sub-account plan api_instance.corporate_sub_account_id_plan_put(id, update_plan_details) rescue SibApiV3Sdk::ApiError => e puts "Exception when calling MasterAccountApi->corporate_sub_account_id_plan_put: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **Integer**| Id of the sub-account organization | **update_plan_details** | [**SubAccountUpdatePlanRequest**](SubAccountUpdatePlanRequest.md)| Values to update a sub-account plan | ### Return type nil (empty response body) ### Authorization [api-key](../README.md#api-key), [partner-key](../README.md#partner-key) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **corporate_sub_account_post** > CreateModel corporate_sub_account_post(sub_account_create) Create a new sub-account under a master account. This endpoint will create a new sub-account under a master account ### Example ```ruby # load the gem require 'sib-api-v3-sdk' # setup authorization SibApiV3Sdk.configure do |config| # Configure API key authorization: api-key config.api_key['api-key'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) #config.api_key_prefix['api-key'] = 'Bearer' # Configure API key authorization: partner-key config.api_key['partner-key'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) #config.api_key_prefix['partner-key'] = 'Bearer' end api_instance = SibApiV3Sdk::MasterAccountApi.new sub_account_create = SibApiV3Sdk::CreateSubAccount.new # CreateSubAccount | values to create new sub-account begin #Create a new sub-account under a master account. result = api_instance.corporate_sub_account_post(sub_account_create) p result rescue SibApiV3Sdk::ApiError => e puts "Exception when calling MasterAccountApi->corporate_sub_account_post: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **sub_account_create** | [**CreateSubAccount**](CreateSubAccount.md)| values to create new sub-account | ### Return type [**CreateModel**](CreateModel.md) ### Authorization [api-key](../README.md#api-key), [partner-key](../README.md#partner-key) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json # **corporate_sub_account_sso_token_post** > GetSsoToken corporate_sub_account_sso_token_post(sso_token_request) 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://app.sendinblue.com/account/login/sub-account/sso/[token], where [token] will be replaced with actual token. ### Example ```ruby # load the gem require 'sib-api-v3-sdk' # setup authorization SibApiV3Sdk.configure do |config| # Configure API key authorization: api-key config.api_key['api-key'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) #config.api_key_prefix['api-key'] = 'Bearer' # Configure API key authorization: partner-key config.api_key['partner-key'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) #config.api_key_prefix['partner-key'] = 'Bearer' end api_instance = SibApiV3Sdk::MasterAccountApi.new sso_token_request = SibApiV3Sdk::SsoTokenRequest.new # SsoTokenRequest | Values to generate SSO token for sub-account begin #Generate SSO token to access Sendinblue result = api_instance.corporate_sub_account_sso_token_post(sso_token_request) p result rescue SibApiV3Sdk::ApiError => e puts "Exception when calling MasterAccountApi->corporate_sub_account_sso_token_post: #{e}" end ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **sso_token_request** | [**SsoTokenRequest**](SsoTokenRequest.md)| Values to generate SSO token for sub-account | ### Return type [**GetSsoToken**](GetSsoToken.md) ### Authorization [api-key](../README.md#api-key), [partner-key](../README.md#partner-key) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json