> 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/graph/create/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs-beta.getzep.com/_mcp/server. # Create graph POST https://api.getzep.com/api/v4/graphs Content-Type: application/json Reference: https://docs-beta.getzep.com/sdk-reference/graph/create ## 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.CreateGraphRequest. - `content_policy` (v4.GraphContentPolicyRequest, optional) — Content policy additions for the graph. The graph binds the current project content policy plus these additions, and the binding does not change after creation. - `description` (string, optional) — A description of the graph. - `name` (string, optional) — A display name for the graph. - `time_zone` (string, optional) — The graph's IANA time zone. ## Response ### 201 Created - `created_at` (string, optional) — The time the graph was created. - `description` (string, optional) — A description of the graph. - `graph_id` (string, optional) — The developer-assigned identifier of the graph, present only for standard graphs. - `name` (string, optional) — The display name of the graph. - `time_zone` (string, optional) — The graph's IANA time zone. - `type` (string, optional) — The kind of graph: user for a user's personal graph, or standard for a named graph created directly. - `updated_at` (string, optional) — The time the graph was last updated. - `user_uuid` (string, optional) — The unique identifier of the user this graph belongs to, present only for a user graph. - `uuid` (string, optional) — The unique identifier of the graph. ## 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) ### 404 Not Found Error Not Found - `error` (v4.ErrorBody, optional) ### 409 Conflict Error Conflict - `error` (v4.ErrorBody, optional) ## Types ### v4.GraphContentPolicyRequest - `categories` (list of v4.ContentPolicyCategoryRequest, optional) — Categories to add for this graph. A key that the project policy already has is ignored. - `project_revision` (integer, optional) — When set, the create fails with content_policy_revision_stale unless this is the current project revision. - `rules` (list of v4.ContentPolicyRuleRequest, optional) — Rules to add for this graph. A rule that the project policy already has, with the same category key and description, is ignored. ### v4.ErrorBody - `code` (string, optional) - `details` (map from string to any, optional) - `message` (string, optional) - `param` (string, optional) - `request_id` (string, optional) ### 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. ## Examples **Request** ```json {} ``` **Response** ```json { "created_at": "string", "description": "string", "graph_id": "string", "name": "string", "time_zone": "string", "type": "string", "updated_at": "string", "user_uuid": "string", "uuid": "string" } ```