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

# Get Policy

Get a single Policy by ID.

<Info>
  This endpoint is available only for API version <code>2026-06-01</code>. Send <code>whitecircle-version: 2026-06-01</code>.
</Info>


## OpenAPI

````yaml latest/openapi.json GET /api/policy/get_by_id
openapi: 3.1.0
info:
  title: WhiteCircle API Backend
  description: 'Authentication: Bearer API Key Required'
  license:
    name: ''
  version: '2026-06-01'
servers:
  - url: https://eu.whitecircle.com
  - url: https://us.whitecircle.com
security: []
tags:
  - name: Session
    description: Session-based content checking and moderation
  - name: User
    description: User risk assessment and scoring
  - name: Policy
    description: Policy management CRUD
  - name: Metric
    description: Metric management CRUD
  - name: Artifact
    description: Standalone artifact moderation
  - name: Events
    description: Append-only event ingestion and public event lookup
  - name: Condition
    description: Metadata-driven policy routing
paths:
  /api/policy/get_by_id:
    get:
      tags:
        - Policy
      operationId: get_by_id_v2
      parameters:
        - name: whitecircle-version
          in: header
          description: API Version
          required: true
          schema:
            type: string
          example: '2026-06-01'
        - name: id
          in: query
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicPolicyV2'
        '400':
          description: Bad Request
      security:
        - bearerAuth: []
components:
  schemas:
    PublicPolicyV2:
      type: object
      required:
        - id
        - name
        - flagged_content
        - content_type
        - event_selector_list
        - role_list
        - applies_to
        - mode
        - rollout_percentage
        - created_at
        - state
        - country_codes
      properties:
        id:
          type: string
        name:
          type: string
        flagged_content:
          type: string
        allowed_content:
          type:
            - string
            - 'null'
        content_type:
          $ref: '#/components/schemas/PublicContentType'
        event_selector_list:
          type: array
          items:
            $ref: '#/components/schemas/PolicyEventSelector'
        role_list:
          type: array
          items:
            $ref: '#/components/schemas/PolicyRole'
        applies_to:
          $ref: '#/components/schemas/PublicAppliesTo'
        mode:
          $ref: '#/components/schemas/PublicPolicyMode'
        rollout_percentage:
          type: integer
          format: int32
          minimum: 0
        created_at:
          type: string
          format: date-time
        state:
          $ref: '#/components/schemas/PublicPolicyState'
        country_codes:
          type: array
          items:
            type: string
        severity_level_id:
          type:
            - string
            - 'null'
          format: uuid
    PublicContentType:
      type: string
      enum:
        - session
        - artifact
        - any
      example: session
    PolicyEventSelector:
      type: object
      description: Structured policy selector used by Events-aware policy matching.
      required:
        - type
      properties:
        type:
          $ref: '#/components/schemas/PolicyEventSelectorType'
        field:
          type:
            - string
            - 'null'
        kind:
          type:
            - string
            - 'null'
    PolicyRole:
      type: string
      description: >-
        Role restriction used by the new policy targeting model. Empty role
        lists mean any role.
      enum:
        - user
        - assistant
    PublicAppliesTo:
      type: string
      enum:
        - input
        - output
        - any
      example: input
    PublicPolicyMode:
      type: string
      enum:
        - prod
        - shadow
      example: prod
    PublicPolicyState:
      type: string
      enum:
        - active
        - inactive
        - draft
      example: active
    PolicyEventSelectorType:
      type: string
      description: Runtime surface selected by a policy for Events-aware matching.
      enum:
        - message
        - tool
        - function
        - agent
        - artifact
        - reasoning
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: 'API Key required. Format: Bearer wc-your-api-key'

````