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

> ## Agent Instructions
> These docs moved from docs.flintai.dev to docs.switchagents.ai. Use docs.switchagents.ai for every link and request.
> To search these docs from an AI tool, connect the MCP server at https://docs.switchagents.ai/mcp. The page index is at https://docs.switchagents.ai/llms.txt.

# List guardrail policies

> List AI-SPM guardrail policies for a workspace with optional filtering and pagination



## OpenAPI

````yaml /switch-trust/api-reference/openapi.json get /guardrails/policies/tenants/{tenant_id}/workspaces/{workspace_id}
openapi: 3.0.3
info:
  contact: {}
  description: Switch Trust API
  license:
    name: Switch AI
    url: https://www.sandboxaq.com/legal/eula
  title: Switch Trust API
  version: 1.0.0
servers:
  - description: Flint AI Platform (per-tenant instance)
    url: https://{instance}.flintai.dev/api/v1
    variables:
      instance:
        default: your-instance
        description: Your Flint AI instance subdomain
security: []
paths:
  /guardrails/policies/tenants/{tenant_id}/workspaces/{workspace_id}:
    get:
      tags:
        - guardrails
      summary: List guardrail policies
      description: >-
        List AI-SPM guardrail policies for a workspace with optional filtering
        and pagination
      operationId: ListAispmPolicies
      parameters:
        - description: Tenant ID
          in: path
          name: tenant_id
          required: true
          schema:
            type: string
        - description: Workspace ID
          in: path
          name: workspace_id
          required: true
          schema:
            type: string
        - description: Filter by policy name
          in: query
          name: name
          schema:
            type: string
        - description: Page number (1-based)
          in: query
          name: page
          schema:
            type: integer
        - description: Page size
          in: query
          name: page_size
          schema:
            type: integer
        - description: Sort order
          in: query
          name: order
          schema:
            enum:
              - ASC
              - DESC
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/guardrails.ListAispmPoliciesResult'
          description: Paginated list of policies
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/common.RequestError'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/common.RequestError'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/common.RequestError'
          description: Forbidden
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/common.RequestError'
          description: Internal Server Error
      security:
        - BearerAuth: []
components:
  schemas:
    guardrails.ListAispmPoliciesResult:
      properties:
        items:
          items:
            $ref: '#/components/schemas/guardrails.AispmPolicyRecord'
          type: array
        page:
          type: integer
        page_size:
          type: integer
        total_count:
          type: integer
        total_pages:
          type: integer
      type: object
    common.RequestError:
      description: Error responses returned by the API
      properties:
        code:
          example: 400
          type: integer
        message:
          example: Invalid request
          type: string
      required:
        - code
        - message
      type: object
    guardrails.AispmPolicyRecord:
      properties:
        created_at:
          type: string
        description:
          type: string
        detectors:
          $ref: '#/components/schemas/guardrails.AispmDetectors'
        id:
          type: string
        name:
          type: string
        updated_at:
          type: string
      type: object
    guardrails.AispmDetectors:
      properties:
        assistant:
          items:
            $ref: '#/components/schemas/guardrails.AispmDetectorEntry'
          type: array
        user:
          items:
            $ref: '#/components/schemas/guardrails.AispmDetectorEntry'
          type: array
      type: object
    guardrails.AispmDetectorEntry:
      properties:
        action:
          type: string
        args:
          additionalProperties: {}
          type: object
        custom_name:
          type: string
        severity:
          type: string
        type:
          type: string
      type: object
  securitySchemes:
    BearerAuth:
      description: Use this header with a Bearer token to authenticate requests.
      in: header
      name: Authorization
      type: apiKey

````