Skip to main content

Bit CRM Activity History API Documentation for Developers

Estimated reading: 4 minutes 25 views

The Activity History API exposes the change log Bit CRM keeps for CRM records, creations, field updates, tag changes, notes, and other events, each stamped with who did it and when. It is read-only. Both endpoints require the capability bit_crm_history_view and are authenticated with an API key, see Introduction & Authentication.

List a record’s history

GET /activity-logs/index — requires capability bit_crm_history_view. Returns the full history of one record, newest first. Parameters go in the query string.

  • module — string, required. The record’s module, e.g. contact, lead, company, deal.
  • entity_id — integer, required. The record’s ID.
GET https://your-site.com/wp-json/bit-crm-sales-marketing-automation/v1/activity-logs/index
  • Bash
  • PHP
  • JavaScript
curl "https://your-site.com/wp-json/bit-crm-sales-marketing-automation/v1/activity-logs/index?module=contact&entity_id=42" \
  --user "your-username:YOUR API KEY"
$ch = curl_init('https://your-site.com/wp-json/bit-crm-sales-marketing-automation/v1/activity-logs/index?module=contact&entity_id=42');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_USERPWD        => 'your-username:YOUR API KEY',
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const response = await fetch('https://your-site.com/wp-json/bit-crm-sales-marketing-automation/v1/activity-logs/index?module=contact&entity_id=42', {
  headers: { 'Authorization': 'Basic ' + btoa('your-username:YOUR API KEY') },
});
const result = await response.json();

Example response — data is an array of log entries; details is a human-readable sentence with the actor’s display name already filled in:

{
  "status": "success",
  "code": "SUCCESS",
  "data": [
    {
      "id": 210,
      "event": "updated",
      "title": "Contact updated",
      "entity_id": 42,
      "module": "contact",
      "details": "Jane Admin changed Email from [email protected] to [email protected]",
      "created_by": 1,
      "updated_by": null,
      "created_by_name": "Jane Admin",
      "created_at": "2026-08-05 09:12:00"
    },
    {
      "id": 184,
      "event": "created",
      "title": "Contact created",
      "entity_id": 42,
      "module": "contact",
      "details": "Jane Admin created this contact",
      "created_by": 1,
      "updated_by": null,
      "created_by_name": "Jane Admin",
      "created_at": "2026-08-04 10:30:00"
    }
  ]
}

Browse all history (Pro)

GET /activity-logs/all — requires capability bit_crm_history_view. Browses the history of every record on the site, paginated and filterable — the same data that powers the Activity History screen in the CRM. This is a Bit CRM Pro endpoint: it works only while the Pro plugin is active, and it uses the Pro base URL:

https://your-site.com/wp-json/bit-crm-sales-marketing-automation-pro/v1

Parameters go in the query string:

  • page — integer, optional, default 1.
  • perPage — integer, optional, default 20.
  • module — string, optional. Limits results to one module, e.g. contact; all (or omitting the parameter) returns every module.
  • searchTerm — string, optional. Matches the log title, event, and details.
  • startDate / endDate — strings, optional, e.g. 2026-08-01. Both must be sent together to filter by date range (site timezone).
  • sortOrder — asc or desc, optional, default desc (newest first).
GET https://your-site.com/wp-json/bit-crm-sales-marketing-automation-pro/v1/activity-logs/all
  • Bash
  • PHP
  • JavaScript
curl "https://your-site.com/wp-json/bit-crm-sales-marketing-automation-pro/v1/activity-logs/all?page=1&module=contact&startDate=2026-08-01&endDate=2026-08-05" \
  --user "your-username:YOUR API KEY"
$ch = curl_init('https://your-site.com/wp-json/bit-crm-sales-marketing-automation-pro/v1/activity-logs/all?page=1&module=contact&startDate=2026-08-01&endDate=2026-08-05');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_USERPWD        => 'your-username:YOUR API KEY',
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const response = await fetch('https://your-site.com/wp-json/bit-crm-sales-marketing-automation-pro/v1/activity-logs/all?page=1&module=contact&startDate=2026-08-01&endDate=2026-08-05', {
  headers: { 'Authorization': 'Basic ' + btoa('your-username:YOUR API KEY') },
});
const result = await response.json();

Example response — a paginated object; rows have the same shape as List a record’s history:

{
  "status": "success",
  "code": "SUCCESS",
  "data": {
    "data": [
      {
        "id": 210,
        "event": "updated",
        "title": "Contact updated",
        "entity_id": 42,
        "module": "contact",
        "details": "Jane Admin changed Email from [email protected] to [email protected]",
        "created_by": 1,
        "created_by_name": "Jane Admin",
        "created_at": "2026-08-05 09:12:00"
      }
    ],
    "pages": 1,
    "total": 1,
    "current_total": 1,
    "current_page": 1,
    "last_page": 1,
    "per_page": 20
  }
}

Share this Doc

Bit CRM Activity History API Documentation for Developers

Or copy link

CONTENTS

Subscribe

×
Cancel