---
updatedAt: 2026-10-15T16:03:46.000Z
agentTools:
  siteIndex: https://developer.jamf.com/llms.txt
  projectIndex: https://developer.jamf.com/platform-api/llms.txt
---

# Preview - Save draft settings for an existing policy

**Preview:** _This endpoint is currently in a preview state and is subject to breaking changes without warning._

**Preview endpoint.** Expected to reach general availability by 2027-03-03,
pending feedback on request and response shape.

Validates settings against the vendor schema and updates the draft settings on
the policy. Does NOT create a published version. Call POST /policies/{policyId}/publish
to snapshot the draft into an immutable version.

Supports optimistic concurrency control for concurrent draft edits. Supply the
ETag returned by GET in an If-Match header; if the policy's version has since
advanced, the write is rejected with 409 (POLICY_VERSION_CONFLICT) and no changes
are made. Omit If-Match (or send `*`) for an unconditional update.


**Required Permissions:** `ai-policies:update`

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "AI Governance Policies API",
    "version": "1.0.0",
    "description": "API for managing AI governance policies\n\n**Preview:** Every endpoint in this API is in preview. All are expected to graduate\nto general availability within 6 months (by 2027-03-03), pending feedback on\nrequest/response shape. Every successful (2xx) response carries a\n`Jamf-Preview: true` header.",
    "termsOfService": "https://www.jamf.com/developer-resources/api-license-agreement/",
    "contact": {
      "name": "Jamf Developer",
      "url": "https://developer.jamf.com"
    }
  },
  "x-preview": true,
  "servers": [
    {
      "url": "https://{region}.api.jamfcloud.com/ai/governance/policies",
      "description": "Jamf Beta API Gateway - prod",
      "variables": {
        "region": {
          "default": "us",
          "enum": [
            "us",
            "eu",
            "apac"
          ],
          "description": "Geographic deployment region"
        }
      }
    }
  ],
  "security": [
    {
      "oauth2": []
    }
  ],
  "tags": [
    {
      "name": "policies",
      "description": "AI governance policy CRUD with draft/publish versioning. The Policy document\nholds mutable draft settings (updated via PATCH). Publishing snapshots the draft\ninto an immutable PolicyVersion. Delete is a soft archive.\n"
    }
  ],
  "paths": {
    "/v1/policies/{policyId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/PolicyId"
        }
      ],
      "patch": {
        "operationId": "updatePolicy",
        "tags": [
          "policies"
        ],
        "summary": "Preview - Save draft settings for an existing policy",
        "description": "**Preview:** _This endpoint is currently in a preview state and is subject to breaking changes without warning._\n\n**Preview endpoint.** Expected to reach general availability by 2027-03-03,\npending feedback on request and response shape.\n\nValidates settings against the vendor schema and updates the draft settings on\nthe policy. Does NOT create a published version. Call POST /policies/{policyId}/publish\nto snapshot the draft into an immutable version.\n\nSupports optimistic concurrency control for concurrent draft edits. Supply the\nETag returned by GET in an If-Match header; if the policy's version has since\nadvanced, the write is rejected with 409 (POLICY_VERSION_CONFLICT) and no changes\nare made. Omit If-Match (or send `*`) for an unconditional update.\n\n\n**Required Permissions:** `ai-policies:update`",
        "parameters": [
          {
            "$ref": "#/components/parameters/X-Environment-Id"
          },
          {
            "$ref": "#/components/parameters/IfMatch"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePolicyRequest"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Draft settings saved",
            "headers": {
              "Jamf-Preview": {
                "$ref": "#/components/headers/JamfPreview"
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "The policy was modified by another writer since the supplied If-Match version\n(POLICY_VERSION_CONFLICT). Re-read the policy to obtain the current ETag and\nretry.\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntity"
          }
        },
        "security": [
          {
            "oauth2": [
              "ai-policies:update"
            ]
          }
        ],
        "x-required-privileges": [
          "ai-policies:update"
        ],
        "x-preview": true
      }
    }
  },
  "components": {
    "headers": {
      "JamfPreview": {
        "description": "Present on every successful (2xx) response from a preview endpoint. See\nthe API description for preview status and expected graduation.\n",
        "schema": {
          "type": "boolean",
          "enum": [
            true
          ]
        }
      }
    },
    "securitySchemes": {
      "oauth2": {
        "type": "oauth2",
        "description": "Obtain an access token by calling the API Gateway's token endpoint using the OAuth2 client-credentials flow.",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://{region}.api.jamfcloud.com/auth/token",
            "scopes": {
              "ai-policies:create": "",
              "ai-policies:delete": "",
              "ai-policies:read": "",
              "ai-policies:update": ""
            }
          }
        }
      }
    },
    "parameters": {
      "PolicyId": {
        "name": "policyId",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid"
        },
        "description": "Policy ID"
      },
      "IfMatch": {
        "name": "If-Match",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string"
        },
        "description": "Optimistic-lock precondition. Supply the ETag from a prior GET (e.g. `\"7\"`) to\nmake the update conditional on the policy still being at that version; a mismatch\nyields 409 (POLICY_VERSION_CONFLICT). A weak validator (`W/\"7\"`) is also accepted.\nOmit the header or send `*` for an unconditional update.\n",
        "example": "\"7\""
      },
      "X-Environment-Id": {
        "name": "X-Environment-Id",
        "in": "header",
        "required": true,
        "description": "The environment UUID identifier.",
        "schema": {
          "type": "string",
          "format": "uuid",
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "example": "e77c1408-10c8-4007-b177-abc9157fbcaa"
        }
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Bad request",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            }
          }
        }
      },
      "Unauthorized": {
        "description": "Missing or invalid authentication",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            }
          }
        }
      },
      "Forbidden": {
        "description": "Insufficient permissions",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            }
          }
        }
      },
      "NotFound": {
        "description": "Resource not found",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            }
          }
        }
      },
      "UnprocessableEntity": {
        "description": "Validation failed — toolId unknown, schemaVersion unknown, or settings invalid",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            }
          }
        }
      }
    },
    "schemas": {
      "ApiError": {
        "type": "object",
        "description": "Standard error response envelope returned for all non-2xx status codes.",
        "required": [
          "httpStatus",
          "traceId",
          "errors"
        ],
        "properties": {
          "httpStatus": {
            "type": "integer",
            "format": "int32",
            "minimum": 400,
            "maximum": 599,
            "description": "HTTP status of the response",
            "example": 404
          },
          "traceId": {
            "type": "string",
            "description": "Trace ID for request correlation",
            "example": "abc123def456"
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiErrorItem"
            }
          }
        }
      },
      "ApiErrorItem": {
        "type": "object",
        "description": "A single error detail within an ApiError response.",
        "required": [
          "code",
          "description"
        ],
        "properties": {
          "code": {
            "type": "string",
            "description": "Error code (e.g. TOOL_ID_UNKNOWN, SCHEMA_VALIDATION_FAILED, POLICY_NOT_FOUND)",
            "example": "POLICY_NOT_FOUND"
          },
          "field": {
            "type": "string",
            "description": "Dot-path to the offending field (for validation errors)",
            "example": "settings.enabled"
          },
          "description": {
            "type": "string",
            "example": "The requested policy does not exist"
          }
        }
      },
      "VendorSettings": {
        "type": "object",
        "description": "Vendor tool settings payload. Shape is tool-specific and defined by the vendor's\nJSON Schema, which is served by GET /v1/tools/{toolId}/schemas/{schemaVersion}\n(see the ToolSchemaResponse schema). Only keys the admin explicitly set are\npresent. Validated at write time against the vendor schema for the request's\nschemaVersion.\n",
        "additionalProperties": true
      },
      "UpdatePolicyRequest": {
        "type": "object",
        "required": [
          "schemaVersion",
          "settings"
        ],
        "description": "Saves draft settings on the policy. Does NOT create a published version. Call\nPOST /policies/{policyId}/publish to create an immutable version. toolId is\nimmutable after creation. name and description are optional — omit them to\nleave the existing values unchanged.\n",
        "properties": {
          "schemaVersion": {
            "type": "string",
            "minLength": 1,
            "example": "2026-05-12"
          },
          "settings": {
            "$ref": "#/components/schemas/VendorSettings"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "description": "New display name for the policy. Omit to leave unchanged.",
            "example": "Claude Code - Engineering"
          },
          "description": {
            "type": "string",
            "maxLength": 2000,
            "description": "New description for the policy. Omit to leave unchanged.",
            "example": "AI governance policy for engineering team"
          }
        }
      }
    }
  },
  "x-scope-types": [
    "environment"
  ]
}
```