All URIs are relative to https://api.brevo.com/v3
Method | HTTP request | Description |
---|---|---|
corporateGroupIdDelete | DELETE /corporate/group/{id} | Delete a group |
corporateGroupIdGet | GET /corporate/group/{id} | GET a group details |
corporateGroupIdPut | PUT /corporate/group/{id} | Update a group of sub-accounts |
corporateGroupPost | POST /corporate/group | Create a new group of sub-accounts |
corporateGroupUnlinkGroupIdSubAccountsPut | PUT /corporate/group/unlink/{groupId}/subAccounts | Delete sub-account from group |
corporateMasterAccountGet | GET /corporate/masterAccount | Get the details of requested master account |
corporateSsoTokenPost | POST /corporate/ssoToken | Generate SSO token to access admin account |
corporateSubAccountGet | GET /corporate/subAccount | Get the list of all the sub-accounts of the master account. |
corporateSubAccountIdApplicationsTogglePut | PUT /corporate/subAccount/{id}/applications/toggle | Enable/disable sub-account application(s) |
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 sub-account |
corporateUserInvitationActionEmailPut | PUT /corporate/user/invitation/{action}/{email} | Resend / cancel admin user invitation |
corporateUserRevokeEmailDelete | DELETE /corporate/user/revoke/{email} | Revoke an admin user |
getAccountActivity | GET /organization/activities | Get user activity logs |
getCorporateInvitedUsersList | GET /corporate/invited/users | Get the list of all admin users |
getCorporateUserPermission | GET /corporate/user/{email}/permissions | Check admin user permissions |
getSubAccountGroups | GET /corporate/groups | Get the list of groups |
inviteAdminUser | POST /corporate/user/invitation/send | Send invitation to an admin user |
corporateGroupIdDelete(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.
// Import classes:
//import brevo.ApiClient;
//import brevo.ApiException;
//import brevo.Configuration;
//import brevo.auth.*;
//import brevoApi.MasterAccountApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");
// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");
MasterAccountApi apiInstance = new MasterAccountApi();
String id = "id_example"; // String | Id of the group
try {
apiInstance.corporateGroupIdDelete(id);
} catch (ApiException e) {
System.err.println("Exception when calling MasterAccountApi#corporateGroupIdDelete");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
id | String | Id of the group |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
CorporateGroupDetailsResponse corporateGroupIdGet(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.
// Import classes:
//import brevo.ApiClient;
//import brevo.ApiException;
//import brevo.Configuration;
//import brevo.auth.*;
//import brevoApi.MasterAccountApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");
// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");
MasterAccountApi apiInstance = new MasterAccountApi();
String id = "id_example"; // String | Id of the group of sub-organization
try {
CorporateGroupDetailsResponse result = apiInstance.corporateGroupIdGet(id);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MasterAccountApi#corporateGroupIdGet");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
id | String | Id of the group of sub-organization |
- Content-Type: application/json
- Accept: application/json
corporateGroupIdPut(id, body)
Update a group of sub-accounts
This endpoint allows you to update a group of sub-accounts
// Import classes:
//import brevo.ApiClient;
//import brevo.ApiException;
//import brevo.Configuration;
//import brevo.auth.*;
//import brevoApi.MasterAccountApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");
// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");
MasterAccountApi apiInstance = new MasterAccountApi();
String id = "id_example"; // String | Id of the group
Body1 body = new Body1(); // Body1 | Group details to be updated.
try {
apiInstance.corporateGroupIdPut(id, body);
} catch (ApiException e) {
System.err.println("Exception when calling MasterAccountApi#corporateGroupIdPut");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
id | String | Id of the group | |
body | Body1 | Group details to be updated. |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
InlineResponse201 corporateGroupPost(body)
Create a new group of sub-accounts
This endpoint allows to create a group of sub-accounts
// Import classes:
//import brevo.ApiClient;
//import brevo.ApiException;
//import brevo.Configuration;
//import brevo.auth.*;
//import brevoApi.MasterAccountApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");
// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");
MasterAccountApi apiInstance = new MasterAccountApi();
Body body = new Body(); // Body | Group details to be created.
try {
InlineResponse201 result = apiInstance.corporateGroupPost(body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MasterAccountApi#corporateGroupPost");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
body | Body | Group details to be created. |
- Content-Type: application/json
- Accept: application/json
corporateGroupUnlinkGroupIdSubAccountsPut(groupId, body)
Delete sub-account from group
This endpoint allows you to remove a sub-organization from a group.
// Import classes:
//import brevo.ApiClient;
//import brevo.ApiException;
//import brevo.Configuration;
//import brevo.auth.*;
//import brevoApi.MasterAccountApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");
// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");
MasterAccountApi apiInstance = new MasterAccountApi();
String groupId = "groupId_example"; // String | Id of the group
Body2 body = new Body2(); // Body2 | List of sub-account ids
try {
apiInstance.corporateGroupUnlinkGroupIdSubAccountsPut(groupId, body);
} catch (ApiException e) {
System.err.println("Exception when calling MasterAccountApi#corporateGroupUnlinkGroupIdSubAccountsPut");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
groupId | String | Id of the group | |
body | Body2 | List of sub-account ids |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
MasterDetailsResponse corporateMasterAccountGet()
Get the details of requested master account
This endpoint will provide the details of the master account.
// Import classes:
//import brevo.ApiClient;
//import brevo.ApiException;
//import brevo.Configuration;
//import brevo.auth.*;
//import brevoApi.MasterAccountApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");
// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");
MasterAccountApi apiInstance = new MasterAccountApi();
try {
MasterDetailsResponse result = apiInstance.corporateMasterAccountGet();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MasterAccountApi#corporateMasterAccountGet");
e.printStackTrace();
}
This endpoint does not need any parameter.
- Content-Type: application/json
- Accept: application/json
GetSsoToken corporateSsoTokenPost(ssoTokenRequestCorporate)
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.
// Import classes:
//import brevo.ApiClient;
//import brevo.ApiException;
//import brevo.Configuration;
//import brevo.auth.*;
//import brevoApi.MasterAccountApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");
// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");
MasterAccountApi apiInstance = new MasterAccountApi();
SsoTokenRequestCorporate ssoTokenRequestCorporate = new SsoTokenRequestCorporate(); // SsoTokenRequestCorporate | User email of admin account
try {
GetSsoToken result = apiInstance.corporateSsoTokenPost(ssoTokenRequestCorporate);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MasterAccountApi#corporateSsoTokenPost");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
ssoTokenRequestCorporate | SsoTokenRequestCorporate | User email of admin account |
- Content-Type: application/json
- Accept: application/json
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.
// Import classes:
//import brevo.ApiClient;
//import brevo.ApiException;
//import brevo.Configuration;
//import brevo.auth.*;
//import brevoApi.MasterAccountApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");
// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");
MasterAccountApi apiInstance = new MasterAccountApi();
Integer offset = 56; // Integer | Index of the first sub-account in the page
Integer limit = 56; // Integer | Number of sub-accounts to be displayed on each page
try {
SubAccountsResponse result = apiInstance.corporateSubAccountGet(offset, limit);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MasterAccountApi#corporateSubAccountGet");
e.printStackTrace();
}
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
corporateSubAccountIdApplicationsTogglePut(id, toggleApplications)
Enable/disable sub-account application(s)
API endpoint for the Corporate owner to enable/disable applications on the sub-account
// Import classes:
//import brevo.ApiClient;
//import brevo.ApiException;
//import brevo.Configuration;
//import brevo.auth.*;
//import brevoApi.MasterAccountApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");
// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");
MasterAccountApi apiInstance = new MasterAccountApi();
Long id = 789L; // Long | Id of the sub-account organization (mandatory)
SubAccountAppsToggleRequest toggleApplications = new SubAccountAppsToggleRequest(); // SubAccountAppsToggleRequest | List of applications to activate or deactivate on a sub-account
try {
apiInstance.corporateSubAccountIdApplicationsTogglePut(id, toggleApplications);
} catch (ApiException e) {
System.err.println("Exception when calling MasterAccountApi#corporateSubAccountIdApplicationsTogglePut");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
id | Long | Id of the sub-account organization (mandatory) | |
toggleApplications | SubAccountAppsToggleRequest | List of applications to activate or deactivate on a sub-account |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
corporateSubAccountIdDelete(id)
Delete a sub-account
// Import classes:
//import brevo.ApiClient;
//import brevo.ApiException;
//import brevo.Configuration;
//import brevo.auth.*;
//import brevoApi.MasterAccountApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");
// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");
MasterAccountApi apiInstance = new MasterAccountApi();
Long id = 789L; // Long | Id of the sub-account organization to be deleted
try {
apiInstance.corporateSubAccountIdDelete(id);
} catch (ApiException e) {
System.err.println("Exception when calling MasterAccountApi#corporateSubAccountIdDelete");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
id | Long | Id of the sub-account organization to be deleted |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
SubAccountDetailsResponse corporateSubAccountIdGet(id)
Get sub-account details
This endpoint will provide the details for the specified sub-account company
// Import classes:
//import brevo.ApiClient;
//import brevo.ApiException;
//import brevo.Configuration;
//import brevo.auth.*;
//import brevoApi.MasterAccountApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");
// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");
MasterAccountApi apiInstance = new MasterAccountApi();
Long id = 789L; // Long | Id of the sub-account organization
try {
SubAccountDetailsResponse result = apiInstance.corporateSubAccountIdGet(id);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MasterAccountApi#corporateSubAccountIdGet");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
id | Long | Id of the sub-account organization |
- Content-Type: application/json
- Accept: application/json
corporateSubAccountIdPlanPut(id, updatePlanDetails)
Update sub-account plan
This endpoint will update the sub-account plan
// Import classes:
//import brevo.ApiClient;
//import brevo.ApiException;
//import brevo.Configuration;
//import brevo.auth.*;
//import brevoApi.MasterAccountApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");
// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");
MasterAccountApi apiInstance = new MasterAccountApi();
Long id = 789L; // Long | Id of the sub-account organization
SubAccountUpdatePlanRequest updatePlanDetails = new SubAccountUpdatePlanRequest(); // SubAccountUpdatePlanRequest | Values to update a sub-account plan
try {
apiInstance.corporateSubAccountIdPlanPut(id, updatePlanDetails);
} catch (ApiException e) {
System.err.println("Exception when calling MasterAccountApi#corporateSubAccountIdPlanPut");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
id | Long | Id of the sub-account organization | |
updatePlanDetails | SubAccountUpdatePlanRequest | Values to update a sub-account plan |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
CreateApiKeyResponse corporateSubAccountKeyPost(createApiKeyRequest)
Create an API key for a sub-account
This endpoint will generate an API v3 key for a sub account
// Import classes:
//import brevo.ApiClient;
//import brevo.ApiException;
//import brevo.Configuration;
//import brevo.auth.*;
//import brevoApi.MasterAccountApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");
// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");
MasterAccountApi apiInstance = new MasterAccountApi();
CreateApiKeyRequest createApiKeyRequest = new CreateApiKeyRequest(); // CreateApiKeyRequest | Values to generate API key for sub-account
try {
CreateApiKeyResponse result = apiInstance.corporateSubAccountKeyPost(createApiKeyRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MasterAccountApi#corporateSubAccountKeyPost");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
createApiKeyRequest | CreateApiKeyRequest | Values to generate API key for sub-account |
- Content-Type: application/json
- Accept: application/json
CreateSubAccountResponse corporateSubAccountPost(subAccountCreate)
Create a new sub-account under a master account.
This endpoint will create a new sub-account under a master account
// Import classes:
//import brevo.ApiClient;
//import brevo.ApiException;
//import brevo.Configuration;
//import brevo.auth.*;
//import brevoApi.MasterAccountApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");
// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");
MasterAccountApi apiInstance = new MasterAccountApi();
CreateSubAccount subAccountCreate = new CreateSubAccount(); // CreateSubAccount | values to create new sub-account
try {
CreateSubAccountResponse result = apiInstance.corporateSubAccountPost(subAccountCreate);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MasterAccountApi#corporateSubAccountPost");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
subAccountCreate | CreateSubAccount | values to create new sub-account |
- Content-Type: application/json
- Accept: application/json
GetSsoToken corporateSubAccountSsoTokenPost(ssoTokenRequest)
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.
// Import classes:
//import brevo.ApiClient;
//import brevo.ApiException;
//import brevo.Configuration;
//import brevo.auth.*;
//import brevoApi.MasterAccountApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");
// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");
MasterAccountApi apiInstance = new MasterAccountApi();
SsoTokenRequest ssoTokenRequest = new SsoTokenRequest(); // SsoTokenRequest | Values to generate SSO token for sub-account
try {
GetSsoToken result = apiInstance.corporateSubAccountSsoTokenPost(ssoTokenRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MasterAccountApi#corporateSubAccountSsoTokenPost");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
ssoTokenRequest | SsoTokenRequest | Values to generate SSO token for sub-account |
- Content-Type: application/json
- Accept: application/json
InlineResponse200 corporateUserInvitationActionEmailPut(action, email)
Resend / cancel admin user invitation
This endpoint will allow the user to: - Resend an admin user invitation - Cancel an admin user invitation
// Import classes:
//import brevo.ApiClient;
//import brevo.ApiException;
//import brevo.Configuration;
//import brevo.auth.*;
//import brevoApi.MasterAccountApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");
// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");
MasterAccountApi apiInstance = new MasterAccountApi();
String action = "action_example"; // String | Action to be performed (cancel / resend)
String email = "email_example"; // String | Email address of the recipient
try {
InlineResponse200 result = apiInstance.corporateUserInvitationActionEmailPut(action, email);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MasterAccountApi#corporateUserInvitationActionEmailPut");
e.printStackTrace();
}
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
corporateUserRevokeEmailDelete(email)
Revoke an admin user
This endpoint allows to revoke/remove an invited member of your Admin account
// Import classes:
//import brevo.ApiClient;
//import brevo.ApiException;
//import brevo.Configuration;
//import brevo.auth.*;
//import brevoApi.MasterAccountApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");
// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");
MasterAccountApi apiInstance = new MasterAccountApi();
String email = "email_example"; // String | Email of the invited user
try {
apiInstance.corporateUserRevokeEmailDelete(email);
} catch (ApiException e) {
System.err.println("Exception when calling MasterAccountApi#corporateUserRevokeEmailDelete");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
String | Email of the invited user |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
GetAccountActivity getAccountActivity(startDate, endDate, limit, offset)
Get user activity logs
// Import classes:
//import brevo.ApiClient;
//import brevo.ApiException;
//import brevo.Configuration;
//import brevo.auth.*;
//import brevoApi.MasterAccountApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");
// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");
MasterAccountApi apiInstance = new MasterAccountApi();
String startDate = "startDate_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.
String endDate = "endDate_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.
Long limit = 10L; // Long | Number of documents per page
Long offset = 0L; // Long | Index of the first document in the page.
try {
GetAccountActivity result = apiInstance.getAccountActivity(startDate, endDate, limit, offset);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MasterAccountApi#getAccountActivity");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
startDate | 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] |
endDate | 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 | Long | Number of documents per page | [optional] [default to 10] |
offset | Long | Index of the first document in the page. | [optional] [default to 0] |
- Content-Type: application/json
- Accept: application/json
GetCorporateInvitedUsersList getCorporateInvitedUsersList()
Get the list of all admin users
This endpoint allows you to list all Admin users of your Admin account
// Import classes:
//import brevo.ApiClient;
//import brevo.ApiException;
//import brevo.Configuration;
//import brevo.auth.*;
//import brevoApi.MasterAccountApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");
// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");
MasterAccountApi apiInstance = new MasterAccountApi();
try {
GetCorporateInvitedUsersList result = apiInstance.getCorporateInvitedUsersList();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MasterAccountApi#getCorporateInvitedUsersList");
e.printStackTrace();
}
This endpoint does not need any parameter.
- Content-Type: application/json
- Accept: application/json
GetCorporateUserPermission getCorporateUserPermission(email)
Check admin user permissions
// Import classes:
//import brevo.ApiClient;
//import brevo.ApiException;
//import brevo.Configuration;
//import brevo.auth.*;
//import brevoApi.MasterAccountApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");
// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");
MasterAccountApi apiInstance = new MasterAccountApi();
String email = "email_example"; // String | Email of the invited user
try {
GetCorporateUserPermission result = apiInstance.getCorporateUserPermission(email);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MasterAccountApi#getCorporateUserPermission");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
String | Email of the invited user |
- Content-Type: application/json
- Accept: application/json
List<InlineResponse2001> getSubAccountGroups()
Get the list of groups
This endpoint allows you to list all groups created on your Admin account.
// Import classes:
//import brevo.ApiClient;
//import brevo.ApiException;
//import brevo.Configuration;
//import brevo.auth.*;
//import brevoApi.MasterAccountApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");
// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");
MasterAccountApi apiInstance = new MasterAccountApi();
try {
List<InlineResponse2001> result = apiInstance.getSubAccountGroups();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MasterAccountApi#getSubAccountGroups");
e.printStackTrace();
}
This endpoint does not need any parameter.
- Content-Type: application/json
- Accept: application/json
InviteAdminUser inviteAdminUser(sendInvitation)
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: false` then only privileges are required otherwise if `true` then it's assumed that all permissions will be there for the invited admin user.
// Import classes:
//import brevo.ApiClient;
//import brevo.ApiException;
//import brevo.Configuration;
//import brevo.auth.*;
//import brevoApi.MasterAccountApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");
// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");
MasterAccountApi apiInstance = new MasterAccountApi();
InviteAdminUser sendInvitation = new InviteAdminUser(); // InviteAdminUser | Payload to send an invitation
try {
InviteAdminUser result = apiInstance.inviteAdminUser(sendInvitation);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MasterAccountApi#inviteAdminUser");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
sendInvitation | InviteAdminUser | Payload to send an invitation |
- Content-Type: application/json
- Accept: application/json