Policies

Update a policy.

Changed on

Updates an existing policy.

post/v2/policies/{policyId}

Request

  • Base URL: https://api.openfort.io
  • URL: https://api.openfort.io/v2/policies/{policyId}
  • Auth: one of:
    • HTTP bearer
    • HTTP bearer

Path parameters

policyIdstring required

Specifies the unique policy ID (starts with ply_).

Request body

descriptionstring

A description of what this policy does.

enabledboolean

Whether the policy is enabled.

priorityinteger

Priority of the policy. Higher priority policies are evaluated first.

Example request

{
  "description": "Limit ETH transfers to 1 ETH to approved addresses",
  "enabled": true,
  "rules": [
    {
      "action": "accept",
      "operation": "signEvmTransaction",
      "criteria": [
        {
          "type": "evmAddress",
          "operator": "in",
          "addresses": [
            "0x742d35Cc6634C0532925a3b844Bc9e7595f0aB12"
          ]
        }
      ]
    }
  ]
}

Response

Successful response.

idstring required
object'policyV2' required
createdAtinteger required
scope'project' | 'account' | 'transaction' required
descriptionstring nullable required

A description of what this policy does.

accountIdstring nullable required

The account ID for account-scoped policies.

enabledboolean required

Whether the policy is enabled.

priorityinteger required

Priority of the policy.

Example response

{
  "description": "Limit ETH transfers to 1 ETH to approved addresses",
  "accountId": "acc_48eeba57-2cd5-4159-a2cb-057a23a35e65",
  "enabled": true,
  "rules": [
    {
      "operation": "signEvmTransaction"
    }
  ]
}

Changes