Generic webhook
Send events from any language or tool with a single HTTP POST — no SDK or library required.
Endpoint
POST https://api.obsivara.com/ingest/webhook/genericThe n8n alias (/ingest/webhook/n8n) accepts the same payload — use either. Every request must include Authorization: Bearer obs_live_YOUR_KEY andContent-Type: application/json.
Full example
curl -X POST https://api.obsivara.com/ingest/webhook/generic \
-H "Authorization: Bearer obs_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"event": "run_started",
"run_id": "my-run-001",
"asset_id": "my-agent",
"name": "First run",
"input": "What is the weather today?"
}'Expected 202 response:
{ "source": "generic", "accepted": 1, "rejected": 0, "errors": [] }Event types
The event field (snake_case) must be one of three values. Unknown values are stored as error rows — spell them exactly.
run_started
Marks the beginning of a workflow run.
{
"event": "run_started",
"run_id": "my-run-001",
"asset_id": "my-agent",
"name": "Support reply",
"input": "Where is my order?"
}| Field | Type | Required | Description |
|---|---|---|---|
event | string | Yes | Exactly "run_started" |
run_id | string | Yes | Unique ID for this run. Any string — non-UUID values are auto-hashed to a stable UUID server-side. |
asset_id | string | Yes | The agent, workflow, or prompt you are monitoring. |
name | string | No | Human-readable label for the run. |
input | string | No | The input text or prompt that triggered this run. |
llm_call
Records a model call within a run.
{
"event": "llm_call",
"run_id": "my-run-001",
"provider": "openai",
"model": "gpt-4o",
"prompt_tokens": 312,
"completion_tokens": 87,
"total_tokens": 399,
"cost_usd": 0.0048,
"latency_ms": 1240
}| Field | Type | Required | Description |
|---|---|---|---|
event | string | Yes | Exactly "llm_call" |
run_id | string | Yes | Must match the run_id from run_started. |
provider | string | No | e.g. "openai", "anthropic", "google" |
model | string | No | e.g. "gpt-4o", "claude-3-5-sonnet" |
prompt_tokens | number | No | Input token count. |
completion_tokens | number | No | Output token count. |
total_tokens | number | No | Sum of prompt + completion tokens. |
cost_usd | number | No | Cost of this call in US dollars. |
latency_ms | number | No | Time-to-first-response or total call duration in milliseconds. |
run_finished
Marks the end of a run.
{
"event": "run_finished",
"run_id": "my-run-001",
"outcome": "success",
"duration_ms": 3500,
"total_cost_usd": 0.0048
}| Field | Type | Required | Description |
|---|---|---|---|
event | string | Yes | Exactly "run_finished" |
run_id | string | Yes | Must match the run_id from run_started. |
outcome | string | No | "success" or "error" |
duration_ms | number | No | Total run duration in milliseconds. |
total_cost_usd | number | No | Total cost of all LLM calls in the run. |
Asset attribution
Obsivara resolves asset_id in this order (first non-empty wins):
asset_idfield in the JSON body?asset_id=query parameterX-Obsivara-Asset-Idrequest header"unknown"(fallback)
The
run_id can be any string — Obsivara maps non-UUID values to a stable UUID automatically, so you can use your own IDs (order numbers, session IDs, etc.) without generating UUIDs.Unknown
event values are accepted (202) but stored as error rows. Spell event names exactly:run_started, llm_call, run_finished.n8n alias
The endpoint /ingest/webhook/n8n is an alias for /ingest/webhook/generic — it accepts the same payload. See n8n integration → for a step-by-step guide with n8n expressions.
Next steps
- Verify it worked — confirm your events appear in the dashboard
- Event schema reference — all event types and optional fields for the batch API
- Errors & troubleshooting — resolve 401, 403, 400 responses