Observability
Manage broadcast destinations for usage, error, and memory events.
Endpoints
| Method | Path | Auth | Description |
|---|---|---|---|
| GET | /v1/observability/destinations | API Key | List destinations |
| POST | /v1/observability/destinations | API Key | Add a destination |
| PUT | /v1/observability/destinations/:id | API Key | Update a destination |
| DELETE | /v1/observability/destinations/:id | API Key | Remove a destination |
| POST | /v1/observability/test/:id | API Key | Send test event |
| GET | /v1/observability/config | API Key | Get broadcast config |
| PUT | /v1/observability/config | API Key | Enable/disable broadcasting |
| GET | /v1/observability/templates | API Key | List integration templates |
| GET | /v1/observability/templates/:provider | API Key | Get template for a platform |
Add a destination
curl -X POST https://api.brainstormrouter.com/v1/observability/destinations \
-H "Authorization: Bearer br_live_..." \
-H "Content-Type: application/json" \
-d '{
"name": "Analytics Webhook",
"type": "webhook",
"config": {"url": "https://example.com/ingest"},
"event_types": ["usage", "error"],
"batch": {"max_size": 50, "flush_interval_ms": 5000}
}'
Request body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Display name |
type | string | Yes | webhook, otlp, datadog, splunk, posthog, s3, custom |
config | object | Yes | Type-specific config (see below) |
event_types | string[] | No | Filter: usage, audit, quality, guardrail, error |
batch | object | No | max_size and flush_interval_ms |
Config by type
| Type | Required fields |
|---|---|
webhook | { url: string } |
otlp | { endpoint: string } |
datadog | { api_key: string } |
splunk | { hec_url: string, hec_token: string } |
posthog | { api_key: string } |
s3 | { bucket: string } |
custom | { url: string } |
Integration templates
Pre-built configs for popular platforms. Reduces setup to "fill in your API key."
# List available templates
curl https://api.brainstormrouter.com/v1/observability/templates \
-H "Authorization: Bearer br_live_..."
# Get specific template
curl https://api.brainstormrouter.com/v1/observability/templates/langfuse \
-H "Authorization: Bearer br_live_..."
Available templates: langfuse, datadog, posthog, s3, splunk
Each template returns:
config_schema— required/optional fields with descriptionsrecommended_event_types— best event types for this platformexample_config— copy-paste config to get started
Test a destination
Sends a synthetic usage event to verify connectivity.
curl -X POST https://api.brainstormrouter.com/v1/observability/test/dest-uuid \
-H "Authorization: Bearer br_live_..."
Enable/disable broadcasting
curl -X PUT https://api.brainstormrouter.com/v1/observability/config \
-H "Authorization: Bearer br_live_..." \
-H "Content-Type: application/json" \
-d '{"enabled": true}'