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

# Retrieve a guardrail



## OpenAPI

````yaml api-reference/openapi.json GET /api/v1/guardrails/{guardrail_id}
openapi: 3.0.3
info:
  title: Duckie API
  version: 1.0.0
  description: >-
    Read-only API for exporting Duckie runs, tool catalog data, agents,
    guidelines, guardrails, and runbooks.
servers:
  - url: https://app.useduckie.ai
    description: Duckie app
security:
  - DuckieApiKey: []
tags:
  - name: Runs
    description: Run history, run detail, and run filter helpers.
  - name: Tools
    description: Built-in, app, custom, and MCP tools available to the organization.
  - name: Agents
    description: Agent configuration data.
  - name: Guidelines
    description: Published guidelines.
  - name: Guardrails
    description: Escalation and restriction guardrails.
  - name: Runbooks
    description: Published, non-deleted runbooks.
paths:
  /api/v1/guardrails/{guardrail_id}:
    get:
      tags:
        - Guardrails
      summary: Retrieve a guardrail
      operationId: getGuardrail
      parameters:
        - $ref: '#/components/parameters/GuardrailId'
      responses:
        '200':
          description: Guardrail.
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/XRateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/XRateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/XRateLimitReset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GuardrailResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  parameters:
    GuardrailId:
      name: guardrail_id
      in: path
      required: true
      schema:
        type: string
        format: uuid
  headers:
    XRateLimitLimit:
      description: Request limit for the active rate-limit bucket.
      schema:
        type: integer
    XRateLimitRemaining:
      description: Requests remaining in the active rate-limit bucket.
      schema:
        type: integer
    XRateLimitReset:
      description: Unix timestamp when the active rate-limit bucket resets.
      schema:
        type: integer
    RetryAfter:
      description: Seconds to wait before retrying.
      schema:
        type: integer
        minimum: 1
  schemas:
    GuardrailResponse:
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/Guardrail'
    Guardrail:
      type: object
      required:
        - id
        - object
        - title
        - content
        - type
        - created_at
        - updated_at
      properties:
        id:
          type: string
          format: uuid
        object:
          type: string
          enum:
            - guardrail
        title:
          type: string
        content:
          type: string
        type:
          $ref: '#/components/schemas/GuardrailType'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/Error'
    GuardrailType:
      type: string
      enum:
        - escalation
        - restriction
    Error:
      type: object
      required:
        - code
        - message
        - request_id
      properties:
        code:
          type: string
          enum:
            - invalid_request
            - unauthenticated
            - permission_denied
            - not_found
            - rate_limited
            - internal_error
        message:
          type: string
        request_id:
          type: string
        retry_after:
          type: integer
          minimum: 1
  responses:
    BadRequest:
      description: The request was invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: The request is missing a valid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Forbidden:
      description: The API key does not have the required scope.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: The resource was not found in the API key's organization.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    RateLimited:
      description: A rate limit was exceeded.
      headers:
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
        X-RateLimit-Limit:
          $ref: '#/components/headers/XRateLimitLimit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/XRateLimitRemaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/XRateLimitReset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalError:
      description: The API could not complete the request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    DuckieApiKey:
      type: http
      scheme: bearer
      description: API key created in Duckie Settings -> API Access.

````