Ingestion API
Capture Event
Record one turn-pair or tool call within a session
POST
https://api.voxmith.com/api/v1/capture-eventGenerate event_id client-side (UUID) so child events can reference their parent before the parent's response returns.
Body
| Field | Type | Required | Description |
|---|---|---|---|
event_id |
string (UUID) |
Required | Client-generated UUID. Use as parent_id on child events. |
session_id |
string (UUID) |
Required | Session UUID from capture-session. |
primitive_name |
string |
Required | Agent name (turn-pair) or tool name (tool call). |
args |
string |
Required | Input: user message or JSON-encoded tool args. |
result |
string |
Required | Output: assistant reply or JSON-encoded tool result. |
success |
boolean |
Optional | Defaults to true. |
latency |
integer (ms) |
Optional | Execution time in milliseconds. |
timestamp |
integer (ms) |
Optional | Unix time in ms when the event occurred. Defaults to server time. |
parent_id |
string (UUID) |
Optional | Parent event UUID. Set on tool calls to point at the agent turn (or parent tool) that triggered them. |
metadata |
object |
Optional | Free-form event metadata. |
Core rules
- One session per conversation: reuse
session_idon every event. - One event per turn-pair:
primitive_nameis the agent name,argsis the user input,resultis the assistant output. Don't emit separate output events. - Merge assistant turns: if one user turn is followed by N assistant turns (with tool calls between), concatenate the N texts into a single
result. - Tool calls = own event:
primitive_nameis the tool name,args/resultare plain text or JSON-encoded strings. - Sub-tools chain: when a tool invokes another tool, set
parent_idto the parent tool'sevent_id.
Verify
Send one event, then open Events in Voxmith. Confirm primitive_name, args, result, success, and latency look right.
Troubleshooting
event_idandsession_idmust be UUIDs.- Create the session first with Capture Session.
- For tool calls, set
parent_idwhen the tool was triggered by another agent/tool event.
Next steps
- Events: inspect accepted events in Voxmith.
- Capture a session: review the required conversation boundary.
- Ingestion errors: troubleshoot rejected requests.
Headers
x-org-idstringrequiredYour organization ID (UUID, case-insensitive).
Request body
event_idstring · uuidrequiredClient-generated UUID. Use as
parent_id on child events.session_idstring · uuidrequiredSession UUID from
capture-session.primitive_namestringrequiredAgent name (turn-pair) or tool name (tool call).
argsstringrequiredInput — user message or JSON-encoded tool args.
resultstringrequiredOutput — assistant reply or JSON-encoded tool result.
successbooleanDefaults to
true.latencyintegerExecution time in ms.
timestampinteger · int64Unix time in ms when the event occurred. Defaults to server time.
parent_idstring · uuidParent event UUID. Set on tool calls to point at the agent turn (or parent tool) that triggered them.
metadataobjectFree-form event metadata.
Responses
200Event recorded400Invalid request bodyWas this page helpful?