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

# List All Guardrails

> Fetches all guardrails in your workspace. Requires `x-api-key` authentication.



## OpenAPI

````yaml GET /ext/guardrail
openapi: 3.0.3
info:
  title: TruGen Developer Platform API
  version: 1.0.0
  description: OpenAPI specification for MCP endpoint
servers:
  - url: https://api.trugen.ai/v1
security: []
paths:
  /ext/guardrail:
    get:
      summary: Get all Guardrails
      description: >-
        Fetches all guardrails in your workspace. Requires `x-api-key`
        authentication.
      operationId: getGuardrails
      responses:
        '200':
          description: A list of guardrails
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                      format: uuid
                      example: dfbaa3c6-1e90-43df-869a-b023896a198c
                    key:
                      type: string
                      description: >-
                        Permanent slug derived from name at creation time. Never
                        regenerated, even if name changes later. This is the
                        identifier the running agent uses as the tool name.
                      example: hate_speech_filter
                    name:
                      type: string
                      example: Hate Speech Filter
                    category:
                      type: string
                      example: Content Safety
                    prompt:
                      type: string
                      example: >-
                        Trigger when the user uses hateful, discriminatory, or
                        abusive language toward a person or group.
                    response_message:
                      type: string
                      example: >-
                        I'm sorry, but I can't help with that. Let's keep things
                        respectful.
                    callback_url:
                      type: string
                      example: https://yourapp.com/webhooks/guardrail
                    is_active:
                      type: boolean
                      example: true
                    created_at:
                      type: string
                      format: date-time
                      example: '2026-08-14T11:38:46.479224Z'
                    updated_at:
                      type: string
                      format: date-time
                      example: '2026-08-14T11:38:46.479224Z'
                  required:
                    - id
                    - key
                    - name
                    - category
                    - prompt
                    - response_message
                    - callback_url
                    - is_active
                    - created_at
                    - updated_at
        '401':
          description: Unauthorized - missing or invalid API key
        '500':
          description: Internal server error
      security:
        - apiKeyAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````