Skip to content

Latest commit

 

History

History
358 lines (263 loc) · 17.1 KB

UserApi.md

File metadata and controls

358 lines (263 loc) · 17.1 KB

Brevo\Client\UserApi

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

editUserPermission

\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.

Example

<?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;
}
?>

Parameters

Name Type Description Notes
updatePermissions \Brevo\Client\Model\Inviteuser Values to update permissions for an invited user

Return type

\Brevo\Client\Model\Inviteuser

Authorization

api-key, partner-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getInvitedUsersList

\Brevo\Client\Model\GetInvitedUsersList getInvitedUsersList()

Get the list of all your users

Example

<?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;
}
?>

Parameters

This endpoint does not need any parameter.

Return type

\Brevo\Client\Model\GetInvitedUsersList

Authorization

api-key, partner-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getUserPermission

\Brevo\Client\Model\GetUserPermission getUserPermission($email)

Check user permission

Example

<?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;
}
?>

Parameters

Name Type Description Notes
email string Email of the invited user.

Return type

\Brevo\Client\Model\GetUserPermission

Authorization

api-key, partner-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

inviteuser

\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.

Example

<?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;
}
?>

Parameters

Name Type Description Notes
sendInvitation \Brevo\Client\Model\Inviteuser Values to create an invitation

Return type

\Brevo\Client\Model\Inviteuser

Authorization

api-key, partner-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

putRevokeUserPermission

\Brevo\Client\Model\PutRevokeUserPermission putRevokeUserPermission($email)

Revoke user permission

Example

<?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;
}
?>

Parameters

Name Type Description Notes
email string Email of the invited user.

Return type

\Brevo\Client\Model\PutRevokeUserPermission

Authorization

api-key, partner-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

putresendcancelinvitation

\Brevo\Client\Model\Putresendcancelinvitation putresendcancelinvitation($action, $email)

Resend / Cancel invitation

Example

<?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;
}
?>

Parameters

Name Type Description Notes
action string action
email string Email of the invited user.

Return type

\Brevo\Client\Model\Putresendcancelinvitation

Authorization

api-key, partner-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]