Invited Users Management

You can manage users in your Brevo profile. This guide helps the profile owner to manage their users, edit the invited users access permission and delete users through the API endpoints. The endpoints are mentioned below.

Get all invited users

This API endpoint allows you to retrieve your invited users. To send a request to this endpoint, you need to use the GET method and use the url https://api.brevo.com/v3/organization/invited/users . You can use the cURL request below:

curl --request GET \
     --url https://api.brevo.com/v3/organization/invited/users \
     --header 'accept: application/json' \
     --header 'api-key: '

There are no parameters for this endpoint as it is a GET request so you just need your API-key to run the endpoint and it will send you the response as a string in JSON mentioning the users that are already invited to your user account. The response codes are mentioned below in a table.

Response codeMessageDescription
200List of all usersDisplays list of invited users, their status and the features they are using and other details.
400Bad requestBad request due to invalid_parameters or missing_parameters

A sample JSON response is shown below which consists of all the users and their details in the accounts including the owners and invited users.

{
  "users": [
    {
      "email": "[email protected]",
      "is_owner": true,
      "status": "active",
      "feature_access": {
        "marketing": "owner",
        "conversations": "owner",
        "crm": "owner"
      }
    },
    {
      "email": "[email protected]",
      "is_owner": false,
      "status": "pending",
      "feature_access": {
        "marketing": "custom",
        "conversations": "none",
        "crm": "full"
      }
    },
    {
      "email": "[email protected]",
      "is_owner": false,
      "status": "active",
      "feature_access": {
        "marketing": "none",
        "conversations": "full",
        "crm": "none"
      }
    }
  ]
}

Get users permissions

This API endpoint https://api.brevo.com/v3/organization/user/{email}/permissions allows to get the permissions for the invited user. You can implement the GET method to send a request to this endpoint and you can use the cURL request below:

curl --request GET \
     --url https://api.brevo.com/v3/organization/user/example%40brevo.com/permissions \
     --header 'accept: application/json' \
     --header 'api-key: '

You only have to send one parameter email in the request which is mentioned below along with its details.

AttributeDatatypeDescriptionValue
emailStringEmail for the invited user[email protected]

After the successful request, you get a response which consists of the features that the invited user uses and its permissions. The schema with the 200 response code for the response would look something like this:

{
  "email": "[email protected]",
  "status": "active",
  "privileges": [
    {
      "feature": "Email campaign",
      "permissions": [
        "Create / edit / delete",
        "Send / schedule / suspend"
      ]
    },
    {
      "feature": "Templates",
      "permissions": [
        "Create / edit / delete",
        "Activate / deactivate"
      ]
    },
    {
      "feature": "SMS campaign",
      "permissions": [
        "Create / edit / delete",
        "Send / schedule / suspend"
      ]
    },
    {
      "feature": "Facebook Ads",
      "permissions": [
        "Schedule / pause"
      ]
    },
    {
      "feature": "Landing pages",
      "permissions": [
        "All"
      ]
    },
    {
      "feature": "Workflows",
      "permissions": [
        "Create / edit / delete",
        "Activate / deactivate / Pause"
      ]
    },
    {
      "feature": "Contacts",
      "permissions": [
        "View",
        "Contact forms"
      ]
    },
    {
      "feature": "API keys",
      "permissions": [
        "All"
      ]
    },
    {
      "feature": "User management",
      "permissions": [
        "None"
      ]
    },
    {
      "feature": "Sales Platform",
      "permissions": [
        "All"
      ]
    },
    {
      "feature": "Conversations",
      "permissions": [
        "None"
      ]
    }
  ]
}

For the 400 bad request, the schema would look something like this:

{
  "code": "method_not_allowed",
  "message": "POST Method is not allowed on this path"
}

The response codes are mentioned below in a table.

Response codeMessageDescription
200SuccessAll the details like users status in the account and his privileges are displayed in the JSON response along with the users email.
400Bad requestBad request due to incorrect parameters like the email format could be wrong or you account does not support inviting users.

Resend / Cancel Invitation

The endpoint https://api.brevo.com/v3/organization/user/invitation/{action}/{email} uses the HTTP PUT method to run the request. This endpoint performs actions on the invited users access to the account. This API endpoint resends, cancels or revokes the users access to the account. It has two parameters mentioned below in the table.

AttributeDatatypeDescriptionValue
actionStringThe action to be performed on the invited userresend, cancel
emailStringEmail of the invited user[email protected]

The response shows an OK status if the request runs successfully. An example 200 successful response would look like:

{
  "status": "OK",
  "credit_notes": [
    "TEST-123"
  ]
}

On the other hand, you may not have access to change the users rights of access. So, a sample error response with code 403 would look something like:

{
  "message": "string",
  "developer_message": "string"
}

A table below mentions the response codes.

