---
title: "Update a mind"
description: "Rename a mind, retag it, or change its visibility. Owner or admin grant.\n\nOnly fields actually sent are touched — ``exclude_unset`` is what keeps an\nomitted field from being read as \"clear this\"."
---

> 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 › Minds

`PATCH /minds/{mind_id}`

Rename a mind, retag it, or change its visibility. Owner or admin grant.

Only fields actually sent are touched — ``exclude_unset`` is what keeps an
omitted field from being read as "clear this".

## Authentication

- `HTTPBearer`, http, header `Authorization`

## Path parameters

- `mind_id` (`update_mind.path.mind_id`; string, required)
  - format `uuid`

## Header parameters

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

## Request body

_Required._

- `name` (`update_mind.name`; any of, optional)
  - any of: `string`, `null`
- `slug` (`update_mind.slug`; any of, optional)
  - any of: `string`, `null`
- `description` (`update_mind.description`; any of, optional)
  - any of: `string`, `null`
- `emoji` (`update_mind.emoji`; any of, optional)
  - any of: `string`, `null`
- `usage_hint` (`update_mind.usage_hint`; any of, optional)
  - any of: `string`, `null`
- `visibility` (`update_mind.visibility`; any of, optional)
  - any of: `string`, `null`
- `skill_ids` (`update_mind.skill_ids`; any of, optional)
  - any of: `array<string>`, `null`

## Example request

```json
{
  "name": "string",
  "slug": "string",
  "description": "string",
  "emoji": "string",
  "usage_hint": "string",
  "visibility": "private",
  "skill_ids": [
    "497f6eca-6276-4993-bfeb-53cbbbba6f08"
  ]
}
```

## Code samples

### cURL

```bash
curl --request PATCH \
  --url 'https://truememory-api.mvstg.com/minds/<mind_id>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "string",
  "slug": "string",
  "description": "string",
  "emoji": "string",
  "usage_hint": "string",
  "visibility": "private",
  "skill_ids": [
    "497f6eca-6276-4993-bfeb-53cbbbba6f08"
  ]
}
'
```

### TypeScript

```typescript
const url = 'https://truememory-api.mvstg.com/minds/<mind_id>';
const options = {
  method: 'PATCH',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({
    name: 'string',
    slug: 'string',
    description: 'string',
    emoji: 'string',
    usage_hint: 'string',
    visibility: 'private',
    skill_ids: ['497f6eca-6276-4993-bfeb-53cbbbba6f08']
  })
};

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/minds/<mind_id>"

payload = {
    "name": "string",
    "slug": "string",
    "description": "string",
    "emoji": "string",
    "usage_hint": "string",
    "visibility": "private",
    "skill_ids": ["497f6eca-6276-4993-bfeb-53cbbbba6f08"]
}
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

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

print(response.text)
```

## Responses

### 200

Successful Response

#### Example

```json
{
  "id": "string",
  "owner_type": "user",
  "owner_id": "string",
  "app_id": "string",
  "slug": "string",
  "name": "string",
  "description": "string",
  "emoji": "string",
  "usage_hint": "string",
  "visibility": "private",
  "banner_image_url": "string",
  "skills": [
    {
      "id": "string",
      "key": "string",
      "name": "string"
    }
  ],
  "brain_count": 0,
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z",
  "skill_ids": [
    "string"
  ]
}
```

- `id` (`update_mind.response.200.id`; string, required)
- `owner_type` (`update_mind.response.200.owner_type`; string, required)
  - one of `"user"`, `"org"`
- `owner_id` (`update_mind.response.200.owner_id`; string, required)
- `slug` (`update_mind.response.200.slug`; string, required)
- `name` (`update_mind.response.200.name`; string, required)
- `created_at` (`update_mind.response.200.created_at`; string, required)
  - format `date-time`
- `updated_at` (`update_mind.response.200.updated_at`; string, required)
  - format `date-time`
- `skill_ids` (`update_mind.response.200.skill_ids`; array<string>, required) — Ids of ``skills``, for clients seeding a multi-select.
- `app_id` (`update_mind.response.200.app_id`; any of, optional)
  - any of: `string`, `null`
- `description` (`update_mind.response.200.description`; any of, optional)
  - any of: `string`, `null`
- `emoji` (`update_mind.response.200.emoji`; any of, optional)
  - any of: `string`, `null`
- `usage_hint` (`update_mind.response.200.usage_hint`; any of, optional)
  - any of: `string`, `null`
- `visibility` (`update_mind.response.200.visibility`; string, optional)
  - one of `"private"`, `"app"`, `"public"`; default `"private"`
- `banner_image_url` (`update_mind.response.200.banner_image_url`; any of, optional)
  - any of: `string`, `null`
- `skills` (`update_mind.response.200.skills`; array<object>, optional)
  - `id` (`update_mind.response.200.skills.id`; string, required)
  - `key` (`update_mind.response.200.skills.key`; string, required)
  - `name` (`update_mind.response.200.skills.name`; string, required)
- `brain_count` (`update_mind.response.200.brain_count`; integer, optional)
  - default `0`

### 422

Validation Error

#### Example

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

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


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