> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://help.getzep.com/v2/sdk-reference/graph/add-data/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://help.getzep.com/_mcp/server. # Add Data POST https://api.getzep.com/api/v2/graph Content-Type: application/json Add data to the graph. Reference: https://help.getzep.com/sdk-reference/graph/add-data ## Request ### Body (application/json) This endpoint expects an apidata.AddDataRequest. - `data` (string, required) - `type` (enum, required) - Allowed values: `text`, `json`, `message` - `created_at` (string, optional) - `group_id` (string, optional) - `source_description` (string, optional) - `user_id` (string, optional) ## Response ### 202 Added episode - `content` (string, required) - `created_at` (string, required) - `uuid` (string, required) - `processed` (boolean, optional) - `role` (string, optional) — Optional role, will only be present if the episode was created using memory.add API - `role_type` (enum, optional) — Optional role_type, will only be present if the episode was created using memory.add API - Allowed values: `norole`, `system`, `assistant`, `user`, `function`, `tool` - `session_id` (string, optional) - `source` (enum, optional) - Allowed values: `text`, `json`, `message` - `source_description` (string, optional) ## Errors ### 400 Bad Request Error Bad Request - `message` (string, optional) ### 500 Internal Server Error Internal Server Error - `message` (string, optional) ## Examples **Request** ```json { "data": "The quick brown fox jumps over the lazy dog.", "type": "text" } ``` **Response** ```json { "content": "The quick brown fox jumps over the lazy dog.", "created_at": "2024-06-01T12:00:00Z", "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "processed": true, "role": "user", "role_type": "user", "session_id": "session_1234567890abcdef", "source": "text", "source_description": "User submitted text data for processing." } ``` > Zep unifies business data, documents, and conversations into shared, governed context that agents can retrieve for their tasks.