Activity API
The activity module keeps the system activity log (what staff, clients and the cron did), the API request log and the sent email history. These calls read the logs and add entries of your own. See Security checks and activity logs for the screens and the retention settings.
Admin calls need Module access on the Activity card of the staff group’s Permissions tab, plus each call’s own permission below (Super Administrators have all). See Authentication.
Admin calls
Section titled “Admin calls”log_get_list
Section titled “log_get_list”POST /api/admin/activity/log_get_list
Lists the entries of the system activity log, newest first, as on Activity → System Activity.
Permission: View activity log (activity.view)
| Parameter | Type | Description |
|---|---|---|
search |
string | Text the message contains. |
priority |
integer | Only entries of exactly this priority (0 emergency to 7 debug). Takes the place of min_priority. |
min_priority |
integer | Only entries of this priority or more important (a lower or equal number). Default 6, so debug entries (7) are left out. |
user_filter |
string | only_staff for entries with a staff member, only_clients for entries with a client. |
admin_id |
integer | Only entries of this staff member. |
client_id |
integer | Only entries of this client. |
ip |
string | Only entries from this IP address (exact match). |
date_from |
string | First day to include, such as 2026-11-01. |
date_to |
string | Last day to include, such as 2026-11-30. |
page |
integer | Page number, from 1. Default 1. |
per_page |
integer | Rows per page, 1 to 500. Default 100. |
Returns: A paged list. Each row has id, priority, admin_id, client_id, message, ip, created_at, staff_id, staff_name, staff_email, client_name, client_email, and, when the entry has one, a staff object (id, name, email) and a client object (id, name, email).
Example
Request parameters:
{ "client_id": 12, "per_page": 1}result:
{ "pages": 9, "page": 1, "per_page": 1, "total": 9, "list": [ { "id": 88, "priority": 6, "admin_id": null, "client_id": 12, "message": "Client #12 logged in", "ip": "203.0.113.20", "created_at": "2026-11-17 10:02:11", "staff_id": null, "staff_name": null, "staff_email": null, "client_name": "Jane Doe", "client_email": "jane@example.com", "client": { "id": 12, "name": "Jane Doe", "email": "jane@example.com" } } ]}api_log_get_list
Section titled “api_log_get_list”POST /api/admin/activity/api_log_get_list
Lists the API request log, newest first, as on the API log tab of Activity → System Activity. Requests are logged only for the sources ticked in the API log settings.
Permission: View activity log (activity.view)
| Parameter | Type | Description |
|---|---|---|
source |
string | api_key (staff API keys), webhook (payment gateway notices), staff (the admin pages’ API calls) or client (client and guest changes). |
admin_id |
integer | Only requests of this staff member. |
client_id |
integer | Only requests of this client. |
call |
string | Part of the API call or path, such as invoice_. |
date_from |
string | First day to include, such as 2026-11-01. |
date_to |
string | Last day to include. |
page |
integer | Page number, from 1. Default 1. |
per_page |
integer | Rows per page, 1 to 500. Default 100. |
Returns: A paged list. Each row has id, source, method (the HTTP method), api_call, admin_id, client_id, ip, status (the HTTP status), result (ok or the error message), duration_ms, params (the request’s parameters as JSON, with every value that could be a secret shown as ********), created_at, staff_name, client_first_name and client_last_name.
POST /api/admin/activity/log
Adds an entry to the system activity log.
Permission: Log activity (activity.manage)
| Parameter | Type | Description |
|---|---|---|
m |
string, required | The message. Without it nothing is logged and the call returns false. |
priority |
integer | 0 (emergency) to 7 (debug). Default 6 (information). |
client_id |
integer | The client the entry is about. |
admin_id |
integer | The staff member the entry is about. |
Returns: true when the entry was added, false when m is missing.
The entry records the caller’s IP address (none while the demo module is active).
Example
Request parameters:
{ "m": "Nightly sync finished", "priority": 6}result:
truelog_email
Section titled “log_email”POST /api/admin/activity/log_email
Adds a message to the sent email history, for example an email your own system sent to a client.
Permission: Log activity (activity.manage)
| Parameter | Type | Description |
|---|---|---|
subject |
string, required | The email’s subject. Without it nothing is logged and the call returns false. |
client_id |
integer | The client the email went to; it then shows in the client’s email history. |
sender |
string | The sender address. |
recipients |
string | The recipient address or addresses. |
content_html |
string | The HTML body. |
content_text |
string | The plain-text body. |
Returns: true when the email was logged, false when subject is missing.
This only records the email: nothing is sent.

