> ## Documentation Index
> Fetch the complete documentation index at: https://docs.devin.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# List Guardrail Violations

> List guardrail violations across the enterprise.

For an overview of how guardrails work and how to configure them, see the [AI Guardrails](/enterprise/features/ai-guardrails) feature guide.

## 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).


## OpenAPI

````yaml v3-openapi.yaml GET /v3beta1/enterprise/guardrail-violations
openapi: 3.1.0
info:
  description: Devin v3 API with Service User authentication and RBAC
  title: Devin API v3
  version: 3.0.0
servers: []
security:
  - bearerAuth: []
paths:
  /v3beta1/enterprise/guardrail-violations:
    get:
      tags:
        - guardrail_violations
      summary: List Guardrail Violations
      description: List guardrail violations across the enterprise.
      operationId: >-
        handle_get_enterprise_guardrail_violations_v3beta1_enterprise_guardrail_violations_get
      parameters:
        - in: query
          name: order
          required: false
          schema:
            default: desc
            enum:
              - asc
              - desc
            title: Order
            type: string
        - in: query
          name: time_before
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Time Before
        - in: query
          name: time_after
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Time After
        - in: query
          name: after
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: After
        - in: query
          name: first
          required: false
          schema:
            default: 100
            maximum: 200
            minimum: 1
            title: First
            type: integer
        - in: query
          name: session_id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Session Id
        - in: query
          name: guardrail_id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Guardrail Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/PaginatedResponse_GuardrailViolationResponse_
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
components:
  schemas:
    PaginatedResponse_GuardrailViolationResponse_:
      properties:
        end_cursor:
          anyOf:
            - type: string
            - type: 'null'
          description: Cursor to fetch the next page, or None if this is the last page.
          title: End Cursor
        has_next_page:
          default: false
          description: Whether there are more items available after this page.
          title: Has Next Page
          type: boolean
        items:
          items:
            $ref: '#/components/schemas/GuardrailViolationResponse'
          title: Items
          type: array
        total:
          anyOf:
            - type: integer
            - type: 'null'
          description: Optional total count (can be omitted for performance).
          title: Total
      required:
        - items
      title: PaginatedResponse[GuardrailViolationResponse]
      type: object
    ProblemDetail:
      description: >-
        RFC 9457 application/problem+json error body for the v3 API.


        detail is retained from the legacy {"detail": ...} body for back-compat;
        the

        other members are additive. errors carries field-level validation
        failures

        (422 only).
      properties:
        detail:
          anyOf:
            - type: string
            - type: 'null'
          description: A human-readable explanation specific to this occurrence.
          title: Detail
        errors:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          description: Field-level validation errors (422 responses only).
          title: Errors
        instance:
          anyOf:
            - type: string
            - type: 'null'
          description: A URI reference (the request path) for this occurrence.
          title: Instance
        status:
          description: The HTTP status code.
          title: Status
          type: integer
        title:
          description: A short, human-readable summary of the problem type.
          title: Title
          type: string
        type:
          default: about:blank
          description: A URI reference identifying the problem type.
          title: Type
          type: string
      required:
        - title
        - status
      title: ProblemDetail
      type: object
    GuardrailViolationResponse:
      properties:
        action_taken:
          title: Action Taken
          type: string
        confidence_score:
          title: Confidence Score
          type: number
        created_at:
          title: Created At
          type: integer
        event_id:
          title: Event Id
          type: string
        guardrail_id:
          title: Guardrail Id
          type: string
        guardrail_name:
          title: Guardrail Name
          type: string
        org_id:
          title: Org Id
          type: string
        reasoning:
          title: Reasoning
          type: string
        session_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Session Id
        user_message:
          title: User Message
          type: string
        violation_id:
          title: Violation Id
          type: integer
      required:
        - violation_id
        - org_id
        - session_id
        - event_id
        - guardrail_id
        - guardrail_name
        - confidence_score
        - action_taken
        - reasoning
        - user_message
        - created_at
      title: GuardrailViolationResponse
      type: object
  securitySchemes:
    bearerAuth:
      description: 'Service User credential (prefix: cog_)'
      scheme: bearer
      type: http

````