{"templateId":"markdown","versions":[{"version":"v1.44","label":"v1.44 STS","link":"/pt-br/products/custody/governance/policies/manage-policies","default":true,"active":false,"folderId":"714bb270"},{"version":"v1.43","label":"v1.43 LTS","link":"/pt-br/products/custody/v1.43/governance/policies/manage-policies","default":false,"active":true,"folderId":"714bb270"},{"version":"v1.42","label":"v1.42 STS","link":"/pt-br/products/custody/v1.42/governance/policies/manage-policies","default":false,"active":false,"folderId":"714bb270"},{"version":"v1.34","label":"v1.34 LTS","link":"/pt-br/products/custody/v1.34/governance/policies/manage-policies","default":false,"active":false,"folderId":"714bb270"},{"version":"v1.26","label":"v1.26 LTS","link":"/pt-br/products/custody/v1.26/governance/policies/manage-policies","default":false,"active":false,"folderId":"714bb270"},{"version":"v1.19","label":"v1.19 LTS","link":"/pt-br/products/custody/v1.19/governance/policies/manage-policies","default":false,"active":false,"folderId":"714bb270"},{"version":"v1.15","label":"v1.15 LTS","link":"/pt-br/products/custody/v1.15/governance/policies/manage-policies","default":false,"active":false,"folderId":"714bb270"}],"sharedDataIds":{"sidebar":"sidebar-@l10n/pt-BR/products/custody/@v1.15/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["tabs","tab"]},"type":"markdown"},"seo":{"title":"Manage policies","description":"User guides, API reference, and support resources.","siteUrl":"https://docs.ripple.com","lang":"en-US"},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"manage-policies","__idx":0},"children":["Manage policies"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use this page for post-genesis policy operations. For policy mechanics, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/pt-br/products/custody/v1.43/governance/policies"},"children":["Policies"]},". For launch design, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/pt-br/products/custody/v1.43/governance/genesis/design-your-policies"},"children":["Design your policies"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"policy-actions","__idx":1},"children":["Policy actions"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Action"},"children":["Action"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"UI procedure"},"children":["UI procedure"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"API procedure"},"children":["API procedure"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Create a policy"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#create-a-policy-in-the-ui"},"children":["Create a policy in the UI"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#create-a-policy-with-the-api"},"children":["Create a policy with the API"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Create a system-signed policy"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Use the API procedure."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#create-a-policy-for-system-signed-intents-with-the-api"},"children":["Create a policy for system-signed intents with the API"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Update a policy"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#update-a-policy-in-the-ui"},"children":["Update a policy in the UI"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#update-a-policy-with-the-api"},"children":["Update a policy with the API"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Lock and unlock a policy"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#lock-or-unlock-a-policy-in-the-ui"},"children":["Lock or unlock a policy in the UI"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#lock-or-unlock-a-policy-with-the-api"},"children":["Lock or unlock a policy with the API"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"api-reference-and-shared-process","__idx":2},"children":["API reference and shared process"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Task"},"children":["Task"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"API reference"},"children":["API reference"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Propose a policy intent"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/pt-br/products/custody/v1.43/reference/api/openapi/intents/createintent"},"children":["Propose an intent"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Dry run a policy intent"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/pt-br/products/custody/v1.43/reference/api/openapi/intents/intentdryrun"},"children":["Perform a dry run"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["List policies"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/pt-br/products/custody/v1.43/reference/api/openapi/policies/getpolicies"},"children":["List policies"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Get policy details"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/pt-br/products/custody/v1.43/reference/api/openapi/policies/getpolicy"},"children":["Get policy details"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Check remaining approvers"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/pt-br/products/custody/v1.43/reference/api/openapi/intents/getremainingusers"},"children":["Get remaining users"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Policy changes use the standard intent flow. For signing, approval, and status checks, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/pt-br/products/custody/v1.43/governance/intents/manage-intents-and-approvals"},"children":["Manage intents and approvals"]},", ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/pt-br/products/custody/v1.43/identity-and-access/authentication/authenticate-api-requests#signing-intents-state-mutation-operations"},"children":["Sign intents"]},", and ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/pt-br/products/custody/v1.43/governance/intents/manage-intents-and-approvals#check-state"},"children":["Check updates"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The SDK examples on this page assume a configured client. To configure one, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/pt-br/products/custody/v1.43/get-started/integrate-via-sdk"},"children":["Integrate via SDK"]},". The SDK methods build, sign, and submit the intent for you. They return a pending intent that you can wait on."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"common-operations","__idx":3},"children":["Common operations"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Operation"},"children":["Operation"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Intent type"},"children":["Intent type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Use when"},"children":["Use when"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Create policy"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["v0_CreatePolicy"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Add a new approval rule."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Update policy"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["v0_UpdatePolicy"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Change matching, condition, workflow, scope, rank, or metadata."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Lock policy"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["v0_LockPolicy"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Disable a policy without deleting it."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Unlock policy"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["v0_UnlockPolicy"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Re-enable a locked policy."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"create-a-policy-in-the-ui","__idx":4},"children":["Create a policy in the UI"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The UI creates the policy in the domain you are working in."]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Go to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Policies"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Create policy"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Complete the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Information"]},", ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Conditions"]},", ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Evaluation order"]},", and ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Approval workflow"]}," steps."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["On the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Review"]}," step, review the policy, and then select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Submit for approval"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Sign the operation with the mobile app."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The policy is created after the intent is approved and executed."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"information","__idx":5},"children":["Information"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Enter a policy name and, optionally, a description. The UI generates the policy ID, and you can't change it."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Select the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Scope"]},": ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Self"]}," applies the policy to intents that target the current domain, ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Descendants"]}," applies it to intents that target its subdomains, and ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Self & descendants"]}," applies it to both. The default is ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Self"]},". A policy with ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Descendants"]}," or ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Self & descendants"]}," scope adds its workflow to matching subdomain intents. It doesn't replace the subdomain's own policy. For details, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/pt-br/products/custody/v1.43/governance/policies/reference#policy-selection"},"children":["Policy selection"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Optionally, add custom properties as name-value pairs. Under ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Initial lock status"]},", keep ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Unlocked"]}," so the policy starts matching intents as soon as it exists. To create the policy in a locked state, select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Locked"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"conditions","__idx":6},"children":["Conditions"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Select the intent types that the policy manages. The UI groups the intent types by entity, such as ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Accounts"]},", ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Transactions & Transfers"]},", and ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Policies"]},". ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Select all intent types"]}," selects every intent type the UI offers. You must select at least one intent type. For the selectable intent types, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/pt-br/products/custody/v1.43/governance/policies/reference#intent-types-in-the-ui"},"children":["Intent types in the UI"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To add conditions that the intent must also fulfill, select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Create an additional condition"]},". Select a condition from ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Predefined conditions"]},", enter its ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Value"]},", and select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Add condition +"]},". The UI combines each condition you add with the existing condition using ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["And"]},". You can also edit the condition JSON directly in the editor, for example to combine conditions with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Or"]},". For the predefined conditions and the expressions they generate, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/pt-br/products/custody/v1.43/governance/policies/reference#condition-types-in-the-ui"},"children":["Condition types in the UI"]},". For the JavaScript syntax used in conditions, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/pt-br/products/custody/v1.43/governance/policies/reference#javascript-rules-for-conditions"},"children":["JavaScript rules for conditions"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"evaluation-order","__idx":7},"children":["Evaluation order"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Enter the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Importance rank"]},", from 0 to 1000. The default is 1. The step lists the existing policies in the current domain by rank, so you can place the new policy among them. Rank orders only the policies of one domain. For help choosing a rank, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/pt-br/products/custody/v1.43/governance/policies/reference#rank-guidance"},"children":["Rank guidance"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"approval-workflow","__idx":8},"children":["Approval workflow"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Approval workflow (recommended)"]}," to require approvals in one or more steps, ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Always approve"]}," to approve matching intents without user approvals, or ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Always reject"]}," to reject them without user intervention. For how each option maps to the policy's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["workflow"]}," field, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/pt-br/products/custody/v1.43/governance/policies/reference#workflow-options-in-the-ui"},"children":["Workflow options in the UI"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To build an approval workflow, enter the number of required approvals in ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Amount"]}," and select the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Role"]}," that provides them. Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Add condition +"]}," to add another approval group to the step, and combine the groups with ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["And"]}," (both groups must approve) or ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Or"]}," (either group can approve). Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Add step +"]}," to add a sequential step."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When you submit an intent, you count as the first approver in the selected policy of your own domain, so include your user role in the first step. For all workflow rules, including system-signed behavior, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/pt-br/products/custody/v1.43/governance/policies/reference#workflow-objects"},"children":["Workflow objects"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"review","__idx":9},"children":["Review"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Review"]}," step shows the policy information, including the rank as ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Evaluation order"]},", followed by the intent types, the additional conditions as JSON, and the approval workflow. Review the policy, and then select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Submit for approval"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"create-a-policy-with-the-api","__idx":10},"children":["Create a policy with the API"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Create a policy by submitting a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["v0_CreatePolicy"]}," intent. The following dry-run request body matches the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/pt-br/products/custody/v1.43/reference/api/openapi/intents/intentdryrun"},"children":["Perform a dry run"]}," operation and can be signed and submitted with the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/pt-br/products/custody/v1.43/reference/api/openapi/intents/createintent"},"children":["Propose an intent"]}," operation after review."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Before you create a policy, prepare a new policy ID and a new intent ID in standard UUID format. Also confirm the role names, intent types, scope, condition paths, workflow, and rank."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The following examples create a policy with the API and with each SDK:"]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"API","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"author\": {\n    \"id\": \"6ac20654-450e-29e4-65e2-1bdecb7db7c4\",\n    \"domainId\": \"9067d363-6411-498b-a32b-15d230a86706\"\n  },\n  \"expiryAt\": \"2026-06-30T15:30:00.000Z\",\n  \"targetDomainId\": \"9067d363-6411-498b-a32b-15d230a86706\",\n  \"id\": \"7d256a32-812e-4a66-9a56-42ebfac5426a\",\n  \"payload\": {\n    \"id\": \"5b440ba5-d013-11eb-8cd0-dcfb48cfb3cb\",\n    \"alias\": \"policy-governance\",\n    \"rank\": 700,\n    \"intentTypes\": [\n      \"v0_CreatePolicy\",\n      \"v0_UpdatePolicy\",\n      \"v0_LockPolicy\",\n      \"v0_UnlockPolicy\"\n    ],\n    \"scope\": \"Self\",\n    \"scriptingEngine\": \"Javascript_v0\",\n    \"condition\": {\n      \"expression\": \"context.references.users[context.request.author.id].roles.includes('policy-operator')\",\n      \"type\": \"Expression\"\n    },\n    \"workflow\": [\n      {\n        \"left\": {\n          \"role\": \"policy-operator\",\n          \"quorum\": 2,\n          \"type\": \"RoleQuorum\"\n        },\n        \"right\": {\n          \"role\": \"compliance\",\n          \"quorum\": 1,\n          \"type\": \"RoleQuorum\"\n        },\n        \"type\": \"And\"\n      }\n    ],\n    \"lock\": \"Unlocked\",\n    \"description\": \"Controls policy lifecycle operations in the root domain.\",\n    \"customProperties\": {},\n    \"type\": \"v0_CreatePolicy\"\n  },\n  \"description\": \"Create policy governance policy\",\n  \"customProperties\": {},\n  \"type\": \"Propose\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Dry run before submitting:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"sh","header":{"controls":{"copy":{}}},"source":"curl -X POST \"${CUSTODY_API_URL}/v1/intents/dry-run\" \\\n  -H \"Authorization: Bearer ${JWT_TOKEN}\" \\\n  -H \"Content-Type: application/json\" \\\n  -d @create-policy-intent.json\n","lang":"sh"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Submit the signed intent:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"sh","header":{"controls":{"copy":{}}},"source":"curl -X POST \"${CUSTODY_API_URL}/v1/intents\" \\\n  -H \"Authorization: Bearer ${JWT_TOKEN}\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"requestId: 8b6571b9-493c-49fb-9d92-e19b6f39f7cf\" \\\n  -d @signed-create-policy-intent.json\n","lang":"sh"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"TypeScript","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"import { roleQuorum } from '@ripple/ripple-custody-client-lib-typescript';\n\nconst pending = await client.governance.policies.create(\n  'policy-governance',\n  700, // rank\n  'Self', // scope\n  'Javascript_v0', // scripting engine\n  {\n    intentTypes: ['v0_CreatePolicy', 'v0_UpdatePolicy', 'v0_LockPolicy', 'v0_UnlockPolicy'],\n    condition: {\n      type: 'Expression',\n      expression:\n        \"context.references.users[context.request.author.id].roles.includes('policy-operator')\",\n    },\n    workflow: [\n      { type: 'And', left: roleQuorum('policy-operator', 2), right: roleQuorum('compliance', 1) },\n    ],\n    description: 'Controls policy lifecycle operations in the root domain.',\n  },\n);\nawait pending.waitAccepted(30_000);\nawait pending.waitExecuted(120_000);\n","lang":"typescript"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Java","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"CorePolicyCondition condition = new CorePolicyCondition(new CorePolicyConditionExpression()\n    .expression(\"context.references.users[context.request.author.id].roles.includes('policy-operator')\")\n    .type(CorePolicyConditionExpression.TypeEnum.EXPRESSION));\n\nCoreWorkflowCondition approvals = new CoreWorkflowCondition(new CoreWorkflowConditionAnd()\n    .left(Builders.roleQuorum(\"policy-operator\", 2))\n    .right(Builders.roleQuorum(\"compliance\", 1))\n    .type(CoreWorkflowConditionAnd.TypeEnum.AND));\n\nPendingIntent pending = client.governance().policies().create(\n    domainId,\n    null, // the SDK generates the policy ID\n    \"policy-governance\",\n    700,\n    List.of(CoreIntentType.V0_CREATE_POLICY, CoreIntentType.V0_UPDATE_POLICY,\n        CoreIntentType.V0_LOCK_POLICY, CoreIntentType.V0_UNLOCK_POLICY),\n    CorePolicyScope.SELF,\n    CoreScriptingEngine.JAVASCRIPT_V0,\n    condition,\n    List.of(approvals),\n    Map.of());\npending.waitAccepted(60);\npending.waitExecuted(120);\n","lang":"java"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The Java ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["create"]}," method doesn't take a description and always creates the policy unlocked."]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Python","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"from ripple_custody_client_lib_python.generated import (\n    CorePolicyCondition,\n    CoreWorkflowCondition,\n)\n\ncondition = CorePolicyCondition.from_dict({\n    \"type\": \"Expression\",\n    \"expression\": \"context.references.users[context.request.author.id].roles.includes('policy-operator')\",\n})\n\npending = client.governance.policies.create(\n    \"policy-governance\",\n    700,  # rank\n    \"Self\",  # scope\n    \"Javascript_v0\",  # scripting engine\n    intent_types=[\"v0_CreatePolicy\", \"v0_UpdatePolicy\", \"v0_LockPolicy\", \"v0_UnlockPolicy\"],\n    condition=condition,\n    workflow=[CoreWorkflowCondition.from_dict({\n        \"type\": \"And\",\n        \"left\": {\"type\": \"RoleQuorum\", \"role\": \"policy-operator\", \"quorum\": 2},\n        \"right\": {\"type\": \"RoleQuorum\", \"role\": \"compliance\", \"quorum\": 1},\n    })],\n    description=\"Controls policy lifecycle operations in the root domain.\",\n)\npending.wait_accepted(timeout=30)\npending.wait_executed(timeout=120)\n","lang":"python"},"children":[]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"update-a-policy","__idx":11},"children":["Update a policy"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["v0_UpdatePolicy"]}," to replace the mutable policy fields. Include the current policy ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["reference.id"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["reference.revision"]},", then provide the updated alias, rank, scope, scripting engine, condition, workflow, description, and custom properties."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"update-a-policy-in-the-ui","__idx":12},"children":["Update a policy in the UI"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Go to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Policies"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Open the contextual menu at the end of the policy row and select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Edit policy"]},". This option isn't available for a locked policy."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Update the fields in the wizard steps."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["On the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Review"]}," step, select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Submit for approval"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Sign the operation with the mobile app."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The UI always submits an explicit list of intent types and never includes ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["intentOrigin"]},". If you edit a policy that someone created through the API, check the payload on the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Review"]}," step. The UI makes these changes:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["It gives a policy without ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["intentTypes"]}," every intent type that the UI offers."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["It drops intent types without a UI selector, such as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["v0_NotarizeData"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["It turns a system-signed policy into a user-signed one."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For details, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/pt-br/products/custody/v1.43/governance/policies/reference#ui-policy-builder-mapping"},"children":["UI policy builder mapping"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Updating a policy changes its revision. Open intents that use the policy fail with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["StaleIntent"]},", or with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PolicyRevisionMismatch"]}," if a decision arrives first. For details, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/pt-br/products/custody/v1.43/governance/policies/reference#policy-changes-and-open-intents"},"children":["Policy changes and open intents"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"update-a-policy-with-the-api","__idx":13},"children":["Update a policy with the API"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The following examples update a policy with the API and with each SDK:"]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"API","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"payload\": {\n    \"reference\": {\n      \"id\": \"5b440ba5-d013-11eb-8cd0-dcfb48cfb3cb\",\n      \"revision\": 3\n    },\n    \"alias\": \"policy-governance\",\n    \"rank\": 750,\n    \"intentTypes\": [\n      \"v0_CreatePolicy\",\n      \"v0_UpdatePolicy\",\n      \"v0_LockPolicy\",\n      \"v0_UnlockPolicy\"\n    ],\n    \"scope\": \"Self\",\n    \"scriptingEngine\": \"Javascript_v0\",\n    \"condition\": {\n      \"expression\": \"context.references.users[context.request.author.id].roles.includes('policy-operator')\",\n      \"type\": \"Expression\"\n    },\n    \"workflow\": [\n      {\n        \"left\": {\n          \"role\": \"policy-operator\",\n          \"quorum\": 2,\n          \"type\": \"RoleQuorum\"\n        },\n        \"right\": {\n          \"role\": \"compliance\",\n          \"quorum\": 2,\n          \"type\": \"RoleQuorum\"\n        },\n        \"type\": \"And\"\n      }\n    ],\n    \"description\": \"Controls policy lifecycle operations in the root domain.\",\n    \"customProperties\": {},\n    \"type\": \"v0_UpdatePolicy\"\n  }\n}\n","lang":"json"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"TypeScript","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"// v0_UpdatePolicy replaces the mutable fields, so pass every value you want to keep.\n// The SDK fetches the current revision when you omit `revision`.\nconst pending = await client.governance.policies.update(\n  policyId,\n  'policy-governance',\n  750, // rank\n  'Self',\n  'Javascript_v0',\n  {\n    intentTypes: ['v0_CreatePolicy', 'v0_UpdatePolicy', 'v0_LockPolicy', 'v0_UnlockPolicy'],\n    condition: {\n      type: 'Expression',\n      expression:\n        \"context.references.users[context.request.author.id].roles.includes('policy-operator')\",\n    },\n    workflow: [\n      { type: 'And', left: roleQuorum('policy-operator', 2), right: roleQuorum('compliance', 2) },\n    ],\n    description: 'Controls policy lifecycle operations in the root domain.',\n  },\n);\nawait pending.waitAccepted(30_000);\nawait pending.waitExecuted(120_000);\n","lang":"typescript"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Java","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"// condition: built as in the create example\nCoreWorkflowCondition approvals = new CoreWorkflowCondition(new CoreWorkflowConditionAnd()\n    .left(Builders.roleQuorum(\"policy-operator\", 2))\n    .right(Builders.roleQuorum(\"compliance\", 2))\n    .type(CoreWorkflowConditionAnd.TypeEnum.AND));\n\n// The policy entity carries the current revision\nCoreTrustedPolicy policy = client.governance().policies().get(domainId, policyId);\nPendingIntent pending = client.governance().policies().update(\n    domainId,\n    policy,\n    \"policy-governance\",\n    750,\n    List.of(CoreIntentType.V0_CREATE_POLICY, CoreIntentType.V0_UPDATE_POLICY,\n        CoreIntentType.V0_LOCK_POLICY, CoreIntentType.V0_UNLOCK_POLICY),\n    CorePolicyScope.SELF,\n    CoreScriptingEngine.JAVASCRIPT_V0,\n    condition,\n    List.of(approvals),\n    Map.of());\npending.waitAccepted(60);\npending.waitExecuted(120);\n","lang":"java"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The Java ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["update"]}," method doesn't take a description."]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Python","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"from ripple_custody_client_lib_python.generated.models.core_workflow_condition import CoreWorkflowCondition\n\n# condition: built as in the create example\n# The SDK fetches the current revision when you omit revision\npending = client.governance.policies.update(\n    policy_id,\n    \"policy-governance\",\n    750,  # rank\n    \"Self\",\n    \"Javascript_v0\",\n    intent_types=[\"v0_CreatePolicy\", \"v0_UpdatePolicy\", \"v0_LockPolicy\", \"v0_UnlockPolicy\"],\n    condition=condition,\n    workflow=[CoreWorkflowCondition.from_dict({\n        \"type\": \"And\",\n        \"left\": {\"type\": \"RoleQuorum\", \"role\": \"policy-operator\", \"quorum\": 2},\n        \"right\": {\"type\": \"RoleQuorum\", \"role\": \"compliance\", \"quorum\": 2},\n    })],\n    description=\"Controls policy lifecycle operations in the root domain.\",\n)\npending.wait_accepted(timeout=30)\npending.wait_executed(timeout=120)\n","lang":"python"},"children":[]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treat policy updates as high-risk operations. A policy update can change the policy that governs future policy updates."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"create-a-policy-for-system-signed-intents-with-the-api","__idx":14},"children":["Create a policy for system-signed intents with the API"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["System-signed intents are API-only proposals from service callers. They are submitted without a client-side payload signature and are matched only by policies whose ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["intentOrigin"]}," is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SystemSigned"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use this pattern only for tightly scoped automation. At minimum:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Set ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["intentOrigin"]}," to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SystemSigned"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Specify the exact ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["intentTypes"]}," the service caller can submit."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Use a condition that checks the service submitter. For defense in depth, combine ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["context.submitter.custodyRoles.includes(...)"]}," with a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["context.submitter.subject"]}," check for the expected service account."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Omit ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["workflow"]}," only when automatic execution is intentional. If you include a workflow, user-signed approvers must satisfy it."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The following example allows a service caller with the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["gas-station-service"]}," custody role and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["gas-station-svc"]}," subject to submit transaction order proposals. Replace both values with the role and subject issued by your identity provider."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"author\": {\n    \"id\": \"6ac20654-450e-29e4-65e2-1bdecb7db7c4\",\n    \"domainId\": \"9067d363-6411-498b-a32b-15d230a86706\"\n  },\n  \"expiryAt\": \"2026-06-30T15:30:00.000Z\",\n  \"targetDomainId\": \"9067d363-6411-498b-a32b-15d230a86706\",\n  \"id\": \"7d256a32-812e-4a66-9a56-42ebfac5426a\",\n  \"payload\": {\n    \"id\": \"af1d2e33-9a94-4456-bcb3-895bba820d38\",\n    \"alias\": \"gas-station-system-signed\",\n    \"rank\": 420,\n    \"intentTypes\": [\"v0_CreateTransactionOrder\"],\n    \"intentOrigin\": \"SystemSigned\",\n    \"scope\": \"SelfAndDescendants\",\n    \"scriptingEngine\": \"Javascript_v0\",\n    \"condition\": {\n      \"expression\": \"context.submitter.type === 'Service' && context.submitter.custodyRoles.includes('gas-station-service') && context.submitter.subject === 'gas-station-svc'\",\n      \"type\": \"Expression\"\n    },\n    \"lock\": \"Unlocked\",\n    \"description\": \"Allows Gas Station service-submitted transaction orders.\",\n    \"customProperties\": {},\n    \"type\": \"v0_CreatePolicy\"\n  },\n  \"description\": \"Create system-signed Gas Station policy\",\n  \"customProperties\": {},\n  \"type\": \"Propose\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Submit this policy with the normal user-signed policy creation flow. The policy itself is a governance change and should be created, approved, and audited by users with authority to manage policies."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The SDK policy ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["create"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["update"]}," methods and the UI policy wizard don't set ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["intentOrigin"]},". They create user-signed policies only, and an update through any of them turns a system-signed policy into a user-signed one, which then stops matching system-signed proposals. Create and update system-signed policies with the API, and include ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["intentOrigin: \"SystemSigned\""]}," in every ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["v0_UpdatePolicy"]}," payload for them."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"lock-and-unlock-a-policy","__idx":15},"children":["Lock and unlock a policy"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Lock a policy when it should stop matching new intents without being removed from the environment."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"lock-or-unlock-a-policy-in-the-ui","__idx":16},"children":["Lock or unlock a policy in the UI"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Go to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Policies"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Open the contextual menu at the end of the policy row."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Lock"]}," or ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Unlock"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Click ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Submit for approval"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Sign the operation with the mobile app."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"lock-or-unlock-a-policy-with-the-api","__idx":17},"children":["Lock or unlock a policy with the API"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Submit ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["v0_LockPolicy"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["v0_UnlockPolicy"]}," with the current policy reference:"]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"API","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"payload\": {\n    \"reference\": {\n      \"id\": \"5b440ba5-d013-11eb-8cd0-dcfb48cfb3cb\",\n      \"revision\": 3\n    },\n    \"type\": \"v0_LockPolicy\"\n  }\n}\n","lang":"json"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"TypeScript","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"const pending = await client.governance.policies.lock(policyId);\nawait pending.waitAccepted(30_000);\nawait pending.waitExecuted(120_000);\n\n// To re-enable the policy:\n// await client.governance.policies.unlock(policyId);\n","lang":"typescript"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Java","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"// Pass null as the revision to have the SDK fetch the current revision\nPendingIntent pending = client.governance().policies().lock(domainId, policyId, null);\npending.waitAccepted(60);\npending.waitExecuted(120);\n\n// To re-enable the policy:\n// client.governance().policies().unlock(domainId, policyId, null);\n","lang":"java"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Python","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"python","header":{"controls":{"copy":{}}},"source":"pending = client.governance.policies.lock(policy_id)\npending.wait_accepted(timeout=30)\npending.wait_executed(timeout=120)\n\n# To re-enable the policy:\n# client.governance.policies.unlock(policy_id)\n","lang":"python"},"children":[]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["v0_UnlockPolicy"]}," with the same ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["reference"]}," shape to re-enable the policy."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"safe-rollout-sequence","__idx":18},"children":["Safe rollout sequence"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Policy changes can change the rules that govern future policy changes. Use a controlled sequence:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Confirm domain read access and required roles."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Confirm enough users exist for the intended quorum."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Deploy operational policies before policy-governance policies."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Deploy policy-governance policies after the users and fallback path exist."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Deploy emergency \"break-glass\" policies, high-privilege policies used only during incidents, only after their scope and intent types are explicit."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Dry run representative intents."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"pre-flight-checks","__idx":19},"children":["Pre-flight checks"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Check"},"children":["Check"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Why it matters"},"children":["Why it matters"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["intentTypes"]}," are explicit"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Prevents accidental catch-all behavior."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["intentOrigin"]}," is intentional"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Prevents a user-signed policy from being confused with a system-signed automation policy."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Condition paths are valid"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Prevents policy selection errors."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Workflow is satisfiable"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Prevents governance lockout."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["User-signed first workflow step includes maker role"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Lets the intent creator count as first approval. For system-signed policies, confirm the workflow can be satisfied by user approvers."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Rank is intentional"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Ensures the expected policy wins."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Scope is narrow enough"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Prevents parent-domain policies applying too broadly."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Fallback exists"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Gives legitimate unexpected workflows a controlled path."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"common-policy-mistakes","__idx":20},"children":["Common policy mistakes"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Mistake"},"children":["Mistake"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Problem"},"children":["Problem"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Fix"},"children":["Fix"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Empty ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["workflow: []"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Matching intents are rejected."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Omit workflow for auto-approval or define explicit approval steps."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Missing ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["intentTypes"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Policy can match all intents."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Specify intent types except for deliberate fallback policies."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Missing ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["intentOrigin"]}," on an automation policy"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Policy matches only user-signed proposals."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Set ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["intentOrigin: \"SystemSigned\""]}," when the policy is meant for system-signed API proposals."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["High-rank catch-all"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Specific policies may never apply."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Give fallback policies low rank."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Required role has no users"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Workflow cannot complete."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Create users before deploying the policy."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Role names do not match"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Approvers cannot satisfy workflow."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Keep role names consistent across users and policies."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"operational-checklist","__idx":21},"children":["Operational checklist"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Before submitting a policy intent:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Confirm the target domain and policy scope."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Confirm the policy's intent types are deliberate."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Confirm the condition is null-safe and uses the correct payload paths for each intent type."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Confirm every workflow role exists in the target domain."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Confirm quorum can be satisfied by independent users."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["For user-signed policies, confirm the first workflow step includes the maker role."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["For system-signed policies, confirm the workflow can be satisfied by user approvers, or that automatic execution is intentional."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Confirm rank relative to other matching policies."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Dry run representative intents before and after the policy change."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"troubleshooting","__idx":22},"children":["Troubleshooting"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When a policy does not behave as expected:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Check intent type."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Check target domain and scope."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Check condition expression."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Check rank against other matching policies."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Check workflow roles and quorum."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Check lock state."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For field details, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/pt-br/products/custody/v1.43/governance/policies/reference"},"children":["Policy reference"]},". For reusable models, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/pt-br/products/custody/v1.43/governance/policies/examples"},"children":["Policy examples"]},"."]}]},"headings":[{"value":"Manage policies","id":"manage-policies","depth":1},{"value":"Policy actions","id":"policy-actions","depth":2},{"value":"API reference and shared process","id":"api-reference-and-shared-process","depth":2},{"value":"Common operations","id":"common-operations","depth":2},{"value":"Create a policy in the UI","id":"create-a-policy-in-the-ui","depth":2},{"value":"Information","id":"information","depth":3},{"value":"Conditions","id":"conditions","depth":3},{"value":"Evaluation order","id":"evaluation-order","depth":3},{"value":"Approval workflow","id":"approval-workflow","depth":3},{"value":"Review","id":"review","depth":3},{"value":"Create a policy with the API","id":"create-a-policy-with-the-api","depth":2},{"value":"Update a policy","id":"update-a-policy","depth":2},{"value":"Update a policy in the UI","id":"update-a-policy-in-the-ui","depth":3},{"value":"Update a policy with the API","id":"update-a-policy-with-the-api","depth":3},{"value":"Create a policy for system-signed intents with the API","id":"create-a-policy-for-system-signed-intents-with-the-api","depth":2},{"value":"Lock and unlock a policy","id":"lock-and-unlock-a-policy","depth":2},{"value":"Lock or unlock a policy in the UI","id":"lock-or-unlock-a-policy-in-the-ui","depth":3},{"value":"Lock or unlock a policy with the API","id":"lock-or-unlock-a-policy-with-the-api","depth":3},{"value":"Safe rollout sequence","id":"safe-rollout-sequence","depth":2},{"value":"Pre-flight checks","id":"pre-flight-checks","depth":2},{"value":"Common policy mistakes","id":"common-policy-mistakes","depth":2},{"value":"Operational checklist","id":"operational-checklist","depth":2},{"value":"Troubleshooting","id":"troubleshooting","depth":2}],"frontmatter":{"seo":{"title":"Manage policies"}},"lastModified":"2026-11-26T15:05:37.000Z","isTranslationFallback":true,"pagePropGetterError":{"message":"","name":""}},"slug":"/pt-br/products/custody/v1.43/governance/policies/manage-policies","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}