Response codesMessageDescription
200SuccessThe PUT request is successful and the access rights are updated for the invited user.
403Unauthorized accessYou do not have access to resend or cancel an invitation

Revoke a users permission

You can revoke or stop giving access to an invited user through this endpoint. You can use the endpoint https://api.brevo.com/v3/organization/user/invitation/revoke/{email} with the HTTP method PUT as you are updating the rights for an invited user. A cURL request is depicted below to send a request.

curl --request PUT \
     --url https://api.brevo.com/v3/organization/user/invitation/revoke/revokeduser%40email.com \
     --header 'accept: application/json' \
     --header 'api-key: '

There is only one attribute for this mentioned and defined below in a table.

AttributeDatatypeDescriptionValue
exampleStringEmail of the user whose access is to be revoked[email protected]

After the request is successful, a JSON response is shown with two response codes 200 and 403. We will define them below in a table.

Response codeMessageDescription
200Credit note existsUsers access to the account is revoked
403Unauthorized accessYou are not authorized to revoke an access for any user

A JSON response is also shown below.

{
  "status": "OK",
  "credit_notes": [
    "TEST-123"
  ]
}

Send an invitation to the user

You can invite a user by using this endpoint. You can send an invitation to them and they will receive an email to join your account to access certain features. You can use the endpoint https://api.brevo.com/v3/organization/user/invitation/send with the HTTP method POST to run the request. A cURL request for inviting the user would look something like this.

curl --request POST \
     --url https://api.brevo.com/v3/organization/user/invitation/send \
     --header 'accept: application/json' \
     --header 'api-key: ' \
     --header 'content-type: application/json' \
     --data '
{
  "all_features_access": false,
  "email": "[email protected]",
  "privileges": [
    {
      "feature": "sms_campaigns",
      "permissions": [
        "view",
        "create_edit_delete"
      ]
    },
    {
      "feature": "transactional_emails",
      "permissions": [
        "activate_deactivate",
        "settings"
      ]
    }
  ]
}

You can navigate to the API reference and you can find more details on the parameters for this endpoint. You can find the parameters below to invite the user to the platform.

AttributeDatatypeDescriptionValue
emailStringEmail of the invited user[email protected]
all_features_accessBooleanDescribes if all the features can be accessed by the user or nottrue or false
privilegesObjectObject showing the features for the user and its permissionsfeature, permissions

There are some pre-defined values for features and permissions and the user has to choose from them. For the privileges object, we will define its attributes below:

AttributeDatatypeDescriptionValue
featuresStringThe features offered from BrevoSome of the features are landing_pages, api-keys, sales_platform, user_management and phone
permissionsStringPermissions for the featuresSome of the permissions areall or send_schedule_suspend or create_edit_delete

For the JSON response, there are some error codes which are defined below in a table.

Response codeMessageDescription
200{ "status": "ok" }The invitation is sent successfully.
400invalid_invitation_requestThe invitation request is not valid due to errors like invalid plan for inviting users or user limit is reached.
403access_deniedAccess is denied to invite users

A JSON response is displayed below.

{
  "status": "OK",
  "credit_notes": [
    "TEST-123"
  ],
  "invoice_id": "string"
}

Update users permissions

This endpoint allows to update the permissions for the invited users. You can use the endpoint https://api.brevo.com/v3/organization/user/update/permissions with the calling method POST to send the payload for the request. A cURL request is shown below.

curl --request POST \
     --url https://api.brevo.com/v3/organization/user/update/permissions \
     --header 'accept: application/json' \
     --header 'api-key: ' \
     --header 'content-type: application/json' \
     --data '
{
  "all_features_access": true,
  "email": "[email protected]"
}
'

You can navigate to the API reference and you can find more details on the parameters for this endpoint. The parameters used are almost similar to sending an invitation to the user. They are mentioned below in a table

AttributeDatatypeDescriptionValue
emailStringEmail of the invited user[email protected]
all_features_accessBooleanDescribes if all the features can be accessed by the user or nottrue or false
privilegesObjectObject showing the features for the user and its permissionsfeature, permissions

For the privileges object, we will define its attributes below:

AttributeDatatypeDescriptionValue
featuresStringThe features offered from BrevoSome of the features are landing_pages, api-keys, sales_platform, user_management and phone
permissionsStringPermissions for the featuresall or none

For the JSON response, there are some error codes which are defined below in a table.

Response codeMessageDescription
200{ "status": "ok" }The invitation is sent successfully.
400invalid_invitation_requestThe invitation request is not valid due to errors like invalid plan for inviting users or user limit is reached.
403access_deniedAccess is denied to invite users

For the 200 success response code the response format would look something like depicted below.

{
  "status": "OK",
  "credit_notes": [
    "TEST-123"
  ],
  "invoice_id": "string"
}