v4

latestOpenAPI 3.1.02026-08-03427198448.4 KB

Publish Event

Generic event publishing endpoint for all entity types.

Creates an event with source='user' to track user-driven actions. Publishes via the centralized EventPublisher.

post/events/publish

Query parameters

user_idstring
org_idstring

Request body

entity_typestring required

The type of entity (e.g., 'client', 'payment', 'expense')

entity_idstring required

The ID of the entity

event_typestring required

The type of event to create

event_messagestring required

The event message

metadataobject

Optional event metadata (can include turn_id if needed)

invoice_idstring nullable

Optional invoice ID to link this event to an invoice

change_typestring nullable

Type of change (create, update, delete)

thread_idstring nullable

Thread ID for agent chat context

Response

Successful Response

{"stackTrail":"paths:/events/publish:post:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}