Accounts and settings

User activity logs

Getting started with Accounts

Brevo accounts hold account information along with payment plans and client credit details. Prerequisites for using the Accounts endpoints:

  1. A valid Brevo account.
  2. A valid API key.
  3. Some endpoints are limited to Enterprise clients.

1. Get user activity logs

Send a GET request to https://api.brevo.com/v3/organization/activities. This endpoint returns information about:

  • User login.
  • User invitations to access the account.
  • Profile edits.
  • Invited users accessing the account.
  • User email changes.

Sample cURL request for getaccountactivity:

1curl --request GET \
2 --url 'https://api.brevo.com/v3/organization/activities?startDate=2023-01-01&endDate=2023-02-01&limit=10&offset=0' \
3 --header 'accept: application/json' \
4 --header 'api-key: '

This endpoint is available to Enterprise clients. Endpoint attributes:

AttributeDatatypeDescriptionValue
startDateStringMandatory if endDate is used. Enter start date in the (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.2023-01-01
endDateStringMandatory if startDate is used. Enter end date in(YYYY-MM-DD) format to filter the activity in your account. Maximum time period that can be selected is one month.2023-02-01
limitInt64Number of documents per page10
offsetInt64Index of the first document in the page.0

Response

Sample JSON response showing login and profile-update activity:

1{
2 “logs”: [
3 {
4 “action”: “login-success”,
5 “date”: “2023-03-16T16:49:23+05:30”,
6 “user_email”: “test@mycompany.com”,
7 “user_ip”: “192.158.1.34”,
8 “user_agent”: “Mozilla/5.0 (iPad; U; CPU OS 3_2_1 like Mac OS X; en-us)”
9 },
10 {
11 “action”: “update-profile”,
12 “date”: “2023-03-15T16:49:23+05:30”,
13 “user_email”: “test@myexample.com”,
14 “user_ip”: “192.158.1.38”,
15 “user_agent”: “Mozilla/5.0 (iPad; U; CPU OS 3_2_1 like Mac OS X; en-us)“,
16 “count”: 2
17 }
18 ]
19}

Response codes:

Response codeMessageDescription
200List of user activity logsReturns the user activity logs.
400Bad requestReturned for errors such as invalid_parameter, permission_denied, or not_enough_credits, including when the account is not on the Enterprise plan.