Activities timeline
A single chronological feed over CRM touches and Advanced Booking audit events. Replace 10 separate queries (contact + deals + invoices + mails + calls + workorders + ...) with one API call. Filter by parent, date range or activity type. Scope: platform.activities.read.
Endpoint
GET /api/workspace/v1/activities
Query parameters
parent_type+parent_id— scope to one parent. Must be provided together.from+to— ISO 8601 timestamps, inclusive window.types— comma-separated whitelist (max 20 values).source—crm,huborall(default).limit— 1-200, default 50.starting_after— ISO timestamp from previousnext_cursor. Returns rows strictly older than this.
Example
curl "https://app.staffifyai.com/api/workspace/v1/activities?parent_type=contact&parent_id=1893&from=2026-01-01T00:00:00Z&limit=50" \ -H "Authorization: Bearer $STAFFIFY_API_KEY"
Supported parents
| parent_type | source | Description |
|---|---|---|
| contact | crm | CRM contact-touch log (calls, emails, chats, deal changes, imports, merges). |
| deal | crm | CRM deal lifecycle (created, stage_changed, won, lost, pipeline_moved). |
| booking | hub | Advanced Booking entry audit (created, status changes, assignment, invoiced). |
| customer | hub | Advanced Booking customer touches. |
| invoice | hub | Advanced Booking invoice audit (sent, paid, voided). |
| quote | hub | Advanced Booking quote audit. |
| service | hub | Service catalog edits. |
| team_member | hub | Team member lifecycle. |
| settings | hub | Tenant settings changes. |
| flow | hub | Automation flow run audit. |
| campaign | hub | Marketing campaign audit. |
| segment | hub | Segment edits. |
| system | hub | System-level events (cron, platform migrations). |
Activity object
| Field | Type | Description |
|---|---|---|
| id | string | Prefixed with source — e.g. crm_1234 or hub_5678. Globally unique. |
| source | 'crm' | 'hub' | Which underlying log this came from. |
| type | string | CRM: call, email, deal_stage_changed, ... Hub: booking_created, invoice_sent, ... |
| parent_type | string | null | Resolved parent class (see table above). |
| parent_id | integer | null | Primary key of the parent resource. |
| actor_type | string | user | customer | ai | system. Hub rows carry this natively. CRM rows always return system. |
| actor_id | integer | null | User id when applicable. |
| timestamp | string (ISO) | When the activity happened. |
| summary | string | null | Human-readable one-liner. Only CRM rows carry this field. |
| payload | object | null | Parsed from metadata (CRM) or payload_json (hub). Free-form, type-specific. |