> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs-beta.getzep.com/v4/sdk-reference/project/content-policy/set-content-policy/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs-beta.getzep.com/_mcp/server. # Set project content policy PUT https://api.getzep.com/api/v4/project/content-policy Content-Type: application/json Replaces the project content policy and creates a new immutable revision. Graphs that already exist keep the revision they bound. An empty policy (no categories and no rules) removes the content policy for new graphs. Reference: https://docs-beta.getzep.com/sdk-reference/project/content-policy/set-content-policy ## Authentication - `Authorization` header (required) (prefixed with ` Api-Key `) — Type "Api-Key" followed by a space and the project API key. ## Request ### Body (application/json) This endpoint expects a v4.ContentPolicyRequest. - `categories` (list of v4.ContentPolicyCategoryRequest, optional) — The categories of the policy. Maximum 16. An empty list with no rules means no content policy. - `rules` (list of v4.ContentPolicyRuleRequest, optional) — The rules of the policy. Maximum 32. ## Response ### 200 OK - `categories` (list of v4.ContentPolicyCategory, optional) — The categories of the policy. - `created_at` (string, optional) — When this policy set was created. - `revision` (integer, optional) — The project revision number. 0 is the empty policy of a new project. - `rules` (list of v4.ContentPolicyRule, optional) — The rules of the policy. - `uuid` (string, optional) — The identifier of this policy set. A project revision and every graph that binds it without additions share one uuid. ## Errors ### 400 Bad Request Error Bad Request - `error` (v4.ErrorBody, optional) ### 401 Unauthorized Error Unauthorized - `error` (v4.ErrorBody, optional) ### 403 Forbidden Error Forbidden - `error` (v4.ErrorBody, optional) ## Types ### v4.ContentPolicyCategoryRequest - `description` (string, optional) — What the category covers, in plain language. Maximum 500 characters. - `key` (string, optional) — A stable key for the category, unique within the policy. Lowercase letters, digits, and underscores; 2 to 64 characters. ### v4.ContentPolicyRuleRequest - `category_key` (string, optional) — The key of the category this rule belongs to. The category must be in the same policy. - `description` (string, optional) — The content this rule prohibits, in plain language. Maximum 1000 characters. - `permitted_examples` (list of string, optional) — Examples of similar content the rule permits. 0 to 8 items, each at most 500 characters. - `prohibited_examples` (list of string, optional) — Examples of content the rule prohibits. 1 to 8 items, each at most 500 characters. ### v4.ContentPolicyCategory - `description` (string, optional) — What the category covers. - `id` (string, optional) — The server-assigned identifier of the category. Stable across revisions while the key is unchanged. - `key` (string, optional) — The stable key of the category. ### v4.ContentPolicyRule - `category_key` (string, optional) — The key of the category this rule belongs to. - `description` (string, optional) — The content this rule prohibits. - `id` (string, optional) — The server-assigned identifier of the rule. Stable across revisions while the category key and description are unchanged. - `permitted_examples` (list of string, optional) — Examples of similar content the rule permits. - `prohibited_examples` (list of string, optional) — Examples of content the rule prohibits. ### v4.ErrorBody - `code` (string, optional) - `details` (map from string to any, optional) - `message` (string, optional) - `param` (string, optional) - `request_id` (string, optional) ## Examples **Request** ```json {} ``` **Response** ```json { "categories": [ { "description": "Facts about a person's medical conditions or treatment.", "id": "cat_01J8ZJ1P2Q3R4S5T6U7V8W9X0Y", "key": "health" } ], "created_at": "2026-09-22T05:09:00Z", "revision": 3, "rules": [ { "category_key": "health", "description": "Statements that a named person has a diagnosed medical condition.", "id": "rule_01J8ZJ1P2Q3R4S5T6U7V8W9X0Z", "permitted_examples": [ "Jane works at a diabetes research lab." ], "prohibited_examples": [ "Jane was diagnosed with type 2 diabetes last year." ] } ], "uuid": "7a1f3c2e-4b5d-4e6f-8a9b-0c1d2e3f4a5b" } ```