Skip to main content

GET /v1/stream/ws

Upgrade to a WebSocket connection for real-time filing event streaming
Audience: application and coding agent.

Canonical metadata

  • requestId
  • traceparent

Example request

npx wscat -c "wss://api.secapi.ai/v1/stream/ws?ticket=$OMNI_STREAM_TICKET" \
  -H "omni-version: 2026-03-19"

# Mint the short-lived ticket first:
curl -X POST \
  -H "x-api-key: $OMNI_DATASTREAM_API_KEY" \
  -H "omni-version: 2026-03-19" \
  -H "content-type: application/json" \
  -d '{}' \
  "https://api.secapi.ai/v1/stream/tickets"
Mint the short-lived $OMNI_STREAM_TICKET first with POST /v1/stream/tickets so you do not expose a long-lived API key in a browser-visible WebSocket URL.

Example response

{
  "requestId": "req_example_123",
  "traceparent": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
}

Give this prompt to your agent

Failure posture

  • treat non-2xx responses as contract-aware failures, not free-form errors
  • preserve requestId and traceparent in logs and downstream reports
  • if provenance or freshness metadata is present, return it unchanged so trust is not lost in the handoff