Export Alerts
curl --request GET \
--url https://api.promptguard.co/api/v1/alerts \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.promptguard.co/api/v1/alerts"
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/alerts', 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/alerts",
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/alerts"
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/alerts")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.promptguard.co/api/v1/alerts")
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_body{
"organization_id": "12613a5a-ff26-4e72-8105-a36b40327a7c",
"organization_name": "Acme Corp",
"events": [
{
"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",
"threshold": null
}
],
"next_cursor": "MjAyNi0xMC0zMFQxNjozMjowMy43MTA2OTErMDA6MDB8Y2FiY2FiZTQtZTBjOS00NmE1LTljNmMtYmMwYWU4YTgwZDgz",
"has_more": true
}Export Alerts
The Organization’s alerts, oldest first: every threat that was blocked, or found at the alert confidence — exactly the events a webhook delivery is sent for.
Guide: SIEM export
GET
/
api
/
v1
/
alerts
Export Alerts
curl --request GET \
--url https://api.promptguard.co/api/v1/alerts \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.promptguard.co/api/v1/alerts"
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/alerts', 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/alerts",
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/alerts"
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/alerts")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.promptguard.co/api/v1/alerts")
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_body{
"organization_id": "12613a5a-ff26-4e72-8105-a36b40327a7c",
"organization_name": "Acme Corp",
"events": [
{
"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",
"threshold": null
}
],
"next_cursor": "MjAyNi0xMC0zMFQxNjozMjowMy43MTA2OTErMDA6MDB8Y2FiY2FiZTQtZTBjOS00NmE1LTljNmMtYmMwYWU4YTgwZDgz",
"has_more": true
}Authorizations
Query Parameters
Response
Successful Response
One page of an Organization's events, oldest first.