---
title: "Put a brain into a mind"
description: "Add a brain you **own** to a mind you may reshape.\n\nOwnership, not readability: a brain merely shared with you must not be\nloanable into a mind you then share onward. A brain lives in at most one\nmind, so adding it to a second moves it."
---

> 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

`PUT /minds/{mind_id}/brains/{brain_id}`

Add a brain you **own** to a mind you may reshape.

Ownership, not readability: a brain merely shared with you must not be
loanable into a mind you then share onward. A brain lives in at most one
mind, so adding it to a second moves it.

## Authentication

- `HTTPBearer`, http, header `Authorization`

## Path parameters

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

## Header parameters

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

## Code samples

### cURL

```bash
curl --request PUT \
  --url 'https://truememory-api.mvstg.com/minds/<mind_id>/brains/<brain_id>' \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://truememory-api.mvstg.com/minds/<mind_id>/brains/<brain_id>';
const options = {method: 'PUT', headers: {Authorization: 'Bearer <token>'}};

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>/brains/<brain_id>"

headers = {"Authorization": "Bearer <token>"}

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

print(response.text)
```

## Responses

### 204

Successful Response

### 422

Validation Error

#### Example

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

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


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