Verify a signed caller-authentication audit event
Checks the signature of a caller authentication audit event, the record the server keeps of every authentication, denial and governance action.
# A signed audit event and its signature, as exported from caller_audit_events:
curl -X POST https://parmana-api-real.vercel.app/audit/verify \
-H "Content-Type: application/json" \
--data @audit-event.jsonimport { ParmanaClient } from "@parmana/sdk";
import { readFileSync } from "node:fs";
const client = new ParmanaClient({
endpoint: "https://parmana-api-real.vercel.app",
apiKey: process.env.PARMANA_API_KEY!,
});
// A signed audit event and its signature, as exported from caller_audit_events.
const { event, signature } = JSON.parse(
readFileSync("audit-event.json", "utf8"),
);
const valid = await client.verifyAuditEvent(event, signature);
console.log(valid);import json
import os
from datetime import datetime
from pathlib import Path
from parmana import ParmanaClient
from parmana.models import Signature, SignatureAlgorithm
client = ParmanaClient(
endpoint="https://parmana-api-real.vercel.app",
api_key=os.environ["PARMANA_API_KEY"],
)
# A signed audit event and its signature, as exported from caller_audit_events.
exported = json.loads(Path("audit-event.json").read_text())
signature = Signature(
algorithm=SignatureAlgorithm(exported["signature"]["algorithm"]),
key_id=exported["signature"]["keyId"],
value=exported["signature"]["value"],
signed_at=datetime.fromisoformat(exported["signature"]["signedAt"]),
)
valid = client.verify_audit_event(exported["event"], signature)
print(valid)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
event: {
type: 'caller_authenticated',
occurredAt: '2026-09-15T03:00:00.000Z',
route: '/version'
},
signature: {
algorithm: 'ed25519',
keyId: 'default',
value: 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=='
}
})
};
fetch('https://parmana-api-real.vercel.app/audit/verify', 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://parmana-api-real.vercel.app/audit/verify",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'event' => [
'type' => 'caller_authenticated',
'occurredAt' => '2026-09-15T03:00:00.000Z',
'route' => '/version'
],
'signature' => [
'algorithm' => 'ed25519',
'keyId' => 'default',
'value' => 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=='
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://parmana-api-real.vercel.app/audit/verify"
payload := strings.NewReader("{\n \"event\": {\n \"type\": \"caller_authenticated\",\n \"occurredAt\": \"2026-09-15T03:00:00.000Z\",\n \"route\": \"/version\"\n },\n \"signature\": {\n \"algorithm\": \"ed25519\",\n \"keyId\": \"default\",\n \"value\": \"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://parmana-api-real.vercel.app/audit/verify")
.header("Content-Type", "application/json")
.body("{\n \"event\": {\n \"type\": \"caller_authenticated\",\n \"occurredAt\": \"2026-09-15T03:00:00.000Z\",\n \"route\": \"/version\"\n },\n \"signature\": {\n \"algorithm\": \"ed25519\",\n \"keyId\": \"default\",\n \"value\": \"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://parmana-api-real.vercel.app/audit/verify")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"event\": {\n \"type\": \"caller_authenticated\",\n \"occurredAt\": \"2026-09-15T03:00:00.000Z\",\n \"route\": \"/version\"\n },\n \"signature\": {\n \"algorithm\": \"ed25519\",\n \"keyId\": \"default\",\n \"value\": \"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==\"\n }\n}"
response = http.request(request)
puts response.read_body{
"valid": false
}Body
Request body for POST /audit/verify: the signed caller-authentication audit event and its stored signature, not a lookup by ID. Checked structurally on the server before signature verification runs. Verification operates on canonical bytes and the signature alone, never on event.type.
Response
The check ran. Read valid. A 200 alone does not mean the signature verified.
Response shared by POST /refusal/verify and POST /audit/verify: a bare signature-validity result, no wrapper, no partial-failure detail. Both routes verify a signature over bytes with no database lookup, so there is nothing more specific to report than valid or not.
# A signed audit event and its signature, as exported from caller_audit_events:
curl -X POST https://parmana-api-real.vercel.app/audit/verify \
-H "Content-Type: application/json" \
--data @audit-event.jsonimport { ParmanaClient } from "@parmana/sdk";
import { readFileSync } from "node:fs";
const client = new ParmanaClient({
endpoint: "https://parmana-api-real.vercel.app",
apiKey: process.env.PARMANA_API_KEY!,
});
// A signed audit event and its signature, as exported from caller_audit_events.
const { event, signature } = JSON.parse(
readFileSync("audit-event.json", "utf8"),
);
const valid = await client.verifyAuditEvent(event, signature);
console.log(valid);import json
import os
from datetime import datetime
from pathlib import Path
from parmana import ParmanaClient
from parmana.models import Signature, SignatureAlgorithm
client = ParmanaClient(
endpoint="https://parmana-api-real.vercel.app",
api_key=os.environ["PARMANA_API_KEY"],
)
# A signed audit event and its signature, as exported from caller_audit_events.
exported = json.loads(Path("audit-event.json").read_text())
signature = Signature(
algorithm=SignatureAlgorithm(exported["signature"]["algorithm"]),
key_id=exported["signature"]["keyId"],
value=exported["signature"]["value"],
signed_at=datetime.fromisoformat(exported["signature"]["signedAt"]),
)
valid = client.verify_audit_event(exported["event"], signature)
print(valid)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
event: {
type: 'caller_authenticated',
occurredAt: '2026-09-15T03:00:00.000Z',
route: '/version'
},
signature: {
algorithm: 'ed25519',
keyId: 'default',
value: 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=='
}
})
};
fetch('https://parmana-api-real.vercel.app/audit/verify', 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://parmana-api-real.vercel.app/audit/verify",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'event' => [
'type' => 'caller_authenticated',
'occurredAt' => '2026-09-15T03:00:00.000Z',
'route' => '/version'
],
'signature' => [
'algorithm' => 'ed25519',
'keyId' => 'default',
'value' => 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=='
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://parmana-api-real.vercel.app/audit/verify"
payload := strings.NewReader("{\n \"event\": {\n \"type\": \"caller_authenticated\",\n \"occurredAt\": \"2026-09-15T03:00:00.000Z\",\n \"route\": \"/version\"\n },\n \"signature\": {\n \"algorithm\": \"ed25519\",\n \"keyId\": \"default\",\n \"value\": \"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://parmana-api-real.vercel.app/audit/verify")
.header("Content-Type", "application/json")
.body("{\n \"event\": {\n \"type\": \"caller_authenticated\",\n \"occurredAt\": \"2026-09-15T03:00:00.000Z\",\n \"route\": \"/version\"\n },\n \"signature\": {\n \"algorithm\": \"ed25519\",\n \"keyId\": \"default\",\n \"value\": \"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://parmana-api-real.vercel.app/audit/verify")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"event\": {\n \"type\": \"caller_authenticated\",\n \"occurredAt\": \"2026-09-15T03:00:00.000Z\",\n \"route\": \"/version\"\n },\n \"signature\": {\n \"algorithm\": \"ed25519\",\n \"keyId\": \"default\",\n \"value\": \"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==\"\n }\n}"
response = http.request(request)
puts response.read_body{
"valid": false
}