---
title: "Update a persona"
description: "Update a custom (non-preset) persona owned by the authenticated user."
---

> Documentation Index
> Fetch the complete documentation index at: https://truememory-docs.mvstg.com/llms.txt
> Use this file to discover all available pages before exploring further.

Path: AI Gateway API › Personas

`PUT /personas/{persona_id}`

Update a custom (non-preset) persona owned by the authenticated user.

## Authentication

- `HTTPBearer`, http, header `Authorization`

## Path parameters

- `persona_id` (`update_persona.path.persona_id`; string, required)

## Header parameters

- `X-On-Behalf-Of` (`update_persona.header.X-On-Behalf-Of`; any of, optional)
  - any of: `string`, `null`
- `X-External-User-Id` (`update_persona.header.X-External-User-Id`; any of, optional)
  - any of: `string`, `null`
- `X-App-Id` (`update_persona.header.X-App-Id`; any of, optional)
  - any of: `string`, `null`

## Request body

_Required._

- `name` (`update_persona.name`; any of, optional) — New display name for the persona.
  - any of: `string`, `null`
- `description` (`update_persona.description`; any of, optional) — Updated description of the persona's purpose. Pass null to clear.
  - any of: `string`, `null`
- `system_prompt` (`update_persona.system_prompt`; any of, optional) — Updated system prompt.
  - any of: `string`, `null`
- `visibility` (`update_persona.visibility`; any of, optional) — Updated platform-wide visibility.
  - any of: `string`, `null`
- `archetype` (`update_persona.archetype`; any of, optional) — Updated archetype identifier. Pass null to clear.
  - any of: `string`, `null`
- `soul_document` (`update_persona.soul_document`; any of, optional) — Updated structured personality document. Pass null to clear.
  - any of: `object`, `null`
- `human_profile` (`update_persona.human_profile`; any of, optional) — Updated user profile text. Pass null to clear.
  - any of: `string`, `null`
- `avatar` (`update_persona.avatar`; any of, optional) — Updated avatar URL. Pass null to clear.
  - any of: `string`, `null`
- `avatar_config` (`update_persona.avatar_config`; any of, optional) — Replaces the whole avatar config (no merge). Pass null to clear.
  - any of: `object`, `null`

## Example request

```json
{
  "name": "Strict Mentor",
  "description": "A direct, no-nonsense mentoring persona",
  "system_prompt": "You are a strict mentor. Be concise and direct.",
  "visibility": "private",
  "archetype": "string",
  "soul_document": {},
  "human_profile": "string",
  "avatar": "string",
  "avatar_config": {}
}
```

## Code samples

### cURL

```bash
curl --request PUT \
  --url 'https://truememory-api.mvstg.com/personas/<persona_id>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Strict Mentor",
  "description": "A direct, no-nonsense mentoring persona",
  "system_prompt": "You are a strict mentor. Be concise and direct.",
  "visibility": "private",
  "archetype": "string",
  "soul_document": {},
  "human_profile": "string",
  "avatar": "string",
  "avatar_config": {}
}
'
```

### TypeScript

```typescript
const url = 'https://truememory-api.mvstg.com/personas/<persona_id>';
const options = {
  method: 'PUT',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({
    name: 'Strict Mentor',
    description: 'A direct, no-nonsense mentoring persona',
    system_prompt: 'You are a strict mentor. Be concise and direct.',
    visibility: 'private',
    archetype: 'string',
    soul_document: {},
    human_profile: 'string',
    avatar: 'string',
    avatar_config: {}
  })
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://truememory-api.mvstg.com/personas/<persona_id>"

payload = {
    "name": "Strict Mentor",
    "description": "A direct, no-nonsense mentoring persona",
    "system_prompt": "You are a strict mentor. Be concise and direct.",
    "visibility": "private",
    "archetype": "string",
    "soul_document": {},
    "human_profile": "string",
    "avatar": "string",
    "avatar_config": {}
}
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

Successful Response

#### Example

```json
{
  "id": "string",
  "user_id": "string",
  "name": "string",
  "description": "string",
  "system_prompt": "string",
  "is_preset": true,
  "visibility": "private",
  "is_active": false,
  "archetype": "string",
  "soul_document": {},
  "human_profile": "string",
  "avatar": "string",
  "avatar_config": {},
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z"
}
```

- `id` (`update_persona.response.200.id`; string, required)
- `user_id` (`update_persona.response.200.user_id`; any of, required) — Owner user_id, NULL for presets.
  - any of: `string`, `null`
- `name` (`update_persona.response.200.name`; string, required)
- `description` (`update_persona.response.200.description`; any of, required)
  - any of: `string`, `null`
- `system_prompt` (`update_persona.response.200.system_prompt`; string, required)
- `is_preset` (`update_persona.response.200.is_preset`; boolean, required)
- `created_at` (`update_persona.response.200.created_at`; string, required)
  - format `date-time`
- `updated_at` (`update_persona.response.200.updated_at`; string, required)
  - format `date-time`
- `visibility` (`update_persona.response.200.visibility`; string, optional)
  - one of `"private"`, `"public"`; default `"private"`
- `is_active` (`update_persona.response.200.is_active`; boolean, optional)
  - default `false`
- `archetype` (`update_persona.response.200.archetype`; any of, optional) — App-defined archetype identifier (e.g. SAGE, EXPLORER). Each app renders its own visual for this.
  - any of: `string`, `null`
- `soul_document` (`update_persona.response.200.soul_document`; any of, optional) — Structured personality document: voice style, anti-patterns, learned adaptations, boundaries, custom instructions.
  - any of: `object`, `null`
- `human_profile` (`update_persona.response.200.human_profile`; any of, optional) — Creator-specific profile data. Hidden from other users when the persona is public.
  - any of: `string`, `null`
- `avatar` (`update_persona.response.200.avatar`; any of, optional) — URL of the persona's avatar image.
  - any of: `string`, `null`
- `avatar_config` (`update_persona.response.200.avatar_config`; any of, optional) — App-defined dynamic avatar settings (a JSON object, 64 KB max). Truememory stores and returns it unchanged and never puts it in a prompt.
  - any of: `object`, `null`

### 422

Validation Error

#### Example

```json
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}
```

- `detail` (`update_persona.response.422.detail`; array<object>, optional)
  - `loc` (`update_persona.response.422.detail.loc`; array<any of>, required)
    - any of: `string`, `integer`
  - `msg` (`update_persona.response.422.detail.msg`; string, required)
  - `type` (`update_persona.response.422.detail.type`; string, required)
  - `input` (`update_persona.response.422.detail.input`; unknown, optional)
  - `ctx` (`update_persona.response.422.detail.ctx`; object, optional)


Source: https://truememory-docs.mvstg.com/api/personas/update/index.md
