Skip to main content
POST
/
v2
/
analytics
/
sse
curl --request POST \
  --url https://api.linqalpha.com/v2/analytics/sse \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "query": "What are the latest insights on AAPL performance?",
  "search_types": {
    "external": [
      {
        "type": "transcript"
      },
      {
        "type": "filing"
      }
    ]
  }
}
'
{
  "event_name": "conversation",
  "data": {
    "conversation_id": "7622b901-93ee-44bb-afb3-d60df76e31bf",
    "message": "Successfully created a conversation."
  }
}

Authorizations

X-API-KEY
string
header
required

Body

application/json
query
string
required

The analytics query to process.

Example:

"What are the latest insights on AAPL earnings?"

organization_id
string<uuid>

Organization ID

user_id
string<uuid>

User ID

user_email
string<email>

User email

user_name
string

User name

conversation_id
string | null

Existing conversation ID for multi-turn continuation. Omit or null for new conversation.

search_types
object

Structured source selection. Controls which document sources to query. Omitting a category means don't search it.

filters
object

Metadata filters. Hard filters exclude non-matching documents (AND between fields, OR within arrays). Soft filters boost relevance without excluding.

Response

SSE stream of analytics events. Each event is sent as data: {json}\n\n. Events follow the sequence: conversation → message → status:start → [agentic loop] → answer → status:finish. status:keep_alive and keepalive events are sent periodically during long tool execution gaps.

Conversation event

event_name
enum<string>
required
Available options:
conversation
data
object
required

Event-specific data payload