Stream Interactions
curl --request GET \
--url https://api.promptguard.co/api/v1/interactions/stream \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.promptguard.co/api/v1/interactions/stream"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.promptguard.co/api/v1/interactions/stream', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.promptguard.co/api/v1/interactions/stream",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.promptguard.co/api/v1/interactions/stream"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.promptguard.co/api/v1/interactions/stream")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.promptguard.co/api/v1/interactions/stream")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_bodyevent: connected
data: {}
id: MjAyNi0xMC0zMFQxNjozMjowMC43NzE5NzMrMDA6MDB8YjhlZTljYTctOTc2Yi00OTdmLTg5YjYtMjZjMDY5NjVmZDY1
event: siem_event
data: {"schema_version": "1", "event": "scan_completed", "event_id": "57119c22-e1ab-433c-a043-3ae5fcc4cd47", "timestamp": "2026-10-30T16:32:00.771973+00:00", "organization_id": "12613a5a-ff26-4e72-8105-a36b40327a7c", "organization_name": "Acme Corp", "project_id": "910b6423-8a12-4461-a6bf-9148d9b6b8e3", "project": "support-chatbot", "device_id": null, "device_hostname": null, "attribution_label_unverified": null, "identity_verified": null, "threat_type": null, "decision": "allow", "confidence": 1.0, "reason": "Request passed all policy checks", "text": "[PromptGuard] Scan in *Acme Corp / support-chatbot* (100%, allow)", "direction": "input", "surface": null, "segment": null, "dashboard_url": "https://app.promptguard.co/dashboard/events/57119c22-e1ab-433c-a043-3ae5fcc4cd47?org=12613a5a-ff26-4e72-8105-a36b40327a7c"}
id: MjAyNi0xMC0zMFQxNjozMjowMy43MTA2OTErMDA6MDB8Y2FiY2FiZTQtZTBjOS00NmE1LTljNmMtYmMwYWU4YTgwZDgz
event: siem_event
data: {"schema_version": "1", "event": "threat_detected", "event_id": "a40e442f-937c-4c61-b715-45c6f382487a", "timestamp": "2026-10-30T16:32:03.710691+00:00", "organization_id": "12613a5a-ff26-4e72-8105-a36b40327a7c", "organization_name": "Acme Corp", "project_id": "910b6423-8a12-4461-a6bf-9148d9b6b8e3", "project": "support-chatbot", "device_id": null, "device_hostname": null, "attribution_label_unverified": null, "identity_verified": null, "threat_type": "prompt_injection", "decision": "block", "confidence": 0.93, "reason": "Prompt injection detected: Pattern match (rule 33c5e793)", "text": "[PromptGuard] Prompt Injection in *Acme Corp / support-chatbot* (93%, block)", "direction": "input", "surface": null, "segment": null, "dashboard_url": "https://app.promptguard.co/dashboard/events/a40e442f-937c-4c61-b715-45c6f382487a?org=12613a5a-ff26-4e72-8105-a36b40327a7c"}
: keep-alive
Stream Interactions
The Organization’s events as server-sent events, from where the reader left off.
Each event is one siem_event frame whose id is its cursor, so a client
that reconnects with Last-Event-ID (as EventSource does) resumes after
the last event it received. A comment line every few seconds keeps idle
connections open.
Guide: SIEM export
GET
/
api
/
v1
/
interactions
/
stream
Stream Interactions
curl --request GET \
--url https://api.promptguard.co/api/v1/interactions/stream \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.promptguard.co/api/v1/interactions/stream"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.promptguard.co/api/v1/interactions/stream', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.promptguard.co/api/v1/interactions/stream",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.promptguard.co/api/v1/interactions/stream"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.promptguard.co/api/v1/interactions/stream")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.promptguard.co/api/v1/interactions/stream")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_bodyevent: connected
data: {}
id: MjAyNi0xMC0zMFQxNjozMjowMC43NzE5NzMrMDA6MDB8YjhlZTljYTctOTc2Yi00OTdmLTg5YjYtMjZjMDY5NjVmZDY1
event: siem_event
data: {"schema_version": "1", "event": "scan_completed", "event_id": "57119c22-e1ab-433c-a043-3ae5fcc4cd47", "timestamp": "2026-10-30T16:32:00.771973+00:00", "organization_id": "12613a5a-ff26-4e72-8105-a36b40327a7c", "organization_name": "Acme Corp", "project_id": "910b6423-8a12-4461-a6bf-9148d9b6b8e3", "project": "support-chatbot", "device_id": null, "device_hostname": null, "attribution_label_unverified": null, "identity_verified": null, "threat_type": null, "decision": "allow", "confidence": 1.0, "reason": "Request passed all policy checks", "text": "[PromptGuard] Scan in *Acme Corp / support-chatbot* (100%, allow)", "direction": "input", "surface": null, "segment": null, "dashboard_url": "https://app.promptguard.co/dashboard/events/57119c22-e1ab-433c-a043-3ae5fcc4cd47?org=12613a5a-ff26-4e72-8105-a36b40327a7c"}
id: MjAyNi0xMC0zMFQxNjozMjowMy43MTA2OTErMDA6MDB8Y2FiY2FiZTQtZTBjOS00NmE1LTljNmMtYmMwYWU4YTgwZDgz
event: siem_event
data: {"schema_version": "1", "event": "threat_detected", "event_id": "a40e442f-937c-4c61-b715-45c6f382487a", "timestamp": "2026-10-30T16:32:03.710691+00:00", "organization_id": "12613a5a-ff26-4e72-8105-a36b40327a7c", "organization_name": "Acme Corp", "project_id": "910b6423-8a12-4461-a6bf-9148d9b6b8e3", "project": "support-chatbot", "device_id": null, "device_hostname": null, "attribution_label_unverified": null, "identity_verified": null, "threat_type": "prompt_injection", "decision": "block", "confidence": 0.93, "reason": "Prompt injection detected: Pattern match (rule 33c5e793)", "text": "[PromptGuard] Prompt Injection in *Acme Corp / support-chatbot* (93%, block)", "direction": "input", "surface": null, "segment": null, "dashboard_url": "https://app.promptguard.co/dashboard/events/a40e442f-937c-4c61-b715-45c6f382487a?org=12613a5a-ff26-4e72-8105-a36b40327a7c"}
: keep-alive
Authorizations
Query Parameters
Response
Server-sent events, until the client disconnects
The response is of type string.