All URIs are relative to https://api.brevo.com/v3
Method | HTTP request | Description |
---|---|---|
corporate_group_id_delete | DELETE /corporate/group/{id} | Delete a group |
corporate_group_id_get | GET /corporate/group/{id} | GET a group details |
corporate_group_id_put | PUT /corporate/group/{id} | Update a group of sub-accounts |
corporate_group_post | POST /corporate/group | Create a new group of sub-accounts |
corporate_group_unlink_group_id_sub_accounts_put | PUT /corporate/group/unlink/{groupId}/subAccounts | Delete sub-account from group |
corporate_master_account_get | GET /corporate/masterAccount | Get the details of requested master account |
corporate_sso_token_post | POST /corporate/ssoToken | Generate SSO token to access admin account |
corporate_sub_account_get | GET /corporate/subAccount | Get the list of all the sub-accounts of the master account. |
corporate_sub_account_id_applications_toggle_put | PUT /corporate/subAccount/{id}/applications/toggle | Enable/disable sub-account application(s) |
corporate_sub_account_id_delete | DELETE /corporate/subAccount/{id} | Delete a sub-account |
corporate_sub_account_id_get | GET /corporate/subAccount/{id} | Get sub-account details |
corporate_sub_account_id_plan_put | PUT /corporate/subAccount/{id}/plan | Update sub-account plan |
corporate_sub_account_key_post | POST /corporate/subAccount/key | Create an API key for a sub-account |
corporate_sub_account_post | POST /corporate/subAccount | Create a new sub-account under a master account. |
corporate_sub_account_sso_token_post | POST /corporate/subAccount/ssoToken | Generate SSO token to access sub-account |
corporate_user_invitation_action_email_put | PUT /corporate/user/invitation/{action}/{email} | Resend / cancel admin user invitation |
corporate_user_revoke_email_delete | DELETE /corporate/user/revoke/{email} | Revoke an admin user |
get_account_activity | GET /organization/activities | Get user activity logs |
get_corporate_invited_users_list | GET /corporate/invited/users | Get the list of all admin users |
get_corporate_user_permission | GET /corporate/user/{email}/permissions | Check admin user permissions |
get_sub_account_groups | GET /corporate/groups | Get the list of groups |
invite_admin_user | POST /corporate/user/invitation/send | Send invitation to an admin user |
corporate_group_id_delete(id)
Delete a group
This endpoint allows you to delete a group of sub-organizations. When a group is deleted, the sub-organizations are no longer part of this group. The users associated with the group are no longer associated with the group once deleted.
# load the gem
require 'brevo'
# setup authorization
Brevo.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 = Brevo::MasterAccountApi.new
id = 'id_example' # String | Id of the group
begin
#Delete a group
api_instance.corporate_group_id_delete(id)
rescue Brevo::ApiError => e
puts "Exception when calling MasterAccountApi->corporate_group_id_delete: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | String | Id of the group |
nil (empty response body)
- Content-Type: application/json
- Accept: application/json
CorporateGroupDetailsResponse corporate_group_id_get(id)
GET a group details
This endpoint allows you to retrieve a specific group’s information such as the list of sub-organizations and the user associated with the group.
# load the gem
require 'brevo'
# setup authorization
Brevo.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 = Brevo::MasterAccountApi.new
id = 'id_example' # String | Id of the group of sub-organization
begin
#GET a group details
result = api_instance.corporate_group_id_get(id)
p result
rescue Brevo::ApiError => e
puts "Exception when calling MasterAccountApi->corporate_group_id_get: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | String | Id of the group of sub-organization |
- Content-Type: application/json
- Accept: application/json
corporate_group_id_put(id, body)
Update a group of sub-accounts
This endpoint allows you to update a group of sub-accounts
# load the gem
require 'brevo'
# setup authorization
Brevo.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 = Brevo::MasterAccountApi.new
id = 'id_example' # String | Id of the group
body = Brevo::Body1.new # Body1 | Group details to be updated.
begin
#Update a group of sub-accounts
api_instance.corporate_group_id_put(id, body)
rescue Brevo::ApiError => e
puts "Exception when calling MasterAccountApi->corporate_group_id_put: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | String | Id of the group | |
body | Body1 | Group details to be updated. |
nil (empty response body)
- Content-Type: application/json
- Accept: application/json
InlineResponse201 corporate_group_post(body)
Create a new group of sub-accounts
This endpoint allows to create a group of sub-accounts
# load the gem
require 'brevo'
# setup authorization
Brevo.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 = Brevo::MasterAccountApi.new
body = Brevo::Body.new # Body | Group details to be created.
begin
#Create a new group of sub-accounts
result = api_instance.corporate_group_post(body)
p result
rescue Brevo::ApiError => e
puts "Exception when calling MasterAccountApi->corporate_group_post: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
body | Body | Group details to be created. |
- Content-Type: application/json
- Accept: application/json
corporate_group_unlink_group_id_sub_accounts_put(group_id, body)
Delete sub-account from group
This endpoint allows you to remove a sub-organization from a group.
# load the gem
require 'brevo'
# setup authorization
Brevo.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 = Brevo::MasterAccountApi.new
group_id = 'group_id_example' # String | Id of the group
body = Brevo::Body2.new # Body2 | List of sub-account ids
begin
#Delete sub-account from group
api_instance.corporate_group_unlink_group_id_sub_accounts_put(group_id, body)
rescue Brevo::ApiError => e
puts "Exception when calling MasterAccountApi->corporate_group_unlink_group_id_sub_accounts_put: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
group_id | String | Id of the group | |
body | Body2 | List of sub-account ids |
nil (empty response body)
- Content-Type: application/json
- Accept: application/json
MasterDetailsResponse corporate_master_account_get
Get the details of requested master account
This endpoint will provide the details of the master account.
# load the gem
require 'brevo'
# setup authorization
Brevo.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 = Brevo::MasterAccountApi.new
begin
#Get the details of requested master account
result = api_instance.corporate_master_account_get
p result
rescue Brevo::ApiError => e
puts "Exception when calling MasterAccountApi->corporate_master_account_get: #{e}"
end
This endpoint does not need any parameter.
- Content-Type: application/json
- Accept: application/json
GetSsoToken corporate_sso_token_post(sso_token_request_corporate)
Generate SSO token to access admin account
This endpoint generates an SSO token to authenticate and access the admin account using the endpoint https://account-app.brevo.com/account/login/corporate/sso/[token], where [token] will be replaced by the actual token.
# load the gem
require 'brevo'
# setup authorization
Brevo.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 = Brevo::MasterAccountApi.new
sso_token_request_corporate = Brevo::SsoTokenRequestCorporate.new # SsoTokenRequestCorporate | User email of admin account
begin
#Generate SSO token to access admin account
result = api_instance.corporate_sso_token_post(sso_token_request_corporate)
p result
rescue Brevo::ApiError => e
puts "Exception when calling MasterAccountApi->corporate_sso_token_post: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
sso_token_request_corporate | SsoTokenRequestCorporate | User email of admin account |
- Content-Type: application/json
- Accept: application/json
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.
# load the gem
require 'brevo'
# setup authorization
Brevo.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 = Brevo::MasterAccountApi.new
offset = 56 # Integer | Index of the first sub-account in the page
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 Brevo::ApiError => e
puts "Exception when calling MasterAccountApi->corporate_sub_account_get: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
offset | Integer | Index of the first sub-account in the page | |
limit | Integer | Number of sub-accounts to be displayed on each page |
- Content-Type: application/json
- Accept: application/json
corporate_sub_account_id_applications_toggle_put(id, toggle_applications)
Enable/disable sub-account application(s)
API endpoint for the Corporate owner to enable/disable applications on the sub-account
# load the gem
require 'brevo'
# setup authorization
Brevo.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 = Brevo::MasterAccountApi.new
id = 789 # Integer | Id of the sub-account organization (mandatory)
toggle_applications = Brevo::SubAccountAppsToggleRequest.new # SubAccountAppsToggleRequest | List of applications to activate or deactivate on a sub-account
begin
#Enable/disable sub-account application(s)
api_instance.corporate_sub_account_id_applications_toggle_put(id, toggle_applications)
rescue Brevo::ApiError => e
puts "Exception when calling MasterAccountApi->corporate_sub_account_id_applications_toggle_put: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | Integer | Id of the sub-account organization (mandatory) | |
toggle_applications | SubAccountAppsToggleRequest | List of applications to activate or deactivate on a sub-account |
nil (empty response body)
- Content-Type: application/json
- Accept: application/json
corporate_sub_account_id_delete(id)
Delete a sub-account
# load the gem
require 'brevo'
# setup authorization
Brevo.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 = Brevo::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 Brevo::ApiError => e
puts "Exception when calling MasterAccountApi->corporate_sub_account_id_delete: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | Integer | Id of the sub-account organization to be deleted |
nil (empty response body)
- Content-Type: application/json
- Accept: application/json
SubAccountDetailsResponse corporate_sub_account_id_get(id)
Get sub-account details
This endpoint will provide the details for the specified sub-account company
# load the gem
require 'brevo'
# setup authorization
Brevo.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 = Brevo::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 Brevo::ApiError => e
puts "Exception when calling MasterAccountApi->corporate_sub_account_id_get: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | Integer | Id of the sub-account organization |
- Content-Type: application/json
- Accept: application/json
corporate_sub_account_id_plan_put(id, update_plan_details)
Update sub-account plan
This endpoint will update the sub-account plan
# load the gem
require 'brevo'
# setup authorization
Brevo.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 = Brevo::MasterAccountApi.new
id = 789 # Integer | Id of the sub-account organization
update_plan_details = Brevo::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 Brevo::ApiError => e
puts "Exception when calling MasterAccountApi->corporate_sub_account_id_plan_put: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | Integer | Id of the sub-account organization | |
update_plan_details | SubAccountUpdatePlanRequest | Values to update a sub-account plan |
nil (empty response body)
- Content-Type: application/json
- Accept: application/json
CreateApiKeyResponse corporate_sub_account_key_post(create_api_key_request)
Create an API key for a sub-account
This endpoint will generate an API v3 key for a sub account
# load the gem
require 'brevo'
# setup authorization
Brevo.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 = Brevo::MasterAccountApi.new
create_api_key_request = Brevo::CreateApiKeyRequest.new # CreateApiKeyRequest | Values to generate API key for sub-account
begin
#Create an API key for a sub-account
result = api_instance.corporate_sub_account_key_post(create_api_key_request)
p result
rescue Brevo::ApiError => e
puts "Exception when calling MasterAccountApi->corporate_sub_account_key_post: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
create_api_key_request | CreateApiKeyRequest | Values to generate API key for sub-account |
- Content-Type: application/json
- Accept: application/json
CreateSubAccountResponse 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
# load the gem
require 'brevo'
# setup authorization
Brevo.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 = Brevo::MasterAccountApi.new
sub_account_create = Brevo::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 Brevo::ApiError => e
puts "Exception when calling MasterAccountApi->corporate_sub_account_post: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
sub_account_create | CreateSubAccount | values to create new sub-account |
- Content-Type: application/json
- Accept: application/json
GetSsoToken corporate_sub_account_sso_token_post(sso_token_request)
Generate SSO token to access sub-account
This endpoint generates an sso token to authenticate and access a sub-account of the master using the account endpoint https://account-app.brevo.com/account/login/sub-account/sso/[token], where [token] will be replaced by the actual token.
# load the gem
require 'brevo'
# setup authorization
Brevo.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 = Brevo::MasterAccountApi.new
sso_token_request = Brevo::SsoTokenRequest.new # SsoTokenRequest | Values to generate SSO token for sub-account
begin
#Generate SSO token to access sub-account
result = api_instance.corporate_sub_account_sso_token_post(sso_token_request)
p result
rescue Brevo::ApiError => e
puts "Exception when calling MasterAccountApi->corporate_sub_account_sso_token_post: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
sso_token_request | SsoTokenRequest | Values to generate SSO token for sub-account |
- Content-Type: application/json
- Accept: application/json
InlineResponse200 corporate_user_invitation_action_email_put(action, email)
Resend / cancel admin user invitation
This endpoint will allow the user to: - Resend an admin user invitation - Cancel an admin user invitation
# load the gem
require 'brevo'
# setup authorization
Brevo.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 = Brevo::MasterAccountApi.new
action = 'action_example' # String | Action to be performed (cancel / resend)
email = 'email_example' # String | Email address of the recipient
begin
#Resend / cancel admin user invitation
result = api_instance.corporate_user_invitation_action_email_put(action, email)
p result
rescue Brevo::ApiError => e
puts "Exception when calling MasterAccountApi->corporate_user_invitation_action_email_put: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
action | String | Action to be performed (cancel / resend) | |
String | Email address of the recipient |
- Content-Type: application/json
- Accept: application/json
corporate_user_revoke_email_delete(email)
Revoke an admin user
This endpoint allows to revoke/remove an invited member of your Admin account
# load the gem
require 'brevo'
# setup authorization
Brevo.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 = Brevo::MasterAccountApi.new
email = 'email_example' # String | Email of the invited user
begin
#Revoke an admin user
api_instance.corporate_user_revoke_email_delete(email)
rescue Brevo::ApiError => e
puts "Exception when calling MasterAccountApi->corporate_user_revoke_email_delete: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
String | Email of the invited user |
nil (empty response body)
- Content-Type: application/json
- Accept: application/json
GetAccountActivity get_account_activity(opts)
Get user activity logs
# load the gem
require 'brevo'
# setup authorization
Brevo.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 = Brevo::MasterAccountApi.new
opts = {
start_date: 'start_date_example', # String | Mandatory if endDate is used. Enter start date in UTC date (YYYY-MM-DD) format to filter the activity in your account. Maximum time period that can be selected is one month. Additionally, you can retrieve activity logs from the past 12 months from the date of your search.
end_date: 'end_date_example', # String | Mandatory if startDate is used. Enter end date in UTC date (YYYY-MM-DD) format to filter the activity in your account. Maximum time period that can be selected is one month.
limit: 10, # Integer | Number of documents per page
offset: 0 # Integer | Index of the first document in the page.
}
begin
#Get user activity logs
result = api_instance.get_account_activity(opts)
p result
rescue Brevo::ApiError => e
puts "Exception when calling MasterAccountApi->get_account_activity: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
start_date | String | Mandatory if endDate is used. Enter start date in UTC date (YYYY-MM-DD) format to filter the activity in your account. Maximum time period that can be selected is one month. Additionally, you can retrieve activity logs from the past 12 months from the date of your search. | [optional] |
end_date | String | Mandatory if startDate is used. Enter end date in UTC date (YYYY-MM-DD) format to filter the activity in your account. Maximum time period that can be selected is one month. | [optional] |
limit | Integer | Number of documents per page | [optional] [default to 10] |
offset | Integer | Index of the first document in the page. | [optional] [default to 0] |
- Content-Type: application/json
- Accept: application/json
GetCorporateInvitedUsersList get_corporate_invited_users_list
Get the list of all admin users
This endpoint allows you to list all Admin users of your Admin account
# load the gem
require 'brevo'
# setup authorization
Brevo.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 = Brevo::MasterAccountApi.new
begin
#Get the list of all admin users
result = api_instance.get_corporate_invited_users_list
p result
rescue Brevo::ApiError => e
puts "Exception when calling MasterAccountApi->get_corporate_invited_users_list: #{e}"
end
This endpoint does not need any parameter.
- Content-Type: application/json
- Accept: application/json
GetCorporateUserPermission get_corporate_user_permission(email)
Check admin user permissions
# load the gem
require 'brevo'
# setup authorization
Brevo.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 = Brevo::MasterAccountApi.new
email = 'email_example' # String | Email of the invited user
begin
#Check admin user permissions
result = api_instance.get_corporate_user_permission(email)
p result
rescue Brevo::ApiError => e
puts "Exception when calling MasterAccountApi->get_corporate_user_permission: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
String | Email of the invited user |
- Content-Type: application/json
- Accept: application/json
Array<InlineResponse2001> get_sub_account_groups
Get the list of groups
This endpoint allows you to list all groups created on your Admin account.
# load the gem
require 'brevo'
# setup authorization
Brevo.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 = Brevo::MasterAccountApi.new
begin
#Get the list of groups
result = api_instance.get_sub_account_groups
p result
rescue Brevo::ApiError => e
puts "Exception when calling MasterAccountApi->get_sub_account_groups: #{e}"
end
This endpoint does not need any parameter.
- Content-Type: application/json
- Accept: application/json
InviteAdminUser invite_admin_user(send_invitation)
Send invitation to an admin user
This endpoint allows you to invite a member to manage the Admin account Features and their respective permissions are as below: -
my_plan: - \"all\" -
api: - \"none\" -
user_management: - \"all\" -
app_management| Not available in ENTv2: - \"all\" **Note**: - If
all_features_access: falsethen only privileges are required otherwise if
true` then it's assumed that all permissions will be there for the invited admin user.
# load the gem
require 'brevo'
# setup authorization
Brevo.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 = Brevo::MasterAccountApi.new
send_invitation = Brevo::InviteAdminUser.new # InviteAdminUser | Payload to send an invitation
begin
#Send invitation to an admin user
result = api_instance.invite_admin_user(send_invitation)
p result
rescue Brevo::ApiError => e
puts "Exception when calling MasterAccountApi->invite_admin_user: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
send_invitation | InviteAdminUser | Payload to send an invitation |
- Content-Type: application/json
- Accept: application/json