v1

latestOpenAPI 3.1.02026-07-1781833.4 KB
policies

Update policy

Partially updates a policy's metadata. Only fields present in the request body are updated; absent fields are left unchanged. The scope object is patched per sub-field: sending teams replaces that list, while an omitted sub-field is left untouched and an empty list clears it (org-wide).

The rule set is not modified here — use the rule endpoints for that. At least one field must be present. Returns the policy in both its old and new states. Changes may take up to five minutes to reach developer machines.

patch/orgs/{org_name}/governance/policies/{policy_id}

Request body

namestring

Policy name, unique within the organization.

Example request

{
  "name": "Security Research",
  "scope": {
    "teams": [
      "d290f1ee-6c54-4b01-90e6-d701748f0851"
    ]
  }
}

Response

Policy updated, returns old and new states.

Example response

{
  "old": {
    "id": "pol_06evsmp24r1pg71cm8500546pkbn",
    "name": "Security Research — hardened",
    "org": "my-org",
    "scope": {
      "teams": [
        "d290f1ee-6c54-4b01-90e6-d701748f0851"
      ]
    },
    "created_at": "2026-04-22T00:00:00Z",
    "updated_at": "2026-04-22T00:00:00Z",
    "allowlist_v0": {
      "domain": "network",
      "rules": [
        {
          "id": "rule_06evsm9qjm1pdsk0a8nkfaxy7jna",
          "name": "allow research mirrors",
          "actions": [
            "connect:tcp",
            "connect:udp"
          ],
          "resources": [
            "research.mitre.org",
            "cve.mitre.org"
          ],
          "decision": "allow"
        }
      ]
    }
  },
  "new": {
    "id": "pol_06evsmp24r1pg71cm8500546pkbn",
    "name": "Security Research — hardened",
    "org": "my-org",
    "scope": {
      "teams": [
        "d290f1ee-6c54-4b01-90e6-d701748f0851"
      ]
    },
    "created_at": "2026-04-22T00:00:00Z",
    "updated_at": "2026-04-22T00:00:00Z",
    "allowlist_v0": {
      "domain": "network",
      "rules": [
        {
          "id": "rule_06evsm9qjm1pdsk0a8nkfaxy7jna",
          "name": "allow research mirrors",
          "actions": [
            "connect:tcp",
            "connect:udp"
          ],
          "resources": [
            "research.mitre.org",
            "cve.mitre.org"
          ],
          "decision": "allow"
        }
      ]
    }
  }
}