Skip to content

Latest commit

 

History

History
358 lines (263 loc) · 15.8 KB

UserApi.md

File metadata and controls

358 lines (263 loc) · 15.8 KB

brevo_python.UserApi

All URIs are relative to https://api.brevo.com/v3

Method HTTP request Description
edit_user_permission POST /organization/user/update/permissions Update permission for a user
get_invited_users_list GET /organization/invited/users Get the list of all your users
get_user_permission GET /organization/user/{email}/permissions Check user permission
inviteuser POST /organization/user/invitation/send Send invitation to user
put_revoke_user_permission PUT /organization/user/invitation/revoke/{email} Revoke user permission
putresendcancelinvitation PUT /organization/user/invitation/{action}/{email} Resend / Cancel invitation

edit_user_permission

Inviteuser edit_user_permission(update_permissions)

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" - "create_edit_delete" - "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" - "manage_others_deals_tasks" - "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" - companies: - "manage_owned_companies" - "manage_other_companies" - "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

from __future__ import print_function
import time
import brevo_python
from brevo_python.rest import ApiException
from pprint import pprint

# Configure API key authorization: api-key
configuration = brevo_python.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
configuration = brevo_python.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'

# create an instance of the API class
api_instance = brevo_python.UserApi(brevo_python.ApiClient(configuration))
update_permissions = brevo_python.Inviteuser() # Inviteuser | Values to update permissions for an invited user

try:
    # Update permission for a user
    api_response = api_instance.edit_user_permission(update_permissions)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UserApi->edit_user_permission: %s\n" % e)

Parameters

Name Type Description Notes
update_permissions Inviteuser Values to update permissions for an invited user

Return type

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]

get_invited_users_list

GetInvitedUsersList get_invited_users_list()

Get the list of all your users

Example

from __future__ import print_function
import time
import brevo_python
from brevo_python.rest import ApiException
from pprint import pprint

# Configure API key authorization: api-key
configuration = brevo_python.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
configuration = brevo_python.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'

# create an instance of the API class
api_instance = brevo_python.UserApi(brevo_python.ApiClient(configuration))

try:
    # Get the list of all your users
    api_response = api_instance.get_invited_users_list()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UserApi->get_invited_users_list: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

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]

get_user_permission

GetUserPermission get_user_permission(email)

Check user permission

Example

from __future__ import print_function
import time
import brevo_python
from brevo_python.rest import ApiException
from pprint import pprint

# Configure API key authorization: api-key
configuration = brevo_python.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
configuration = brevo_python.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'

# create an instance of the API class
api_instance = brevo_python.UserApi(brevo_python.ApiClient(configuration))
email = 'email_example' # str | Email of the invited user.

try:
    # Check user permission
    api_response = api_instance.get_user_permission(email)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UserApi->get_user_permission: %s\n" % e)

Parameters

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

Return type

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

Inviteuser inviteuser(send_invitation)

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" - "create_edit_delete" - "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" - "manage_others_deals_tasks" - "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" - companies: - "manage_owned_companies" - "manage_other_companies" - "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

from __future__ import print_function
import time
import brevo_python
from brevo_python.rest import ApiException
from pprint import pprint

# Configure API key authorization: api-key
configuration = brevo_python.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
configuration = brevo_python.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'

# create an instance of the API class
api_instance = brevo_python.UserApi(brevo_python.ApiClient(configuration))
send_invitation = brevo_python.Inviteuser() # Inviteuser | Values to create an invitation

try:
    # Send invitation to user
    api_response = api_instance.inviteuser(send_invitation)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UserApi->inviteuser: %s\n" % e)

Parameters

Name Type Description Notes
send_invitation Inviteuser Values to create an invitation

Return type

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]

put_revoke_user_permission

PutRevokeUserPermission put_revoke_user_permission(email)

Revoke user permission

Example

from __future__ import print_function
import time
import brevo_python
from brevo_python.rest import ApiException
from pprint import pprint

# Configure API key authorization: api-key
configuration = brevo_python.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
configuration = brevo_python.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'

# create an instance of the API class
api_instance = brevo_python.UserApi(brevo_python.ApiClient(configuration))
email = 'email_example' # str | Email of the invited user.

try:
    # Revoke user permission
    api_response = api_instance.put_revoke_user_permission(email)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UserApi->put_revoke_user_permission: %s\n" % e)

Parameters

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

Return type

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

Putresendcancelinvitation putresendcancelinvitation(action, email)

Resend / Cancel invitation

Example

from __future__ import print_function
import time
import brevo_python
from brevo_python.rest import ApiException
from pprint import pprint

# Configure API key authorization: api-key
configuration = brevo_python.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
configuration = brevo_python.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'

# create an instance of the API class
api_instance = brevo_python.UserApi(brevo_python.ApiClient(configuration))
action = 'action_example' # str | action
email = 'email_example' # str | Email of the invited user.

try:
    # Resend / Cancel invitation
    api_response = api_instance.putresendcancelinvitation(action, email)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UserApi->putresendcancelinvitation: %s\n" % e)

Parameters

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

Return type

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]