> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://help.getzep.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://help.getzep.com/_mcp/server.

# Add User

POST https://api.getzep.com/api/v2/users
Content-Type: application/json

Adds a user.

Reference: https://help.getzep.com/sdk-reference/user/add

## Request

### Body (application/json)

This endpoint expects an apidata.CreateUserRequest.

- `user_id` (string, required) — The unique identifier of the user.
- `email` (string, optional) — The email address of the user.
- `fact_rating_instruction` (apidata.FactRatingInstruction, optional) — Optional instruction to use for fact rating.
- `first_name` (string, optional) — The first name of the user.
- `last_name` (string, optional) — The last name of the user.
- `metadata` (map from string to any, optional) — The metadata associated with the user.

## Response

### 201

The user that was added.

- `created_at` (string, optional)
- `deleted_at` (string, optional)
- `email` (string, optional)
- `fact_rating_instruction` (models.FactRatingInstruction, optional)
- `first_name` (string, optional)
- `id` (integer, optional)
- `last_name` (string, optional)
- `metadata` (map from string to any, optional) — Deprecated
- `project_uuid` (string, optional)
- `session_count` (integer, optional) — Deprecated
- `updated_at` (string, optional) — Deprecated
- `user_id` (string, optional)
- `uuid` (string, optional)

## Errors

### 400 Bad Request Error

Bad Request

- `message` (string, optional)

### 500 Internal Server Error

Internal Server Error

- `message` (string, optional)

## Types

### apidata.FactRatingInstruction

- `examples` (apidata.FactRatingExamples, optional) — Examples is a list of examples that demonstrate how facts might be rated based on your instruction. You should provide an example of a highly rated example, a low rated example, and a medium (or in between example). For example, if you are rating based on relevance to a trip planning application, your examples might be: High: "Joe's dream vacation is Bali" Medium: "Joe has a fear of flying", Low: "Joe's favorite food is Japanese",
- `instruction` (string, optional) — A string describing how to rate facts as they apply to your application. A trip planning application may use something like "relevancy to planning a trip, the user's preferences when traveling, or the user's travel history."

### models.FactRatingInstruction

- `examples` (models.FactRatingExamples, optional) — Examples is a list of examples that demonstrate how facts might be rated based on your instruction. You should provide an example of a highly rated example, a low rated example, and a medium (or in between example). For example, if you are rating based on relevance to a trip planning application, your examples might be: High: "Joe's dream vacation is Bali" Medium: "Joe has a fear of flying", Low: "Joe's favorite food is Japanese",
- `instruction` (string, optional) — A string describing how to rate facts as they apply to your application. A trip planning application may use something like "relevancy to planning a trip, the user's preferences when traveling, or the user's travel history."

### apidata.FactRatingExamples

- `high` (string, optional)
- `low` (string, optional)
- `medium` (string, optional)

### models.FactRatingExamples

- `high` (string, optional)
- `low` (string, optional)
- `medium` (string, optional)

## Examples

**Request**

```json
{
  "user_id": "user_12345"
}
```

**Response**

```json
{
  "created_at": "2024-06-01T10:15:30Z",
  "deleted_at": "",
  "email": "jane.doe@example.com",
  "fact_rating_instruction": {
    "examples": {
      "high": "User's preferred language is English",
      "low": "User's favorite color is blue",
      "medium": "User occasionally travels internationally"
    },
    "instruction": "Rate facts based on their relevance to user preferences and behavior within the application."
  },
  "first_name": "Jane",
  "id": 1024,
  "last_name": "Doe",
  "metadata": {},
  "project_uuid": "a3f1c9e2-7b4d-4f8a-9c3e-2d5f6b7a8c9d",
  "session_count": 5,
  "updated_at": "2024-06-10T08:45:00Z",
  "user_id": "user_12345",
  "uuid": "550e8400-e29b-41d4-a716-446655440000"
}
```