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

# Create a guardrail exception

> Softens a guardrail filter's action on a verdict for this app, one filter, detector ("" = any) and channel (text_user, text_system, tool_result, tool_call, tool_definition; tool_name narrows a tool channel). The action must be within the floor for the app's guardrail capability. A full administrator's exception is approved at once; anyone else's is proposed and the administrators are notified.



## OpenAPI

````yaml /swagger/5.16/ai-studio-swagger.yml post /apps/{id}/guardrail-exceptions
openapi: 3.0.1
info:
  title: Midsommar API
  description: This is the API for the Midsommar user and group management system.
  termsOfService: http://swagger.io/terms/
  contact:
    name: API Support
    url: http://www.swagger.io/support
    email: support@swagger.io
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  version: '1.0'
servers:
  - url: //localhost:8080/api/v1
security: []
paths:
  /apps/{id}/guardrail-exceptions:
    post:
      tags:
        - apps
      summary: Create a guardrail exception
      description: >-
        Softens a guardrail filter's action on a verdict for this app, one
        filter, detector ("" = any) and channel (text_user, text_system,
        tool_result, tool_call, tool_definition; tool_name narrows a tool
        channel). The action must be within the floor for the app's guardrail
        capability. A full administrator's exception is approved at once; anyone
        else's is proposed and the administrators are notified.
      parameters:
        - name: id
          in: path
          description: App ID
          required: true
          schema:
            type: integer
      requestBody:
        description: Exception
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/api.GuardrailExceptionInput'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api.GuardrailExceptionResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    api.GuardrailExceptionInput:
      type: object
      properties:
        action:
          type: string
        alert_event:
          type: string
        channel:
          type: string
        detector:
          type: string
        expires_after_days:
          type: integer
        filter_id:
          type: integer
        justification:
          type: string
        source_event:
          type: integer
        tool_name:
          type: string
    api.GuardrailExceptionResponse:
      type: object
      properties:
        action:
          type: string
        alert_event:
          type: string
          description: AlertEvent names the event the alert action raises.
        app_id:
          type: integer
        approved_at:
          type: string
        approved_by:
          type: integer
        channel:
          type: string
        content_hash:
          type: string
          description: >-
            ContentHash identifies the reviewed content; approving takes it
            back.
        created_at:
          type: string
        detector:
          type: string
        expires_after_days:
          type: integer
        filter_id:
          type: integer
        hit_count:
          type: integer
        id:
          type: integer
        justification:
          type: string
        last_hit_at:
          type: string
        proposed_by:
          type: integer
        source_event:
          type: integer
        status:
          type: string
        tool_name:
          type: string
        updated_at:
          type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````