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

# List Policy Rules

> List policy rules in the current workspace.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/policies
openapi: 3.1.0
info:
  description: >-
    Modular and extensible framework for building AI agents. This API requires
    JWT Bearer token authentication for most endpoints. Include your JWT token
    in the Authorization header. Public endpoints include /, /health, /docs,
    /redoc, and /openapi.json.
  title: AgentArea API
  version: 0.1.0
servers: []
security:
  - bearer: []
paths:
  /v1/policies:
    get:
      tags:
        - v1
        - protected
        - policies
      summary: List Policy Rules
      description: List policy rules in the current workspace.
      operationId: list_policy_rules_v1_policies_get
      parameters:
        - in: query
          name: subject_type
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/PolicySubjectType'
              - type: 'null'
            title: Subject Type
        - in: query
          name: subject_id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Subject Id
        - in: query
          name: effect
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/PolicyEffect'
              - type: 'null'
            title: Effect
        - in: query
          name: target
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Target
        - in: query
          name: enabled
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Enabled
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/PolicyRuleResponse'
                title: Response List Policy Rules V1 Policies Get
                type: array
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - HTTPBearer: []
components:
  schemas:
    PolicySubjectType:
      description: The kind of subject a rule binds to.
      enum:
        - workspace
        - agent
        - user
        - group
      title: PolicySubjectType
      type: string
    PolicyEffect:
      description: What a rule does when it applies.
      enum:
        - allow
        - deny
        - cap
        - approval
        - safety
        - egress
      title: PolicyEffect
      type: string
    PolicyRuleResponse:
      description: Serialized policy rule returned to clients.
      properties:
        condition:
          anyOf:
            - type: string
            - type: 'null'
          title: Condition
        effect:
          $ref: '#/components/schemas/PolicyEffect'
        enabled:
          title: Enabled
          type: boolean
        id:
          title: Id
          type: string
        params:
          additionalProperties: true
          title: Params
          type: object
        priority:
          title: Priority
          type: integer
        subject_id:
          title: Subject Id
          type: string
        subject_type:
          $ref: '#/components/schemas/PolicySubjectType'
        target:
          title: Target
          type: string
      required:
        - id
        - enabled
        - priority
        - subject_type
        - subject_id
        - target
        - effect
        - params
      title: PolicyRuleResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    bearer:
      bearerFormat: JWT
      description: JWT Bearer token for authentication
      scheme: bearer
      type: http
    HTTPBearer:
      scheme: bearer
      type: http

````