Event Reference
lead.created
When it is sent: When a new lead is created via the CRM UI, the public REST API (/api/v1/leads), or the public contact form (/api/public/contact).
{
"id": "lead_123",
"title": "New Enterprise Inquiry",
"stage": "new",
"source": "website",
"priority": "high",
"estimatedValue": 15000,
"expectedCloseDate": "2026-12-01T00:00:00.000Z",
"ownerId": "user_123",
"accountId": "acc_123"
}
lead.stage_changed
When it is sent: When a lead's stage changes to a different stage.
{
"id": "lead_123",
"prevStage": "new",
"stage": "qualified",
"title": "New Enterprise Inquiry",
"ownerId": "user_123",
"accountId": "acc_123"
}
lead.won
When it is sent: When a lead moves to the won stage.
{
"id": "lead_123",
"title": "New Enterprise Inquiry",
"estimatedValue": "15000",
"ownerId": "user_123",
"accountId": "acc_123"
}
lead.lost
When it is sent: When a lead moves to the lost stage.
{
"id": "lead_123",
"title": "New Enterprise Inquiry",
"ownerId": "user_123",
"accountId": "acc_123"
}
account.created
When it is sent: When a new customer/account is created via the CRM UI, mobile API, or public REST API (/api/v1/accounts).
{
"id": "acc_123",
"name": "Acme Ltd",
"type": "company",
"status": "active",
"source": "referral",
"ownerId": "user_123",
"city": "Tel Aviv"
}
account.updated
When it is sent: When an account's details or status are updated via the CRM UI or mobile API.
{
"id": "acc_123",
"name": "Acme Ltd",
"type": "company",
"source": "referral",
"city": "Tel Aviv"
}
quote.created
When it is sent: When a new quote (docType = 'quote') is created via the CRM UI or mobile API.
{
"id": "doc_123",
"number": "Q-2026-0001",
"title": "Annual Support Quote",
"status": "draft",
"total": "5900.00",
"currency": "ILS",
"accountId": "acc_123",
"validUntil": "2026-12-15T00:00:00.000Z"
}
quote.accepted
When it is sent: When a quote is accepted by staff in the CRM, by the customer in the customer portal, or via a public share link.
{
"id": "doc_123",
"number": "Q-2026-0001",
"title": "Annual Support Quote",
"status": "accepted",
"total": "5900.00",
"currency": "ILS",
"accountId": "acc_123",
"acceptedAt": "2026-11-15T01:00:00.000Z",
"source": "share_link"
}
quote.rejected
When it is sent: When a quote is rejected by staff, by a manager during approval review, or by the customer via a public share link.
{
"id": "doc_123",
"number": "Q-2026-0001",
"title": "Annual Support Quote",
"status": "rejected",
"total": "5900.00",
"currency": "ILS",
"accountId": "acc_123",
"reason": "Budget constraints",
"rejectedAt": "2026-11-15T01:00:00.000Z",
"source": "share_link"
}
invoice.created
When it is sent: When a tax invoice document (tax_invoice, tax_invoice_receipt, credit_invoice, etc.) is issued.
{
"id": "doc_456",
"number": "INV-2026-0042",
"docType": "tax_invoice",
"status": "issued",
"total": "1180.00",
"currency": "ILS",
"accountId": "acc_123",
"dueDate": "2026-12-15T00:00:00.000Z",
"issuedAt": "2026-11-15T01:00:00.000Z"
}
invoice.paid
When it is sent: When an invoice is fully settled — either inline at issue time (tax_invoice_receipt / receipt) or via a single/multi-document payment.
{
"id": "doc_456",
"number": "INV-2026-0042",
"docType": "tax_invoice",
"paidAmount": "1180.00",
"accountId": "acc_123",
"paidAt": "2026-11-15T01:00:00.000Z"
}
invoice.overdue
When it is sent: When the daily /api/cron/automations overdue sweep detects an issued document with an open balance (balanceDue > 0) past its dueDate (deduped to once per Jerusalem calendar day per document).
{
"id": "doc_456",
"number": "INV-2026-0042",
"docType": "tax_invoice",
"total": "1180.00",
"balanceDue": "1180.00",
"dueDate": "2026-11-10T00:00:00.000Z",
"accountId": "acc_123"
}
payment.received
When it is sent: Whenever a payment is recorded on a sales document (partial or full), including inline receipt payments at issue time and post-issue single/multi-document payments.
{
"paymentId": "pay_123",
"documentId": "doc_456",
"number": "INV-2026-0042",
"docType": "tax_invoice",
"amount": "500.00",
"fullyPaid": false,
"accountId": "acc_123",
"paidAt": "2026-11-15T01:00:00.000Z"
}
ticket.created
When it is sent: When a support ticket is created via the CRM UI, mobile API, customer portal, or public REST API (/api/v1/tickets).
{
"id": "tkt_123",
"number": "TK-1001",
"subject": "Cannot export report",
"priority": "high",
"channel": "portal",
"accountId": "acc_123",
"contactName": "Dana Levi",
"contactEmail": "dana@example.com"
}
ticket.replied
When it is sent: When a reply is added to a ticket by staff (CRM/mobile) or by the customer in the portal.
{
"id": "tkt_123",
"number": "TK-1001",
"subject": "Cannot export report",
"visibility": "public",
"isFromCustomer": false,
"accountId": "acc_123",
"authorId": "user_123"
}
ticket.resolved
When it is sent: When a ticket transitions to the resolved status.
{
"id": "tkt_123",
"number": "TK-1001",
"subject": "Cannot export report",
"status": "resolved",
"prevStatus": "in_progress",
"accountId": "acc_123",
"resolvedAt": "2026-11-15T01:00:00.000Z"
}
task.created
When it is sent: When a task is created via the CRM UI, quick account task action, mobile API, or public REST API (/api/v1/tasks).
{
"id": "tsk_123",
"title": "Follow up with customer",
"type": "call",
"priority": "medium",
"status": "todo",
"assigneeId": "user_123",
"dueDate": "2026-11-20T09:00:00.000Z",
"accountId": "acc_123",
"leadId": null,
"projectId": null
}
task.completed
When it is sent: When a task transitions into the done status (via Kanban move, task update, or mobile API).
{
"id": "tsk_123",
"title": "Follow up with customer",
"status": "done",
"prevStatus": "in_progress",
"assigneeId": "user_123",
"accountId": "acc_123",
"leadId": null,
"projectId": null,
"isMilestone": false,
"completedAt": "2026-11-15T01:00:00.000Z"
}
task.overdue
When it is sent: When the daily /api/cron/automations overdue sweep detects an open task past its dueDate (deduped to once per Jerusalem calendar day per task).
{
"id": "tsk_123",
"title": "Follow up with customer",
"status": "todo",
"priority": "high",
"assigneeId": "user_123",
"dueDate": "2026-11-10T09:00:00.000Z",
"accountId": "acc_123",
"leadId": null,
"projectId": null,
"isMilestone": false
}
work_order.created
When it is sent: When a field-service work order is created via the CRM UI or public REST API (/api/v1/work-orders).
{
"workOrderId": "wo_123",
"number": "WO-2026-0010",
"accountId": "acc_123",
"serviceType": "installation",
"technicianId": "user_tech_1",
"total": 450
}
work_order.assigned
When it is sent: When a technician is assigned to an existing work order.
{
"workOrderId": "wo_123",
"number": "WO-2026-0010",
"technicianId": "user_tech_1",
"accountId": "acc_123",
"serviceType": "installation"
}
work_order.completed
When it is sent: When a work order is marked as completed.
{
"workOrderId": "wo_123",
"number": "WO-2026-0010",
"accountId": "acc_123",
"technicianId": "user_tech_1",
"total": "450.00",
"completedAt": "2026-11-15T01:00:00.000Z"
}
document.signed
When it is sent: When a signer signs a digital signature document.
{
"documentId": "sig_123",
"title": "Service Agreement",
"status": "in_progress",
"signerEmail": "client@example.com"
}
document.completed
When it is sent: When all required signers have signed a digital signature document.
{
"documentId": "sig_123",
"title": "Service Agreement",
"status": "completed",
"signerEmail": "client@example.com"
}
donation.received
When it is sent: When a donation is recorded via the CRM UI or mobile API.
{
"id": "don_123",
"donorId": "acc_123",
"amount": "250.00",
"currency": "ILS",
"paymentMethod": "credit_card",
"status": "completed",
"campaignId": "camp_123",
"fundId": "fund_123",
"isTaxDeductible": true
}
workflow.failed
When it is sent: When a non-dry-run automation rule execution fails during runAndLogAutomationRule.
{
"ruleId": "rule_123",
"ruleName": "Send welcome email",
"trigger": "lead_created",
"error": "SMTP connection timed out",
"entityType": "lead",
"entityId": "lead_123",
"rulePaused": false,
"executedAt": "2026-11-15T01:00:00.000Z"
}
webhook.test
When it is sent: When a user triggers a manual test delivery from the Webhooks settings screen (sendTestWebhookDelivery).
{
"resourceId": "webhook_test",
"resourceUrl": "/settings/webhooks",
"test": true,
"sampleId": "webhook_test_001",
"note": "Manual webhook endpoint test from NINJA CRM."
}
product.created
When it is sent: When a new product or service is created in the catalog via POST /api/v1/products, POST /api/v1/products/batch, or the inventory UI.
{
"id": "prod_demo_001",
"name": "מזגן עילי 2 כ״ס",
"sku": "AC-200",
"barcode": "7290000000200",
"type": "product",
"price": "1890.00"
}
product.updated
When it is sent: When a catalog product is updated or deactivated via PATCH /api/v1/products/{id}, DELETE /api/v1/products/{id}, POST /api/v1/products/batch, or the inventory UI.
{
"id": "prod_demo_001",
"name": "מזגן עילי 2 כ״ס",
"sku": "AC-200",
"barcode": "7290000000200",
"isActive": true
}
stock.adjusted
When it is sent: Post-commit when a stock balance movement is posted via POST /api/v1/stock/adjustments, POST /api/v1/stock/adjustments/batch, or the inventory screen.
{
"productId": "prod_demo_001",
"warehouseId": "wh_main_001",
"type": "out",
"quantity": "4",
"stockBefore": "10",
"stockAfter": "6",
"reference": "MANUAL-ADJUST"
}
stock.transferred
When it is sent: Post-commit when stock is atomically transferred between warehouses via POST /api/v1/stock/transfers or the warehouse transfer flow.
{
"transferReference": "transfer-demo1234",
"productId": "prod_demo_001",
"fromWarehouseId": "wh_main_001",
"toWarehouseId": "wh_field_001",
"quantity": "3.00"
}
stock.low_threshold
When it is sent: Post-commit when a stock decrease crosses at or below the configured warehouse reorder threshold.
{
"productId": "prod_demo_001",
"warehouseId": "wh_main_001",
"stockBefore": "8",
"stockAfter": "3",
"threshold": "5"
}
purchase_order.ordered
When it is sent: Post-commit when a purchase order transitions to ordered via PATCH /api/v1/purchase-orders/{id}, POST /api/v1/purchase-orders, or email dispatch.
{
"id": "po_demo_001",
"number": "PO-2026-0007",
"status": "ordered",
"warehouseId": "wh_main_001"
}
purchase_order.received
When it is sent: Post-commit when goods are received against a purchase order via POST /api/v1/purchase-orders/{id}/receive or the procurement UI.
{
"id": "po_demo_001",
"number": "PO-2026-0007",
"status": "received",
"warehouseId": "wh_main_001",
"receivedLines": [
{
"itemId": "poi_demo_001",
"productId": "prod_demo_001",
"receivedQuantity": "5.00",
"totalReceivedQuantity": "5.00"
}
]
}
purchase_order.cancelled
When it is sent: Post-commit when a purchase order is cancelled via PATCH /api/v1/purchase-orders/{id} or deleted/cancelled in the procurement UI.
{
"id": "po_demo_001",
"status": "cancelled"
}
stocktake.approved
When it is sent: Post-commit when a stocktake session is submitted/approved and inventory adjustments are posted via POST /api/v1/stocktakes/{id} or the stocktake workflow.
{
"id": "st_demo_001",
"warehouseId": "wh_main_001",
"adjustedCount": 4,
"zeroedCount": 1,
"skippedCount": 0
}
project.created
When it is sent: When a project is created via UI, template conversion, lead/document/work-order conversion, automation, or POST /api/v1/projects.
{
"projectId": "proj_demo_001",
"projectNumber": "PRJ-2026-0001",
"name": "Site Installation — Tel Aviv",
"status": "planning",
"accountId": "acc_123"
}
project.updated
When it is sent: When project details or settings are updated via UI or PATCH /api/v1/projects/{id}.
{
"projectId": "proj_demo_001",
"name": "Site Installation — Tel Aviv",
"status": "active",
"accountId": "acc_123"
}
project.status_changed
When it is sent: When a project's canonical status or stage changes.
{
"projectId": "proj_demo_001",
"prevStatus": "planning",
"status": "active",
"accountId": "acc_123"
}
project.completed
When it is sent: When a project transitions to completed.
{
"projectId": "proj_demo_001",
"prevStatus": "active",
"status": "completed",
"completedAt": "2026-11-23T12:00:00.000Z"
}
project.budget_overrun
When it is sent: When project actual cost crosses a re-armable threshold tier (75%, 90%, or 100%) of its effective contract budget.
{
"projectId": "proj_demo_001",
"tier": 90,
"costBudgetPct": 92.4,
"effectiveBudget": 100000,
"cost": 92400
}
project.milestone_completed
When it is sent: When a milestone task on a project is completed or approved.
{
"projectId": "proj_demo_001",
"milestoneTaskId": "tsk_ms_001",
"title": "Phase 1 Handover",
"completedAt": "2026-11-23T12:00:00.000Z"
}
project.milestone_billed
When it is sent: When a milestone or milestone batch on a project is billed into a quote or tax invoice.
{
"projectId": "proj_demo_001",
"milestoneTaskId": "tsk_ms_001",
"documentId": "doc_123",
"docType": "tax_invoice"
}
project.time_entry_approved
When it is sent: When a project time entry is approved individually or via bulk approval.
{
"projectId": "proj_demo_001",
"timeEntryId": "te_001",
"durationMinutes": 120,
"userId": "user_123"
}
project.material_issued
When it is sent: When stock materials are issued directly or via picklist to a project.
{
"projectId": "proj_demo_001",
"warehouseId": "wh_main_001",
"movementIds": ["mov_001"]
}