Skip to main content
GET
/
v3beta1
/
enterprise
/
guardrail-violations
List Guardrail Violations
curl --request GET \
  --url https://api.devin.ai/v3beta1/enterprise/guardrail-violations \
  --header 'Authorization: Bearer <token>'
{
  "items": [
    {
      "action_taken": "<string>",
      "confidence_score": 123,
      "created_at": 123,
      "event_id": "<string>",
      "guardrail_id": "<string>",
      "guardrail_name": "<string>",
      "org_id": "<string>",
      "reasoning": "<string>",
      "session_id": "<string>",
      "user_message": "<string>",
      "violation_id": 123
    }
  ],
  "end_cursor": "<string>",
  "has_next_page": false,
  "total": 123
}

Permissions

Requires a service user with the ManageEnterpriseSettings permission at the enterprise level.

Time filters

This endpoint supports optional time filters using the time_after and time_before query parameters.
  • Both time_after and time_before are Unix timestamps in seconds, interpreted as UTC.
  • If you provide time_before, you must also provide time_after.
  • The time range between time_after and time_before must be 100 days or less.
  • If no time filters are provided, the API returns guardrail violations for the full available history (subject to pagination).

Authorizations

Authorization
string
header
required

Service User credential (prefix: cog_)

Query Parameters

order
enum<string>
default:desc
Available options:
asc,
desc
time_before
integer | null
time_after
integer | null
after
string | null
first
integer
default:100
Required range: 1 <= x <= 200
session_id
string | null
guardrail_id
string | null

Response

Successful Response

items
GuardrailViolationResponse · object[]
required
end_cursor
string | null

Cursor to fetch the next page, or None if this is the last page.

has_next_page
boolean
default:false

Whether there are more items available after this page.

total
integer | null

Optional total count (can be omitted for performance).