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

# Update the profile

PATCH https://api.livingbrain.com/v1/brains/{brainId}/profile
Content-Type: application/json

Update the brain profile's directives. These take effect on subsequent captures, not retroactively.

Reference: https://docs.livingbrain.com/api-reference/workspace/update-profile

## Authentication

- `x-api-key` header (required) — Your Living Brain API key. Create one from the dashboard; keys are scoped to an organization and carry the role of the member they were issued to.

## Request

### Path parameters

- `brainId` (string, required) — Brain id

### Body (application/json)

This endpoint expects an UpdateBrainProfileReqDto.

- `whoTheyAre` (string, optional) — Who the subject is. Omit to leave unchanged.
- `whatTheyDo` (string, optional) — What the subject works on. Omit to leave unchanged.
- `focus` (string, optional) — Current focus. Omit to leave unchanged.
- `goals` (string, optional) — Current goals. Omit to leave unchanged.
- `currentProjects` (string, optional) — Projects in flight. Omit to leave unchanged.
- `stuckOn` (string, optional) — Known blockers. Omit to leave unchanged.
- `vaultOrganization` (string, optional) — Organization preference. Omit to leave unchanged.
- `directives` (BrainProfileDirectivesDto, optional) — Standing instructions. Omit to leave unchanged.

## Response

### 200

- `id` (string, required) — Profile id
- `tenantId` (string, required) — Owning tenant id
- `subjectId` (string, required) — Owning subject id (host-defined)
- `brainId` (string, required) — Owning brain id
- `whoTheyAre` (string, required) — Who the subject is — role, background, and context that frames how captures are interpreted.
- `whatTheyDo` (string, required) — What the subject works on day to day.
- `focus` (string, required) — What the subject is concentrating on right now.
- `goals` (string, required) — What the subject is trying to achieve.
- `currentProjects` (string, required) — Projects currently in flight.
- `stuckOn` (string, required) — Known blockers, so the brain can surface relevant material.
- `vaultOrganization` (string, required) — How the subject prefers their knowledge organized.
- `directives` (BrainProfileDirectivesResDto, required, nullable) — Standing instructions that shape how new captures are compiled.
- `createdAt` (datetime, required) — ISO 8601 timestamp of when this record was created.
- `updatedAt` (datetime, required) — ISO 8601 timestamp of when this record was last modified.

## Errors

### 400 Bad Request Error

Validation failed (e.g. empty title/body, slug already in use)

- `statusCode` (integer, required) — HTTP status code
- `timestamp` (string, required) — ISO timestamp of the failure
- `path` (string, required) — Request path (query string stripped)
- `message` (string, required) — Human-readable error message
- `body` (ErrorResDtoBody, optional) — Original framework exception response when available, e.g. `{ statusCode, message, error }` with per-field validation messages

### 401 Unauthorized Error

Unauthorized

- `statusCode` (integer, required) — HTTP status code
- `timestamp` (string, required) — ISO timestamp of the failure
- `path` (string, required) — Request path (query string stripped)
- `message` (string, required) — Human-readable error message
- `body` (ErrorResDtoBody, optional) — Original framework exception response when available, e.g. `{ statusCode, message, error }` with per-field validation messages

### 404 Not Found Error

Brain, page, change, or connection not found

- `statusCode` (integer, required) — HTTP status code
- `timestamp` (string, required) — ISO timestamp of the failure
- `path` (string, required) — Request path (query string stripped)
- `message` (string, required) — Human-readable error message
- `body` (ErrorResDtoBody, optional) — Original framework exception response when available, e.g. `{ statusCode, message, error }` with per-field validation messages

## Types

### BrainProfileDirectivesDto

- `surfaceConnections` (boolean, optional) — Surface non-obvious connections between captures
- `challengeAssumptions` (boolean, optional) — Challenge the user's assumptions before agreeing
- `preferVaultContext` (boolean, optional) — Answer from vault context, not generically
- `flagContradictions` (boolean, optional) — Flag contradictions with earlier saved beliefs
- `custom` (string, optional) — Custom free-form directives

### BrainProfileDirectivesResDto

- `surfaceConnections` (boolean, required) — Whether the brain should proactively surface non-obvious connections.
- `challengeAssumptions` (boolean, required) — Whether the brain should push back on assumptions rather than agreeing.
- `preferVaultContext` (boolean, required) — Whether stored knowledge should outweigh the model's own priors.
- `flagContradictions` (boolean, required) — Whether to mark pages as contested when new material disagrees with them.
- `custom` (string, required) — Free-form directives appended to the compiled instructions.

### ErrorResDtoBody

Original framework exception response when available, e.g. `{ statusCode, message, error }` with per-field validation messages

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "id": "string",
  "tenantId": "string",
  "subjectId": "string",
  "brainId": "string",
  "whoTheyAre": "string",
  "whatTheyDo": "string",
  "focus": "string",
  "goals": "string",
  "currentProjects": "string",
  "stuckOn": "string",
  "vaultOrganization": "string",
  "directives": {
    "surfaceConnections": true,
    "challengeAssumptions": true,
    "preferVaultContext": true,
    "flagContradictions": true,
    "custom": "string"
  },
  "createdAt": "2024-01-15T09:30:00Z",
  "updatedAt": "2024-01-15T09:30:00Z"
}
```

**SDK Code**

```python
import requests

url = "https://api.livingbrain.com/v1/brains/brainId/profile"

payload = {}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript
const url = 'https://api.livingbrain.com/v1/brains/brainId/profile';
const options = {
  method: 'PATCH',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.livingbrain.com/v1/brains/brainId/profile"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("x-api-key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.livingbrain.com/v1/brains/brainId/profile")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://api.livingbrain.com/v1/brains/brainId/profile")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.livingbrain.com/v1/brains/brainId/profile', [
  'body' => '{}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.livingbrain.com/v1/brains/brainId/profile");
var request = new RestRequest(Method.PATCH);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.livingbrain.com/v1/brains/brainId/profile")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```