All URIs are relative to https://api.brevo.com/v3
Method | HTTP request | Description |
---|---|---|
editUserPermission | POST /organization/user/update/permissions | Update permission for a user |
getInvitedUsersList | GET /organization/invited/users | Get the list of all your users |
getUserPermission | GET /organization/user/{email}/permissions | Check user permission |
inviteuser | POST /organization/user/invitation/send | Send invitation to user |
putRevokeUserPermission | PUT /organization/user/invitation/revoke/{email} | Revoke user permission |
putresendcancelinvitation | PUT /organization/user/invitation/{action}/{email} | Resend / Cancel invitation |
\Brevo\Client\Model\Inviteuser editUserPermission($updatePermissions)
Update permission for a user
Feature
- A Feature represents a specific functionality like Email campaign, Deals, Calls, Automations, etc. on Brevo. While inviting a user, determine which feature you want to manage access to. You must specify the feature accurately to avoid errors. Permission
- A Permission defines the level of access or control a user has over a specific feature. While inviting user, decide on the permission level required for the selected feature. Make sure the chosen permission is related to the selected feature. Features and their respective permissions are as below: - email_campaigns
: - "create_edit_delete" - "send_schedule_suspend" - sms_campaigns
: - "create_edit_delete" - "send_schedule_suspend" - contacts
: - "view" - "send_schedule_suspend" - "import" - "export" - "list_and_attributes" - "forms" - templates
: - "create_edit_delete" - "activate_deactivate" - workflows
: - "create_edit_delete" - "activate_deactivate_pause" - "settings" - facebook_ads
: - "create_edit_delete" - "schedule_pause" - landing_pages
: - "all" - transactional_emails
: - "settings" - "logs" - smtp_api
: - "smtp" - "api_keys" - "authorized_ips" - user_management
: - "all" - sales_platform
: - "manage_owned_deals_tasks_companies" - "manage_others_deals_tasks_companies" - "reports" - "settings" - phone
: - "all" - conversations
: - "access" - "assign" - "configure" - senders_domains_dedicated_ips
: - "senders_management" - "domains_management" - "dedicated_ips_management" - push_notifications
: - "view" - "create_edit_delete" - "send" - "settings" Note: - The privileges array remains the same as in the send invitation; the user simply needs to provide the permissions that need to be updated. - The availability of feature and its permission depends on your current plan. Please select the features and permissions accordingly.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api-key
$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer');
// Configure API key authorization: partner-key
$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer');
$apiInstance = new Brevo\Client\Api\UserApi(
// 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
);
$updatePermissions = new \Brevo\Client\Model\Inviteuser(); // \Brevo\Client\Model\Inviteuser | Values to update permissions for an invited user
try {
$result = $apiInstance->editUserPermission($updatePermissions);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UserApi->editUserPermission: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
updatePermissions | \Brevo\Client\Model\Inviteuser | Values to update permissions for an invited user |
\Brevo\Client\Model\Inviteuser
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Brevo\Client\Model\GetInvitedUsersList getInvitedUsersList()
Get the list of all your users
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api-key
$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer');
// Configure API key authorization: partner-key
$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer');
$apiInstance = new Brevo\Client\Api\UserApi(
// 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->getInvitedUsersList();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UserApi->getInvitedUsersList: ', $e->getMessage(), PHP_EOL;
}
?>
This endpoint does not need any parameter.
\Brevo\Client\Model\GetInvitedUsersList
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Brevo\Client\Model\GetUserPermission getUserPermission($email)
Check user permission
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api-key
$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer');
// Configure API key authorization: partner-key
$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer');
$apiInstance = new Brevo\Client\Api\UserApi(
// 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
);
$email = "email_example"; // string | Email of the invited user.
try {
$result = $apiInstance->getUserPermission($email);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UserApi->getUserPermission: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
string | Email of the invited user. |
\Brevo\Client\Model\GetUserPermission
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Brevo\Client\Model\Inviteuser inviteuser($sendInvitation)
Send invitation to user
Feature
- A Feature represents a specific functionality like Email campaign, Deals, Calls, Automations, etc. on Brevo. While inviting a user, determine which feature you want to manage access to. You must specify the feature accurately to avoid errors. Permission
- A Permission defines the level of access or control a user has over a specific feature. While inviting user, decide on the permission level required for the selected feature. Make sure the chosen permission is related to the selected feature. Features and their respective permissions are as below: - email_campaigns
: - "create_edit_delete" - "send_schedule_suspend" - sms_campaigns
: - "create_edit_delete" - "send_schedule_suspend" - contacts
: - "view" - "send_schedule_suspend" - "import" - "export" - "list_and_attributes" - "forms" - templates
: - "create_edit_delete" - "activate_deactivate" - workflows
: - "create_edit_delete" - "activate_deactivate_pause" - "settings" - facebook_ads
: - "create_edit_delete" - "schedule_pause" - landing_pages
: - "all" - transactional_emails
: - "settings" - "logs" - smtp_api
: - "smtp" - "api_keys" - "authorized_ips" - user_management
: - "all" - sales_platform
: - "manage_owned_deals_tasks_companies" - "manage_others_deals_tasks_companies" - "reports" - "settings" - phone
: - "all" - conversations
: - "access" - "assign" - "configure" - senders_domains_dedicated_ips
: - "senders_management" - "domains_management" - "dedicated_ips_management" - push_notifications
: - "view" - "create_edit_delete" - "send" - "settings" 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 user. - The availability of feature and its permission depends on your current plan. Please select the features and permissions accordingly.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api-key
$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer');
// Configure API key authorization: partner-key
$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer');
$apiInstance = new Brevo\Client\Api\UserApi(
// 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
);
$sendInvitation = new \Brevo\Client\Model\Inviteuser(); // \Brevo\Client\Model\Inviteuser | Values to create an invitation
try {
$result = $apiInstance->inviteuser($sendInvitation);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UserApi->inviteuser: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
sendInvitation | \Brevo\Client\Model\Inviteuser | Values to create an invitation |
\Brevo\Client\Model\Inviteuser
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Brevo\Client\Model\PutRevokeUserPermission putRevokeUserPermission($email)
Revoke user permission
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api-key
$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer');
// Configure API key authorization: partner-key
$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer');
$apiInstance = new Brevo\Client\Api\UserApi(
// 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
);
$email = "email_example"; // string | Email of the invited user.
try {
$result = $apiInstance->putRevokeUserPermission($email);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UserApi->putRevokeUserPermission: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
string | Email of the invited user. |
\Brevo\Client\Model\PutRevokeUserPermission
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Brevo\Client\Model\Putresendcancelinvitation putresendcancelinvitation($action, $email)
Resend / Cancel invitation
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api-key
$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('api-key', 'Bearer');
// Configure API key authorization: partner-key
$config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKey('partner-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Brevo\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('partner-key', 'Bearer');
$apiInstance = new Brevo\Client\Api\UserApi(
// 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
);
$action = "action_example"; // string | action
$email = "email_example"; // string | Email of the invited user.
try {
$result = $apiInstance->putresendcancelinvitation($action, $email);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UserApi->putresendcancelinvitation: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
action | string | action | |
string | Email of the invited user. |
\Brevo\Client\Model\Putresendcancelinvitation
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]