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

# Update a policy enforcer

> Update the policy list and/or enabled flag of an existing policy enforcer. enforcedOn cannot be changed.



## OpenAPI

````yaml /api-specs/cloud/governance-api.json patch /policy-enforcers/{id}
openapi: 3.0.3
info:
  description: Service responsible for managing Domino Governance feature
  title: Domino Governance API
  contact:
    name: Domino Data Lab
    url: https://tickets.dominodatalab.com/hc/en-us
    email: support@dominodatalab.com
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  version: '1.0'
servers:
  - url: https://mycluster.domino.tech/api/governance/v1
    description: >-
      Replace 'mycluster.domino.tech' with your Domino cluster hostname. For
      Domino Cloud customers, that is `your-subdomain`.domino.tech (e.g.,
      acme.domino.tech). For self-hosted deployments, it is the hostname you
      reach the Domino UI at.
security: []
paths:
  /policy-enforcers/{id}:
    patch:
      tags:
        - policy-enforcers
      summary: Update a policy enforcer
      description: >-
        Update the policy list and/or enabled flag of an existing policy
        enforcer. enforcedOn cannot be changed.
      parameters:
        - description: ID of policy enforcer to update
          name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/server.UpdatePolicyEnforcerRequest'
        description: Fields to update
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/guardrails.PolicyEnforcer'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/server.HTTPError'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/server.HTTPError'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/server.HTTPError'
        '423':
          description: Locked
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/server.HTTPError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/server.HTTPError'
components:
  schemas:
    server.UpdatePolicyEnforcerRequest:
      type: object
      properties:
        enabled:
          type: boolean
        policyIds:
          type: array
          items:
            type: string
    guardrails.PolicyEnforcer:
      type: object
      properties:
        createdAt:
          type: string
        createdBy:
          $ref: '#/components/schemas/guardrails.User'
        enabled:
          type: boolean
        enforcedOn:
          $ref: '#/components/schemas/guardrails.PolicyEnforcerTarget'
        id:
          type: string
        policyIds:
          type: array
          items:
            type: string
        updatedAt:
          type: string
        updatedBy:
          $ref: '#/components/schemas/guardrails.User'
    server.HTTPError:
      type: object
      properties:
        code:
          description: >-
            Code is a stable machine-readable error identifier; absent on most
            errors.
          allOf:
            - $ref: '#/components/schemas/guardrails.ErrorCode'
        message:
          type: string
    guardrails.User:
      type: object
      properties:
        firstName:
          type: string
        id:
          type: string
        lastName:
          type: string
        userName:
          type: string
    guardrails.PolicyEnforcerTarget:
      type: string
      enum:
        - App
      x-enum-varnames:
        - PolicyEnforcerTargetApp
    guardrails.ErrorCode:
      type: string
      enum:
        - BUNDLE_REQUIRES_POLICY
      x-enum-varnames:
        - CodeBundleRequiresPolicy

````

## Related topics

- [Create a policy enforcer](/api-reference/policy-enforcers/create-a-policy-enforcer.md)
- [List policy enforcers](/api-reference/policy-enforcers/list-policy-enforcers.md)
- [Update the policy of a bundle](/api-reference/bundles/update-the-policy-of-a-bundle.md)
- [Create new bundle](/api-reference/bundles/create-new-bundle.md)
