---
search:
  tags:
    - V1
    - PUT
seo:
  description: >-
    Create or update one project memory file by path. Use this for… Reference
    for the PUT /v1/projects/{projectId}/memory/files endpoint in the Judgeval
    API.
sidebar:
  label: Write a memory file
  badge: PUT
title: Write a memory file
type: openapi-operation
---
Create or update one project memory file by path. Use this for durable project context that future agent sessions should see.

`PUT /v1/projects/{projectId}/memory/files`

**Request body** (`application/json`, required)

- `name` (string, required) — The memory file path to create or update
- `body` (string, required) — The complete memory file body to write

Request body example:

```json
{
  "name": "string",
  "body": "string"
}
```

**Responses**

- `200` — Response for status 200

Response example, 200:

```json
{
  "file": {
    "id": "string",
    "project_id": "string",
    "name": "string",
    "body": "string",
    "created_by": "string",
    "created_at": "string",
    "updated_at": "string"
  }
}
```
