Patricia Brain Docs API

The brain-docs API from Patricia — 4 operation(s) for brain-docs.

GitHub OpenAPI

Operations 10

GET /v1/brain-docs Search brain docs #
POST /v1/brain-docs Create brain doc #
GET /v1/brain-docs/{id} Get brain doc #
PUT /v1/brain-docs/{id} Update brain doc #
PATCH /v1/brain-docs/{id} Partial update brain doc #
DELETE /v1/brain-docs/{id} Delete brain doc #
POST /v1/spaces/{space_id}/documents Create Space Document #
PUT /v1/spaces/{space_id}/documents/{doc_id} Update Space Document #
PATCH /v1/spaces/{space_id}/documents/{doc_id} Patch Space Document #
DELETE /v1/spaces/{space_id}/documents/{doc_id} Delete Space Document #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/patricia-app:patricia-app-brain-docs-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

patricia-app-brain-docs-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Patricia Brain Docs API
  version: 0.1.0
tags:
- name: brain-docs
paths:
  /v1/brain-docs:
    get:
      tags:
      - brain-docs
      summary: Search brain docs
      description: List brain docs with filtering, sorting, and pagination.
      operationId: list_items_v1_brain_docs_get
      security:
      - HTTPBearer: []
      parameters:
      - name: q
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: ANTLR filter expression
          title: Q
        description: ANTLR filter expression
      - name: limit
        in: query
        required: false
        schema:
          anyOf:
          - type: integer
            maximum: 500
            minimum: 1
          - type: 'null'
          description: Page size
          title: Limit
        description: Page size
      - name: sort_by
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Sort expression (e.g. created_at:desc)
          title: Sort By
        description: Sort expression (e.g. created_at:desc)
      - name: fields
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Field projection (e.g. id,name)
          title: Fields
        description: Field projection (e.g. id,name)
      - name: pq
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Pagination cursor query
          title: Pq
        description: Pagination cursor query
      - name: from_prev
        in: query
        required: false
        schema:
          type: boolean
          description: Backward pagination flag
          default: false
          title: From Prev
        description: Backward pagination flag
      - name: X-Tenant-Id
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Tenant-Id
      responses:
        '200':
          description: Paginated brain doc list.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models__brain__BrainDoc__SearchValidator'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: 'Forbidden. Inspect response body `code` for the specific reason (for example: PERMISSION_DENIED, EMAIL_NOT_VERIFIED, TENANT_ACCESS_REQUIRED, ROLE_UNRESOLVED)'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      tags:
      - brain-docs
      summary: Create brain doc
      description: Create a new brain doc.
      operationId: create_item_v1_brain_docs_post
      security:
      - HTTPBearer: []
      parameters:
      - name: X-Tenant-Id
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Tenant-Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/models__brain__BrainDoc__CreateValidator'
      responses:
        '201':
          description: The created brain doc.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models__brain__BrainDoc__FullValidator'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: 'Forbidden. Inspect response body `code` for the specific reason (for example: PERMISSION_DENIED, EMAIL_NOT_VERIFIED, TENANT_ACCESS_REQUIRED, ROLE_UNRESOLVED)'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v1/brain-docs/{id}:
    get:
      tags:
      - brain-docs
      summary: Get brain doc
      description: Retrieve a single brain doc by ID.
      operationId: get_item_v1_brain_docs__id__get
      security:
      - HTTPBearer: []
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Id
      - name: X-Tenant-Id
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Tenant-Id
      responses:
        '200':
          description: The requested brain doc.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models__brain__BrainDoc__FullValidator'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: 'Forbidden. Inspect response body `code` for the specific reason (for example: PERMISSION_DENIED, EMAIL_NOT_VERIFIED, TENANT_ACCESS_REQUIRED, ROLE_UNRESOLVED)'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    put:
      tags:
      - brain-docs
      summary: Update brain doc
      description: Full update (PUT) of a brain doc.
      operationId: update_item_v1_brain_docs__id__put
      security:
      - HTTPBearer: []
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Id
      - name: X-Tenant-Id
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Tenant-Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/models__brain__BrainDoc__UpdateValidator'
      responses:
        '200':
          description: The updated brain doc.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models__brain__BrainDoc__FullValidator'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: 'Forbidden. Inspect response body `code` for the specific reason (for example: PERMISSION_DENIED, EMAIL_NOT_VERIFIED, TENANT_ACCESS_REQUIRED, ROLE_UNRESOLVED)'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    patch:
      tags:
      - brain-docs
      summary: Partial update brain doc
      description: Partial update (PATCH) of a brain doc.
      operationId: merge_item_v1_brain_docs__id__patch
      security:
      - HTTPBearer: []
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Id
      - name: X-Tenant-Id
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Tenant-Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/models__brain__BrainDoc__MergeValidator'
      responses:
        '200':
          description: The updated brain doc.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models__brain__BrainDoc__FullValidator'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: 'Forbidden. Inspect response body `code` for the specific reason (for example: PERMISSION_DENIED, EMAIL_NOT_VERIFIED, TENANT_ACCESS_REQUIRED, ROLE_UNRESOLVED)'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      tags:
      - brain-docs
      summary: Delete brain doc
      description: Soft-delete a brain doc by ID.
      operationId: delete_item_v1_brain_docs__id__delete
      security:
      - HTTPBearer: []
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Id
      - name: X-Tenant-Id
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Tenant-Id
      responses:
        '204':
          description: No content.
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: 'Forbidden. Inspect response body `code` for the specific reason (for example: PERMISSION_DENIED, EMAIL_NOT_VERIFIED, TENANT_ACCESS_REQUIRED, ROLE_UNRESOLVED)'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /v1/spaces/{space_id}/documents:
    post:
      tags:
      - brain-docs
      summary: Create Space Document
      operationId: create_space_document_v1_spaces__space_id__documents_post
      security:
      - HTTPBearer: []
      parameters:
      - name: space_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Space Id
      - name: X-Tenant-Id
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Tenant-Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SpaceDocumentCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models__brain__BrainDoc__FullValidator'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/spaces/{space_id}/documents/{doc_id}:
    put:
      tags:
      - brain-docs
      summary: Update Space Document
      operationId: update_space_document_v1_spaces__space_id__documents__doc_id__put
      security:
      - HTTPBearer: []
      parameters:
      - name: space_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Space Id
      - name: doc_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Doc Id
      - name: X-Tenant-Id
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Tenant-Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SpaceDocumentUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models__brain__BrainDoc__FullValidator'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    patch:
      tags:
      - brain-docs
      summary: Patch Space Document
      operationId: patch_space_document_v1_spaces__space_id__documents__doc_id__patch
      security:
      - HTTPBearer: []
      parameters:
      - name: space_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Space Id
      - name: doc_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Doc Id
      - name: X-Tenant-Id
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Tenant-Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SpaceDocumentPatch'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models__brain__BrainDoc__FullValidator'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - brain-docs
      summary: Delete Space Document
      operationId: delete_space_document_v1_spaces__space_id__documents__doc_id__delete
      security:
      - HTTPBearer: []
      parameters:
      - name: space_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Space Id
      - name: doc_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Doc Id
      - name: X-Tenant-Id
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Tenant-Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    SpaceDocumentUpdate:
      properties:
        title:
          type: string
          title: Title
        summary:
          type: string
          title: Summary
          default: ''
        body:
          type: string
          title: Body
          default: ''
      additionalProperties: false
      type: object
      required:
      - title
      title: SpaceDocumentUpdate
    DocStatus:
      type: string
      enum:
      - active
      - archived
      title: DocStatus
    SpaceDocumentCreate:
      properties:
        path:
          type: string
          title: Path
        title:
          type: string
          title: Title
        summary:
          type: string
          title: Summary
          default: ''
        body:
          type: string
          title: Body
          default: ''
      additionalProperties: false
      type: object
      required:
      - path
      - title
      title: SpaceDocumentCreate
    ErrorResponse:
      properties:
        code:
          type: string
          title: Code
        message:
          type: string
          title: Message
        errors:
          anyOf:
          - items:
              additionalProperties: true
              type: object
            type: array
          - type: 'null'
          title: Errors
      type: object
      required:
      - code
      - message
      title: ErrorResponse
      description: Standard error envelope, matching exception handler output.
    models__brain__BrainDoc__MergeValidator:
      properties:
        title:
          anyOf:
          - type: string
          - type: 'null'
          title: Title
        summary:
          anyOf:
          - type: string
          - type: 'null'
          title: Summary
        body:
          anyOf:
          - type: string
          - type: 'null'
          title: Body
        scope_code:
          anyOf:
          - $ref: '#/components/schemas/BrainDocScope'
          - type: 'null'
        status_code:
          anyOf:
          - $ref: '#/components/schemas/DocStatus'
          - type: 'null'
        pinned:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Pinned
        group_id:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Group Id
        space_id:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Space Id
        updated_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Updated At
      additionalProperties: false
      type: object
      title: MergeValidator
      description: 'PATCH body: every field optional; only those set are written.'
    models__brain__BrainDoc__UpdateValidator:
      properties:
        title:
          type: string
          title: Title
        summary:
          type: string
          title: Summary
          default: ''
        body:
          type: string
          title: Body
          default: ''
        scope_code:
          $ref: '#/components/schemas/BrainDocScope'
        status_code:
          $ref: '#/components/schemas/DocStatus'
        pinned:
          type: boolean
          title: Pinned
          default: false
        group_id:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Group Id
        space_id:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Space Id
        updated_at:
          type: string
          format: date-time
          title: Updated At
      additionalProperties: false
      type: object
      required:
      - title
      - scope_code
      - status_code
      - updated_at
      title: UpdateValidator
      description: 'PUT body: full update of mutable fields (carries ``updated_at`` for the stale check).'
    models__brain__BrainDoc__CreateValidator:
      properties:
        path:
          type: string
          title: Path
        title:
          type: string
          title: Title
        summary:
          type: string
          title: Summary
          default: ''
        body:
          type: string
          title: Body
          default: ''
        scope_code:
          $ref: '#/components/schemas/BrainDocScope'
          default: company
        status_code:
          $ref: '#/components/schemas/DocStatus'
          default: active
        pinned:
          type: boolean
          title: Pinned
          default: false
        group_id:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Group Id
        space_id:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Space Id
      additionalProperties: false
      type: object
      required:
      - path
      - title
      title: CreateValidator
      description: POST body. ``tenant_id`` is server-assigned from the request context.
    models__brain__BrainDoc__SearchValidator:
      properties:
        items:
          items:
            $ref: '#/components/schemas/models__brain__BrainDoc__FullValidator'
          type: array
          title: Items
        first:
          anyOf:
          - type: string
          - type: 'null'
          title: First
        next:
          anyOf:
          - type: string
          - type: 'null'
          title: Next
        previous:
          anyOf:
          - type: string
          - type: 'null'
          title: Previous
      type: object
      required:
      - items
      title: SearchValidator
      description: Typed cursor-paginated list response.
    BrainDocScope:
      type: string
      enum:
      - company
      - space
      - group
      - team
      - domain
      - agent
      title: BrainDocScope
    SpaceDocumentPatch:
      properties:
        title:
          anyOf:
          - type: string
          - type: 'null'
          title: Title
        summary:
          anyOf:
          - type: string
          - type: 'null'
          title: Summary
        body:
          anyOf:
          - type: string
          - type: 'null'
          title: Body
      additionalProperties: false
      type: object
      title: SpaceDocumentPatch
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    models__brain__BrainDoc__FullValidator:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        tenant_id:
          type: string
          format: uuid
          title: Tenant Id
        path:
          type: string
          title: Path
        title:
          type: string
          title: Title
        summary:
          type: string
          title: Summary
        body:
          type: string
          title: Body
        scope_code:
          $ref: '#/components/schemas/BrainDocScope'
        status_code:
          $ref: '#/components/schemas/DocStatus'
        pinned:
          type: boolean
          title: Pinned
        version:
          type: integer
          title: Version
        token_count:
          type: integer
          title: Token Count
        hit_count:
          type: integer
          title: Hit Count
        last_used_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Last Used At
        updated_by_run:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Updated By Run
        group_id:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Group Id
        space_id:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Space Id
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
      - id
      - tenant_id
      - path
      - title
      - summary
      - body
      - scope_code
      - status_code
      - pinned
      - version
      - token_count
      - hit_count
      - created_at
      - updated_at
      title: FullValidator
      description: Response shape for GET / POST / PUT / PATCH.
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer