Skip to main content
POST
/
v1
/
analytics
/
sse
Generate an analytics response via SSE
curl --request POST \
  --url https://api.linqalpha.com/v1/analytics/sse \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "query": "Analyze AAPL earnings trend over the past 4 quarters"
}
'
{
  "event_name": "conversation",
  "data": {
    "conversation_id": "123e4567-e89b-12d3-a456-426614174000"
  }
}

Authorizations

X-API-KEY
string
header
required

Body

application/json
query
string
required

The analytics query to process. Include ticker symbols, date ranges, and any other filtering context directly in the query text (e.g., "Compare MSFT and GOOG revenue growth from 2023 to 2025").

conversation_id
string | null

Existing conversation ID to continue a multi-turn conversation. Omit or set to null for a new conversation.

organization_id
string<uuid>

Organization ID. Required for platform API keys to identify the target organization.

Example:

"123e4567-e89b-12d3-a456-426614174000"

user_id
string

User ID. Required together with user_email for platform API keys to identify the specific user.

Example:

"user-123"

user_email
string<email>

User email. Required together with user_id for platform API keys to identify the specific user.

Example:

"john.doe@example.com"

Response

SSE stream of analytics events. Each event is sent as data: {json}\n\n. The stream contains multiple event types in sequence. See the Event Flow section above for the typical ordering.

Conversation event

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

Event-specific data payload