> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pnbr.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Update brain

> Edit a brain.

**Operation ID:** `http.brains.update`

```http theme={null}
PATCH /v1/orgs/{org}/projects/{project}/brains/{id}
```


## OpenAPI

````yaml openapi.json PATCH /v1/orgs/{org}/projects/{project}/brains/{id}
openapi: 3.1.0
info:
  title: Penumbra API
  version: v1
  description: >-
    HTTP reference for Files, search, extraction, reviews, Graph, Shapes and
    sharing.
servers:
  - url: https://api.pnbr.io
    description: Penumbra API
security: []
paths:
  /v1/orgs/{org}/projects/{project}/brains/{id}:
    patch:
      tags:
        - Brains
      summary: Update brain
      description: |-
        Edit a brain.

        Product guidance: [Brain](/concepts/brain).
      operationId: http.brains.update
      parameters:
        - name: org
          in: path
          required: true
          schema:
            type: string
        - name: project
          in: path
          required: true
          schema:
            type: string
        - name: id
          in: path
          required: true
          schema:
            type: string
        - name: Idempotency-Key
          in: header
          required: true
          description: >-
            1–200 printable ASCII characters, no surrounding spaces; '.' and
            '..' are reserved. Reuse this key with the same request when
            retrying an uncertain outcome.
          schema:
            type: string
            minLength: 1
            maxLength: 200
            pattern: ^(?!\.{1,2}$)[!-~](?:[ -~]*[!-~])?$
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/http_brains_update_request'
      responses:
        2XX:
          description: Success.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/http_brains_update_response'
      security:
        - bearerAuth: []
components:
  schemas:
    http_brains_update_request:
      type: object
      properties:
        name:
          type: string
          maxLength: 200
        purpose:
          anyOf:
            - type: string
              maxLength: 4096
            - type: 'null'
        kit_version_id:
          anyOf:
            - type: string
              format: uuid
              pattern: >-
                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
            - type: 'null'
        instance_instructions:
          type: string
      additionalProperties: false
    http_brains_update_response:
      type: object
      properties:
        request_id:
          type: string
        outcome:
          type: string
          const: applied
        replayed:
          type: boolean
        data:
          type: object
          properties:
            id:
              type: string
              format: uuid
              pattern: >-
                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
            name:
              type: string
            purpose:
              anyOf:
                - type: string
                - type: 'null'
            view:
              type: object
              properties:
                id:
                  type: string
                  format: uuid
                  pattern: >-
                    ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                name:
                  type: string
                head_version_number:
                  anyOf:
                    - type: integer
                      minimum: -9007199254740991
                      maximum: 9007199254740991
                    - type: 'null'
                created_version_number:
                  type: integer
                  minimum: -9007199254740991
                  maximum: 9007199254740991
                retired:
                  type: boolean
              required:
                - id
                - name
                - head_version_number
                - created_version_number
                - retired
              additionalProperties: false
            kit:
              anyOf:
                - type: object
                  properties:
                    id:
                      type: string
                      format: uuid
                      pattern: >-
                        ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                    name:
                      type: string
                    version_id:
                      type: string
                      format: uuid
                      pattern: >-
                        ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                    version_number:
                      type: integer
                      minimum: -9007199254740991
                      maximum: 9007199254740991
                    retired:
                      type: boolean
                  required:
                    - id
                    - name
                    - version_id
                    - version_number
                    - retired
                  additionalProperties: false
                - type: 'null'
            instance_instructions:
              type: string
            created_at:
              type: string
            updated_at:
              type: string
            retired_at:
              anyOf:
                - type: string
                - type: 'null'
            doors:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                    pattern: >-
                      ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                  brain_id:
                    type: string
                    format: uuid
                    pattern: >-
                      ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                  kind:
                    type: string
                    enum:
                      - client
                      - connection
                      - api_key
                      - invitation
                      - app
                  state:
                    type: string
                    enum:
                      - active
                      - moved
                      - closed
                  label:
                    anyOf:
                      - type: string
                      - type: 'null'
                  subject_id:
                    anyOf:
                      - type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                      - type: 'null'
                  credential_id:
                    anyOf:
                      - type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                      - type: 'null'
                  connection_id:
                    anyOf:
                      - type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                      - type: 'null'
                  kit_version_id:
                    anyOf:
                      - type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                      - type: 'null'
                  invitation_id:
                    anyOf:
                      - type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                      - type: 'null'
                  view:
                    anyOf:
                      - type: object
                        properties:
                          boundary_id:
                            anyOf:
                              - type: string
                                format: uuid
                                pattern: >-
                                  ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                              - type: 'null'
                          id:
                            type: string
                            format: uuid
                            pattern: >-
                              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                          name:
                            type: string
                          retired:
                            type: boolean
                          mode:
                            type: string
                            enum:
                              - follow
                              - pinned
                          pinned_version_id:
                            anyOf:
                              - type: string
                                format: uuid
                                pattern: >-
                                  ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                              - type: 'null'
                          graph_mode:
                            type: string
                            enum:
                              - backed
                              - types
                        required:
                          - boundary_id
                          - id
                          - name
                          - retired
                          - mode
                          - pinned_version_id
                          - graph_mode
                        additionalProperties: false
                      - type: 'null'
                  assistants:
                    type: array
                    items:
                      type: object
                      properties:
                        kind:
                          type: string
                          enum:
                            - kit
                            - consent
                        id:
                          type: string
                          format: uuid
                          pattern: >-
                            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                        name:
                          type: string
                      required:
                        - kind
                        - id
                        - name
                      additionalProperties: false
                  added_at:
                    type: string
                required:
                  - id
                  - brain_id
                  - kind
                  - state
                  - label
                  - subject_id
                  - credential_id
                  - connection_id
                  - kit_version_id
                  - invitation_id
                  - view
                  - assistants
                  - added_at
                additionalProperties: false
          required:
            - id
            - name
            - purpose
            - view
            - kit
            - instance_instructions
            - created_at
            - updated_at
            - retired_at
            - doors
          additionalProperties: false
      required:
        - request_id
        - outcome
        - replayed
        - data
      additionalProperties: {}
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.