Availability
For how webhooks work, refer to Webhooks.
Topics
Each event has a topic. The topics for configuration changes have the formatsystem.<object>.<action>, for example system.llm.created.
AI Studio publishes these topics:
Enterprise plugins can publish more topics, for example the Asset Catalog plugin. The target editor shows the topics in the list above and the guardrail alert topics that filters and exceptions set. It also shows all other topics that AI Studio received in the last 30 days.
Guardrail Events
A guardrail with the Log and raise event action raises aguardrail.alert.<name> event. A guardrail block, a quarantine, or a softening by the LLM judge raises a guardrail.outcome.* event. In the guardrail form, the Create a webhook for this event link opens a new target for the alert.
A guardrail alert has the object type guardrail_alert and the action raised. Its object contains these fields:
nameandalert: the alert nametopic,filter_id,filter_name,app_id, andapp_namedetector,kinds,roles,tool_names, andmax_scoreaction: the action on the trafficexception_id: the exception that raised the alert, if anyrequest_id,compliance_event_id, andtimestamplinkandurl: the link to the compliance eventexcerpts: masked excerpts of the flagged text, only when the filter’s alert includes them
guardrail and the outcome as its action. Its object contains the same filter, App, detector, and request fields, and also outcome, event_type, severity, reason_code, and exception_ids. A judge softening adds judge, with the verdict, reason, model, prompt version, coverage, and the actions before and after. An outcome event never contains the flagged text.
link is the path of the Compliance page that opens the event, for example /admin/compliance?event=1234. url is the full link. AI Studio builds it from SITE_URL, and leaves it out when SITE_URL is not set.
Only AI Studio raises guardrail.alert.* and guardrail.outcome.* events. Plugins cannot publish these topics. For Edge Gateway traffic, AI Studio raises them when the analytics pulse arrives.
Topic Filters
A target subscribes to topics with one or more filters. A filter is a topic name or a glob pattern:
A target can have a maximum of 50 filters.
Payloads
Each target uses a payload template. Select one of these presets, or write your own template:
To see the output of a template, select Preview in the target editor. AI Studio renders the template with a sample event. It also checks the template when you save the target, and it rejects a template that does not produce valid JSON. A custom template can be a maximum of 64 KB. AI Studio stops a render after 2 seconds or 1 MB of output.
A custom template can use the event data, for example
.Event.ID, .Event.Topic, .ObjectType, .Action, .ObjectID, .ActorUserID, .Object, and .Target.Name. It can also use helper functions such as toJson, jsonStr, default, get, and date. The functions cannot read environment variables or files, and they cannot make network calls.
This custom template sends the object type, the action, and the name of the object:
.StudioLink. It is the AI Studio page that the event links to. AI Studio sets it only for guardrail alerts and outcome events, and only when it is an http or https URL. For example, in a Slack message:
Redaction
Before AI Studio stores an event, it replaces secret values with[REDACTED]. It also redacts each value that a template reads. AI Studio does not store the original object.
AI Studio redacts a JSON key when its name contains one of these fragments: password, secret, api_key, apikey, token, auth_key, authkey, conn_string, connstring, private_key, privatekey, passphrase, credential, client_key, access_key, authorization, cookie, or bearer. The match is not case-sensitive. For example, the API key of an LLM is always redacted.
To redact more keys, add fragments to WEBHOOKS_REDACT_KEYS.
Delivery Headers
AI Studio sends each delivery as an HTTPPOST with a JSON body and these headers:
AI Studio also sends the custom headers of the target, for example an
Authorization header that your receiver expects. A custom header cannot replace an X-Webhook-* header, Content-Type, Content-Length, or Host.
Permissions
Webhooks use thewebhooks resource in the Governance group. Refer to Role-Based Access Control.
These actions send platform data to an external URL, so the
webhooks resource is sensitive and privileged.