Skip to content

Action Centre API

All endpoints require authentication and action-centre tool permissions.

GET /api/action-items/centre

Single endpoint returning everything the Action Centre page needs.

Query parameters:

ParamTypeDescription
sprint_idstringLoad 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" } }
}
GET /api/action-items

Query parameters:

ParamTypeDescription
source_modulestringFilter by module (comma-separated)
source_typestringFilter by type (comma-separated)
urgencystringFilter by urgency: overdue, today, this_week, normal
company_idstringFilter by company
assigned_tostringFilter by assigned user (exec/head only)
is_completednumber0 for open (default), 1 for completed
pagenumberPage number (default: 1)
limitnumberItems 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 /api/action-items/counts

Returns 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 }
}
POST /api/action-items

Creates a manual action item. Permission: action-centre update.

Request body:

FieldTypeRequiredDescription
titlestringYesAction item title
descriptionstringNoDetailed description
company_idstringNoAssociated company
contact_idstringNoAssociated contact
deal_idstringNoAssociated deal
project_idstringNoAssociated project
assigned_tostringNoAssigned user (defaults to current user)
due_datestringNoDue date (ISO 8601)
notesstringNoNotes

Response: { action_item: {...} } (201)

PATCH /api/action-items/:id

Updatable fields: title, assigned_to, due_date, notes, urgency

Urgency is auto-recalculated if due_date changes.

Response: { action_item: {...} }

POST /api/action-items/:id/complete

Marks the item as completed. If the source module is relationships, also marks the linked relationship_auto_action as done.

Response: { success: true }

DELETE /api/action-items/:id

Only 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 /api/action-items/preferences

Returns the current user’s module visibility preferences. Empty array means role defaults apply.

Response: { preferences: [...] }

PUT /api/action-items/preferences

Request 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 }