Action Centre API
All endpoints require authentication and action-centre tool permissions.
Combined Page Load
Section titled “Combined Page Load”GET /api/action-items/centreSingle endpoint returning everything the Action Centre page needs.
Query parameters:
| Param | Type | Description |
|---|---|---|
sprint_id | string | Load a specific sprint instead of auto-detecting the active one |
Response:
{ "action_items": [...], "counts": { "overdue": 3, "today": 5, "this_week": 12, "total": 20, "by_module": { "deals": 4, "clients": 6, ... } }, "preferences": [...], "show_work_board": true, "current_sprint": { "id", "name", "start_date", "end_date", "project_id", "project_name", "company_name" }, "sprint_tasks": [...], "backlog_tasks": [...], "sprint_adjacent": { "previous": { "id", "name" }, "next": { "id", "name" } }}List Action Items
Section titled “List Action Items”GET /api/action-itemsQuery parameters:
| Param | Type | Description |
|---|---|---|
source_module | string | Filter by module (comma-separated) |
source_type | string | Filter by type (comma-separated) |
urgency | string | Filter by urgency: overdue, today, this_week, normal |
company_id | string | Filter by company |
assigned_to | string | Filter by assigned user (exec/head only) |
is_completed | number | 0 for open (default), 1 for completed |
page | number | Page number (default: 1) |
limit | number | Items per page (default: 50, max: 100) |
Scoping: Employee/Lead/Manager see only items assigned to them. Head/Executive can see all.
Response: { action_items: [...] }
Get Counts
Section titled “Get Counts”GET /api/action-items/countsReturns counts grouped by module and urgency. Used for filter tab badges.
Response:
{ "overdue": 3, "today": 5, "this_week": 12, "total": 20, "by_module": { "deals": 4, "clients": 6, "invoices": 2 }}Create Action Item
Section titled “Create Action Item”POST /api/action-itemsCreates a manual action item. Permission: action-centre update.
Request body:
| Field | Type | Required | Description |
|---|---|---|---|
title | string | Yes | Action item title |
description | string | No | Detailed description |
company_id | string | No | Associated company |
contact_id | string | No | Associated contact |
deal_id | string | No | Associated deal |
project_id | string | No | Associated project |
assigned_to | string | No | Assigned user (defaults to current user) |
due_date | string | No | Due date (ISO 8601) |
notes | string | No | Notes |
Response: { action_item: {...} } (201)
Update Action Item
Section titled “Update Action Item”PATCH /api/action-items/:idUpdatable fields: title, assigned_to, due_date, notes, urgency
Urgency is auto-recalculated if due_date changes.
Response: { action_item: {...} }
Complete Action Item
Section titled “Complete Action Item”POST /api/action-items/:id/completeMarks the item as completed. If the source module is relationships, also marks the linked relationship_auto_action as done.
Response: { success: true }
Delete Action Item
Section titled “Delete Action Item”DELETE /api/action-items/:idOnly manual action items can be deleted. Returns 400 for auto/granola/cron items.
Requires update permission on action-centre. Users can delete their own manual action items (where created_by matches the current user). Users with manage permission can delete any manual action item. Returns 403 when neither condition is met.
Response: { success: true }
Get Preferences
Section titled “Get Preferences”GET /api/action-items/preferencesReturns the current user’s module visibility preferences. Empty array means role defaults apply.
Response: { preferences: [...] }
Update Preferences
Section titled “Update Preferences”PUT /api/action-items/preferencesRequest body:
{ "preferences": [ { "source_module": "deals", "is_visible": 1, "show_work_board": 1 }, { "source_module": "invoices", "is_visible": 0, "show_work_board": 1 } ]}Response: { success: true }