torqee Developers
Api reference/Events

Stream workspace events (SSE)

Opens a Server-Sent Events stream of workspace events. Event payloads follow the WorkspaceEvent schema (see #/components/schemas/WorkspaceEvent). Scopes are checked per subscribed event type: session.* requires torqee:sessions:read, transcript.* requires torqee:transcripts:read. When filters is omitted, only lifecycle events (session.created, session.status_changed) allowed by the granted scopes are delivered; no 403 is returned in that case. Delivery is best-effort: events emitted while disconnected are lost. Reconcile via the REST API after reconnecting.

GET/api/v1/events/stream
AuthorizationBearer <token>

OAuth 2.1 authorization code flow with PKCE. Audience must be the connect URL.

In: header

Query Parameters

filters?string

URL-encoded JSON array of subscription entries (max 20, OR-matched). Structure: #/components/schemas/EventStreamFilters. transcript.segment.created entries require sessionId.

Response Body

curl -X GET "https://connect.torqee.app/api/v1/events/stream?filters=string"
fetch("https://connect.torqee.app/api/v1/events/stream?filters=string")
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://connect.torqee.app/api/v1/events/stream?filters=string"

  req, _ := http.NewRequest("GET", url, nil)
  
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://connect.torqee.app/api/v1/events/stream?filters=string"

response = requests.request("GET", url)

print(response.text)
"string"
{
  "error": "invalid_filters"
}
{
  "error": "unauthorized"
}
{
  "error": "insufficient_scope"
}
{
  "error": "connection_limit"
}
{
  "error": "internal_server_error"
}