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

# Update Rule



## OpenAPI

````yaml /api-reference/openapi.json patch /api/v1/admin/entitlement-rules/{rule_id}
openapi: 3.1.0
info:
  title: Sakshi — Agent Governance API
  description: >-
    Registry (KYA), decision flight recorder, bounded autonomy, evidence packs,
    fairness screens. Auth: bearer ingest keys create evidence; OIDC JWTs with
    governance roles mutate state.
  version: 0.1.0
servers:
  - url: https://demo.rotavision.com
    description: Public demo (read-only, synthetic data)
  - url: https://{host}
    description: Your Sakshi deployment (single-tenant, in your environment)
    variables:
      host:
        default: sakshi.your-company.internal
security:
  - bearerAuth: []
paths:
  /api/v1/admin/entitlement-rules/{rule_id}:
    patch:
      tags:
        - access
      summary: Update Rule
      operationId: update_rule_api_v1_admin_entitlement_rules__rule_id__patch
      parameters:
        - name: rule_id
          in: path
          required: true
          schema:
            type: string
            title: Rule Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RuleUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RuleOut'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    RuleUpdate:
      properties:
        match_on:
          anyOf:
            - type: string
            - type: 'null'
          title: Match On
        claim_value:
          anyOf:
            - type: string
              maxLength: 512
            - type: 'null'
          title: Claim Value
        match_mode:
          anyOf:
            - type: string
            - type: 'null'
          title: Match Mode
        grants_role:
          anyOf:
            - type: string
            - type: 'null'
          title: Grants Role
        grants_org_unit:
          anyOf:
            - type: string
            - type: 'null'
          title: Grants Org Unit
        priority:
          anyOf:
            - type: integer
            - type: 'null'
          title: Priority
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Enabled
        note:
          anyOf:
            - type: string
            - type: 'null'
          title: Note
      type: object
      title: RuleUpdate
    RuleOut:
      properties:
        id:
          type: string
          title: Id
        match_on:
          type: string
          title: Match On
        match_mode:
          type: string
          title: Match Mode
        claim_value:
          type: string
          title: Claim Value
        grants_role:
          anyOf:
            - type: string
            - type: 'null'
          title: Grants Role
        grants_org_unit:
          anyOf:
            - type: string
            - type: 'null'
          title: Grants Org Unit
        priority:
          type: integer
          title: Priority
        enabled:
          type: boolean
          title: Enabled
        note:
          anyOf:
            - type: string
            - type: 'null'
          title: Note
        created_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Created By
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updated At
      type: object
      required:
        - id
        - match_on
        - match_mode
        - claim_value
        - grants_role
        - grants_org_unit
        - priority
        - enabled
        - note
        - created_by
        - created_at
        - updated_at
      title: RuleOut
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Ingest API key or OIDC JWT. See /authentication.

````