Skip to main content
PromptGuard ties each request back to the human (or service) that triggered it via the X-End-User header. Once present, every downstream feature — usage analytics, geographic rollups, access lists, abuse investigation — is automatically scoped to that identifier.

How to set it

Pass X-End-User on every outbound LLM call. The value is opaque to PromptGuard; it can be a UUID, a hashed email, an internal user id, anything stable per-customer.
Don’t put PII in this header. Hash it. The value is logged into every security_events row and exposed in the dashboard — exactly the place you don’t want raw email addresses.

What it unlocks

End-Users page

Dashboard → End Users rolls up every value of X-End-User you’ve ever sent: total events, flagged events, flag rate, last seen, computed risk band (low / medium / high).

Per-end-user blocking

A single rule on the Allow & Block lists page rejects every future request from one customer, without having to redeploy your app.

Cost attribution

Combined with token logging, the dashboard shows you “this end-user cost $X this period”. Used to chase noisy free-tier users before they break your unit economics.

Risk scoring

The risk band is computed from flagged_events / total_events over the last 30 days. ≥ 50% flag rate → high; ≥ 10% → medium; otherwise low. Queryable via the API for upstream alerting.

API: list end-users

Returns the same data the End Users page renders. Pair this with your CRM to flag accounts that are stress-testing your guardrails, and with your billing to surface overage candidates.

What about anonymous traffic?

If the request doesn’t carry X-End-User, the row’s end_user_id is NULL. The End Users page silently skips it and the per-end-user rules can’t fire on it. Set the header on every request, even for anonymous users — at minimum, send a per-session UUID. The dashboard becomes useless without it.