Use POST /openapi/v1/events/batch to record one to 100 events. The complete request body must be no larger than 1 MiB, and each payload must be no larger than 256 KiB after JSON encoding.
Event fields
timestamp can be at most 30 days old and up to five minutes in the future.
The optional workspaceId field is only a consistency hint. If it differs from the workspace selected by the API key, the event is rejected.
Example batch
Use the same runId for every event in one execution. Use the same sessionId across related executions.
Partial success response
The server evaluates each event independently:
- Remove accepted events from the local queue.
- Retry only IDs in
retryableEventIds.
- Permanently remove IDs in
rejectedEventIds and record a local diagnostic.
- Treat a repeated, already stored
eventId as accepted.
Do not retry the entire original batch without filtering it. Doing so wastes capacity even though repeated IDs are idempotent.
Suggested event order
A language SDK can start with these practical event types:
SESSION_OUTCOME closes the Run. Put COMPLETED, FAILED, or CANCELLED in payload.status.
Lynx accepts other event type strings, but a stable shared vocabulary makes dashboards and debugging more useful.
In metadata-only mode, omit prompt text, model output, and tool arguments.
In every mode, mask credentials and personal data before creating the event.