{"openapi":"3.0.0","info":{"title":"onlybrain integration API","version":"v1.65.0","description":"The REST API of onlybrain for other services (n8n, Zapier, own scripts): read one brain and propose changes to it, and receive its webhooks.\n\n## Authentication\n\n`Authorization: Bearer obi_…`: an integration token, made by a member of the brain in its settings. It is shown once, belongs to **one brain**, expires (90 days by default, 365 at most) and has scopes:\n\n- `read`: read the files, history, search and meetings of the brain, as the member’s role sees them\n- `propose`: propose changes and notes; they always wait for approval in onlybrain\n\nThe token never gets more than the member: every request sees exactly what the member’s role allows at that moment (hidden files do not exist for it). A route needs the scope in its `x-integration-scope`. Routes not listed here refuse a token with 403.\n\n## Errors\n\nEvery error is `{ \"error\": { \"code\": \"…\", \"message\": \"…\" } }`. `code` is stable and meant for programs; `message` is for people, in Czech or, with `Accept-Language: en`, in English. Every route may answer:\n\n- 401 `UNAUTHORIZED`: no token, or it was revoked, expired or does not exist;\n- 403 `FORBIDDEN`: the token lacks the scope, or the member’s role may not do it;\n- 404 `BRAIN_NOT_FOUND`: the brain in the path is not the token’s brain (or is archived, or the member left it);\n- 429 `RATE_LIMITED` with `Retry-After` (seconds): 60 requests per minute per token, and 30 proposals and notes per hour.\n\n## Writing\n\n`POST proposals` and `POST notes` never write into the brain directly: they make a proposal that a manager approves in onlybrain (the `proposal.created` and `proposal.decided` webhooks tell when). A change of an existing file needs its `base`: the `sha` (or its first 12 characters) from `GET file`.\n\n## Webhooks\n\nA brain’s managers add webhooks in its settings; onlybrain then sends `POST` with a JSON body to their `https://` address. The schemas are under `x-webhooks` and in `components.schemas` (`WebhookEventDto` is the envelope; the events are `BrainChangedEventDto`, `ProposalCreatedEventDto`, `ProposalDecidedEventDto`, `MeetingReadyEventDto`, `MemberAddedEventDto`, `MemberRemovedEventDto`, `PingEventDto`). A body has metadata only (paths, names, who and when), never the content of files.\n\nHeaders: `X-Onlybrain-Event`, `X-Onlybrain-Delivery`, `X-Onlybrain-Timestamp`, `X-Onlybrain-Signature`. Verify `X-Onlybrain-Signature` before trusting a body:\n\n```js\nimport { createHmac, timingSafeEqual } from 'node:crypto'\n\n// rawBody: the body exactly as received (Buffer or string), not JSON serialized again\nconst verify = (rawBody, header, secret) => {\n  const expected = 'sha256=' + createHmac('sha256', secret).update(rawBody).digest('hex')\n  return typeof header === 'string' && header.length === expected.length && timingSafeEqual(Buffer.from(header), Buffer.from(expected))\n}\n```\n\nA delivery succeeds with any 2xx answer within 10 s; otherwise it is tried again (8 attempts over about 24 hours). `id` in the body stays the same on every attempt: use it to drop duplicates."},"servers":[{"url":"https://api.onlybrain.ai"}],"tags":[{"name":"Integrations","description":"Routes open to an integration token (`obi_…`), all of one brain"},{"name":"Webhooks","description":"What onlybrain sends to the address of a webhook (`x-webhooks`)"}],"paths":{"/v1/brains/{org}/{brain}/tree":{"get":{"description":"The files and folders the member’s role sees (exactly what its git clone contains) and the role itself. `path` and `depth` list one folder at a time; without them the whole brain.\n\nScope: `read`.","operationId":"listTree","parameters":[{"name":"org","required":true,"in":"path","description":"Slug of the organization (from the brain’s address)","schema":{"type":"string"}},{"name":"brain","required":true,"in":"path","description":"Slug of the brain the token was made for","schema":{"type":"string"}},{"name":"role","required":false,"in":"query","description":"Preview of another role (managers only)","schema":{"pattern":"^[a-z0-9][a-z0-9_-]*$","type":"string"}},{"name":"path","required":false,"in":"query","description":"Folder to list under; empty = the root","schema":{"maxLength":1000,"example":"knowledge/company","type":"string"}},{"name":"depth","required":false,"in":"query","description":"Levels below `path`; omitted = all","schema":{"minimum":1,"maximum":1000,"example":1,"type":"integer"}},{"name":"Accept-Language","in":"header","description":"cs (default) or en: the language of `error.message` and of `message`","required":false,"schema":{"type":"string","example":"en"}}],"responses":{"200":{"description":"The role and its tree","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TreeDto"}}}},"400":{"description":"Bad request. `BAD_REQUEST`: a query parameter or a body field is missing or invalid (the message names the field).","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["BAD_REQUEST"],"example":"BAD_REQUEST"},"message":{"type":"string","description":"For people: Czech by default, English with `Accept-Language: en`"}}}}}}}},"401":{"description":"Token missing or not valid. `UNAUTHORIZED`: no token, or the token was revoked, expired or does not exist.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED"],"example":"UNAUTHORIZED"},"message":{"type":"string","description":"For people: Czech by default, English with `Accept-Language: en`"}}}}}}}},"403":{"description":"Not allowed. `FORBIDDEN`: the route is not open to integration tokens, the token lacks the scope, or the member’s role may not do this.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["FORBIDDEN"],"example":"FORBIDDEN"},"message":{"type":"string","description":"For people: Czech by default, English with `Accept-Language: en`"}}}}}}}},"404":{"description":"Not found. `BRAIN_NOT_FOUND`: the brain is not the token’s brain, is archived, or the member no longer has access to it (the same answer as for a stranger); `ROLE_NOT_FOUND`: the role of `role` does not exist.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["BRAIN_NOT_FOUND","ROLE_NOT_FOUND"],"example":"BRAIN_NOT_FOUND"},"message":{"type":"string","description":"For people: Czech by default, English with `Accept-Language: en`"}}}}}}}},"429":{"description":"Rate limit. `RATE_LIMITED`: too many requests: see `Retry-After`.","headers":{"Retry-After":{"description":"Seconds until the limit lets the token in again","schema":{"type":"integer","example":42}}},"content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["RATE_LIMITED"],"example":"RATE_LIMITED"},"message":{"type":"string","description":"For people: Czech by default, English with `Accept-Language: en`"}}}}}}}}},"security":[{"integrationToken":[]}],"summary":"List files and folders","tags":["Integrations"],"x-integration-scope":"read"}},"/v1/brains/{org}/{brain}/history":{"get":{"description":"Commits of the main branch, newest first, as the role sees them: only visible files, commits without a visible change left out, messages and authors hidden where the role’s rules say so. The next page: `cursor` of the last entry.\n\nScope: `read`.","operationId":"listHistory","parameters":[{"name":"org","required":true,"in":"path","description":"Slug of the organization (from the brain’s address)","schema":{"type":"string"}},{"name":"brain","required":true,"in":"path","description":"Slug of the brain the token was made for","schema":{"type":"string"}},{"name":"path","required":false,"in":"query","description":"Only commits that changed this file or a file in this folder","schema":{"example":"klienti","type":"string"}},{"name":"limit","required":false,"in":"query","description":"Commits at most, newest first","schema":{"minimum":1,"maximum":200,"default":50,"type":"integer"}},{"name":"cursor","required":false,"in":"query","description":"`cursor` of the last entry of the previous page: the commits after it, as the history was when the first page was read","schema":{"type":"string"}},{"name":"Accept-Language","in":"header","description":"cs (default) or en: the language of `error.message` and of `message`","required":false,"schema":{"type":"string","example":"en"}}],"responses":{"200":{"description":"Commits, newest first","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/HistoryEntryDto"}}}}},"400":{"description":"Bad request. `BAD_REQUEST`: a query parameter or a body field is missing or invalid (the message names the field); `INVALID_CURSOR`: `cursor` is not one this route gave for the same filter, or the history was rewritten since.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["BAD_REQUEST","INVALID_CURSOR"],"example":"BAD_REQUEST"},"message":{"type":"string","description":"For people: Czech by default, English with `Accept-Language: en`"}}}}}}}},"401":{"description":"Token missing or not valid. `UNAUTHORIZED`: no token, or the token was revoked, expired or does not exist.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED"],"example":"UNAUTHORIZED"},"message":{"type":"string","description":"For people: Czech by default, English with `Accept-Language: en`"}}}}}}}},"403":{"description":"Not allowed. `FORBIDDEN`: the route is not open to integration tokens, the token lacks the scope, or the member’s role may not do this.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["FORBIDDEN"],"example":"FORBIDDEN"},"message":{"type":"string","description":"For people: Czech by default, English with `Accept-Language: en`"}}}}}}}},"404":{"description":"Not found. `BRAIN_NOT_FOUND`: the brain is not the token’s brain, is archived, or the member no longer has access to it (the same answer as for a stranger).","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["BRAIN_NOT_FOUND"],"example":"BRAIN_NOT_FOUND"},"message":{"type":"string","description":"For people: Czech by default, English with `Accept-Language: en`"}}}}}}}},"429":{"description":"Rate limit. `RATE_LIMITED`: too many requests: see `Retry-After`.","headers":{"Retry-After":{"description":"Seconds until the limit lets the token in again","schema":{"type":"integer","example":42}}},"content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["RATE_LIMITED"],"example":"RATE_LIMITED"},"message":{"type":"string","description":"For people: Czech by default, English with `Accept-Language: en`"}}}}}}}}},"security":[{"integrationToken":[]}],"summary":"Commit history","tags":["Integrations"],"x-integration-scope":"read"}},"/v1/brains/{org}/{brain}/file":{"get":{"description":"One file as the member’s role sees it: its text (UTF-8), its `sha` (the `base` for a proposed change) and whether the role may change it. A binary file or one over 1 MB has `content: null`; get its bytes from `file/raw`.\n\nScope: `read`.","operationId":"readFile","parameters":[{"name":"org","required":true,"in":"path","description":"Slug of the organization (from the brain’s address)","schema":{"type":"string"}},{"name":"brain","required":true,"in":"path","description":"Slug of the brain the token was made for","schema":{"type":"string"}},{"name":"path","required":true,"in":"query","description":"Path of the file in the role’s view, as `tree` lists it","schema":{"minLength":1,"maxLength":1000,"example":"knowledge/company/README.md","type":"string"}},{"name":"version","required":false,"in":"query","description":"An older version: the blob the file had (from the map’s time line). Only a version of this file the role’s history holds; never editable","schema":{"example":"83baae61804e65cc73a7201a7252750c76066a30","type":"string"}},{"name":"Accept-Language","in":"header","description":"cs (default) or en: the language of `error.message` and of `message`","required":false,"schema":{"type":"string","example":"en"}}],"responses":{"200":{"description":"The file","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileDto"}}}},"400":{"description":"Bad request. `BAD_REQUEST`: a query parameter or a body field is missing or invalid (the message names the field).","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["BAD_REQUEST"],"example":"BAD_REQUEST"},"message":{"type":"string","description":"For people: Czech by default, English with `Accept-Language: en`"}}}}}}}},"401":{"description":"Token missing or not valid. `UNAUTHORIZED`: no token, or the token was revoked, expired or does not exist.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED"],"example":"UNAUTHORIZED"},"message":{"type":"string","description":"For people: Czech by default, English with `Accept-Language: en`"}}}}}}}},"403":{"description":"Not allowed. `FORBIDDEN`: the route is not open to integration tokens, the token lacks the scope, or the member’s role may not do this.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["FORBIDDEN"],"example":"FORBIDDEN"},"message":{"type":"string","description":"For people: Czech by default, English with `Accept-Language: en`"}}}}}}}},"404":{"description":"Not found. `BRAIN_NOT_FOUND`: the brain is not the token’s brain, is archived, or the member no longer has access to it (the same answer as for a stranger); `FILE_NOT_FOUND`: the file is not in the brain, or the role does not see it.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["BRAIN_NOT_FOUND","FILE_NOT_FOUND"],"example":"BRAIN_NOT_FOUND"},"message":{"type":"string","description":"For people: Czech by default, English with `Accept-Language: en`"}}}}}}}},"429":{"description":"Rate limit. `RATE_LIMITED`: too many requests: see `Retry-After`.","headers":{"Retry-After":{"description":"Seconds until the limit lets the token in again","schema":{"type":"integer","example":42}}},"content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["RATE_LIMITED"],"example":"RATE_LIMITED"},"message":{"type":"string","description":"For people: Czech by default, English with `Accept-Language: en`"}}}}}}}}},"security":[{"integrationToken":[]}],"summary":"Read a file","tags":["Integrations"],"x-integration-scope":"read"}},"/v1/brains/{org}/{brain}/file/raw":{"get":{"description":"The bytes of one file (a PDF, an image, a document), with `Content-Type` by its extension and `Content-Disposition: inline`. At most 30 MB.\n\nScope: `read`.","operationId":"downloadFile","parameters":[{"name":"org","required":true,"in":"path","description":"Slug of the organization (from the brain’s address)","schema":{"type":"string"}},{"name":"brain","required":true,"in":"path","description":"Slug of the brain the token was made for","schema":{"type":"string"}},{"name":"path","required":true,"in":"query","description":"Path of the file in the role’s view, as `tree` lists it","schema":{"minLength":1,"maxLength":1000,"example":"knowledge/company/README.md","type":"string"}},{"name":"version","required":false,"in":"query","description":"An older version: the blob the file had (from the map’s time line). Only a version of this file the role’s history holds; never editable","schema":{"example":"83baae61804e65cc73a7201a7252750c76066a30","type":"string"}},{"name":"Accept-Language","in":"header","description":"cs (default) or en: the language of `error.message` and of `message`","required":false,"schema":{"type":"string","example":"en"}}],"responses":{"200":{"description":"The file itself","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary","description":"The real `Content-Type` follows the file’s extension (application/pdf, image/png, text/markdown, ...)"}}}},"400":{"description":"Bad request. `BAD_REQUEST`: a query parameter or a body field is missing or invalid (the message names the field); `FILE_TOO_LARGE`: the file is larger than this route serves.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["BAD_REQUEST","FILE_TOO_LARGE"],"example":"BAD_REQUEST"},"message":{"type":"string","description":"For people: Czech by default, English with `Accept-Language: en`"}}}}}}}},"401":{"description":"Token missing or not valid. `UNAUTHORIZED`: no token, or the token was revoked, expired or does not exist.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED"],"example":"UNAUTHORIZED"},"message":{"type":"string","description":"For people: Czech by default, English with `Accept-Language: en`"}}}}}}}},"403":{"description":"Not allowed. `FORBIDDEN`: the route is not open to integration tokens, the token lacks the scope, or the member’s role may not do this.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["FORBIDDEN"],"example":"FORBIDDEN"},"message":{"type":"string","description":"For people: Czech by default, English with `Accept-Language: en`"}}}}}}}},"404":{"description":"Not found. `BRAIN_NOT_FOUND`: the brain is not the token’s brain, is archived, or the member no longer has access to it (the same answer as for a stranger); `FILE_NOT_FOUND`: the file is not in the brain, or the role does not see it.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["BRAIN_NOT_FOUND","FILE_NOT_FOUND"],"example":"BRAIN_NOT_FOUND"},"message":{"type":"string","description":"For people: Czech by default, English with `Accept-Language: en`"}}}}}}}},"429":{"description":"Rate limit. `RATE_LIMITED`: too many requests: see `Retry-After`.","headers":{"Retry-After":{"description":"Seconds until the limit lets the token in again","schema":{"type":"integer","example":42}}},"content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["RATE_LIMITED"],"example":"RATE_LIMITED"},"message":{"type":"string","description":"For people: Czech by default, English with `Accept-Language: en`"}}}}}}}}},"security":[{"integrationToken":[]}],"summary":"Download a file","tags":["Integrations"],"x-integration-scope":"read"}},"/v1/brains/{org}/{brain}/files/meta":{"get":{"description":"Every file the role sees with its first and last commit and who changed it (from the newest 20 000 commits). A commit that also changed files the role does not see counts without its author and time of day.\n\nScope: `read`.","operationId":"getFilesMeta","parameters":[{"name":"org","required":true,"in":"path","description":"Slug of the organization (from the brain’s address)","schema":{"type":"string"}},{"name":"brain","required":true,"in":"path","description":"Slug of the brain the token was made for","schema":{"type":"string"}},{"name":"Accept-Language","in":"header","description":"cs (default) or en: the language of `error.message` and of `message`","required":false,"schema":{"type":"string","example":"en"}}],"responses":{"200":{"description":"Files with their dates and authors","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilesMetaDto"}}}},"401":{"description":"Token missing or not valid. `UNAUTHORIZED`: no token, or the token was revoked, expired or does not exist.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED"],"example":"UNAUTHORIZED"},"message":{"type":"string","description":"For people: Czech by default, English with `Accept-Language: en`"}}}}}}}},"403":{"description":"Not allowed. `FORBIDDEN`: the route is not open to integration tokens, the token lacks the scope, or the member’s role may not do this.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["FORBIDDEN"],"example":"FORBIDDEN"},"message":{"type":"string","description":"For people: Czech by default, English with `Accept-Language: en`"}}}}}}}},"404":{"description":"Not found. `BRAIN_NOT_FOUND`: the brain is not the token’s brain, is archived, or the member no longer has access to it (the same answer as for a stranger).","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["BRAIN_NOT_FOUND"],"example":"BRAIN_NOT_FOUND"},"message":{"type":"string","description":"For people: Czech by default, English with `Accept-Language: en`"}}}}}}}},"429":{"description":"Rate limit. `RATE_LIMITED`: too many requests: see `Retry-After`.","headers":{"Retry-After":{"description":"Seconds until the limit lets the token in again","schema":{"type":"integer","example":42}}},"content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["RATE_LIMITED"],"example":"RATE_LIMITED"},"message":{"type":"string","description":"For people: Czech by default, English with `Accept-Language: en`"}}}}}}}}},"security":[{"integrationToken":[]}],"summary":"When files were created and changed","tags":["Integrations"],"x-integration-scope":"read"}},"/v1/brains/{org}/{brain}/files/activity":{"get":{"description":"Files created, changed or deleted between `from` and `to` (days in `tz`, or instants with an offset), with authors, counts per file and per day. Only changes the role sees count.\n\nScope: `read`.","operationId":"getFilesActivity","parameters":[{"name":"org","required":true,"in":"path","description":"Slug of the organization (from the brain’s address)","schema":{"type":"string"}},{"name":"brain","required":true,"in":"path","description":"Slug of the brain the token was made for","schema":{"type":"string"}},{"name":"from","required":false,"in":"query","description":"First day (YYYY-MM-DD, in `tz`) or instant with an offset, inclusive; empty = the beginning","schema":{"maxLength":40,"example":"2026-10-03","type":"string"}},{"name":"to","required":false,"in":"query","description":"Last day (YYYY-MM-DD, in `tz`) or instant with an offset, inclusive; empty = now","schema":{"maxLength":40,"example":"2026-10-05","type":"string"}},{"name":"tz","required":false,"in":"query","description":"IANA time zone of the days (default UTC)","schema":{"maxLength":64,"example":"Europe/Prague","type":"string"}},{"name":"Accept-Language","in":"header","description":"cs (default) or en: the language of `error.message` and of `message`","required":false,"schema":{"type":"string","example":"en"}}],"responses":{"200":{"description":"The activity of the period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityDto"}}}},"400":{"description":"Bad request. `BAD_REQUEST`: a query parameter or a body field is missing or invalid (the message names the field); `INVALID_TIMEZONE`: `tz` is not an IANA time zone; `INVALID_RANGE`: `from` or `to` is not a date, or the range ends before it starts.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["BAD_REQUEST","INVALID_TIMEZONE","INVALID_RANGE"],"example":"BAD_REQUEST"},"message":{"type":"string","description":"For people: Czech by default, English with `Accept-Language: en`"}}}}}}}},"401":{"description":"Token missing or not valid. `UNAUTHORIZED`: no token, or the token was revoked, expired or does not exist.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED"],"example":"UNAUTHORIZED"},"message":{"type":"string","description":"For people: Czech by default, English with `Accept-Language: en`"}}}}}}}},"403":{"description":"Not allowed. `FORBIDDEN`: the route is not open to integration tokens, the token lacks the scope, or the member’s role may not do this.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["FORBIDDEN"],"example":"FORBIDDEN"},"message":{"type":"string","description":"For people: Czech by default, English with `Accept-Language: en`"}}}}}}}},"404":{"description":"Not found. `BRAIN_NOT_FOUND`: the brain is not the token’s brain, is archived, or the member no longer has access to it (the same answer as for a stranger).","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["BRAIN_NOT_FOUND"],"example":"BRAIN_NOT_FOUND"},"message":{"type":"string","description":"For people: Czech by default, English with `Accept-Language: en`"}}}}}}}},"429":{"description":"Rate limit. `RATE_LIMITED`: too many requests: see `Retry-After`.","headers":{"Retry-After":{"description":"Seconds until the limit lets the token in again","schema":{"type":"integer","example":42}}},"content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["RATE_LIMITED"],"example":"RATE_LIMITED"},"message":{"type":"string","description":"For people: Czech by default, English with `Accept-Language: en`"}}}}}}}}},"security":[{"integrationToken":[]}],"summary":"What changed in a period","tags":["Integrations"],"x-integration-scope":"read"}},"/v1/brains/{org}/{brain}/meetings":{"get":{"description":"Recorded meetings of the brain, newest first. The member sees their own meetings; others only once ready and with the summary in a folder the role reads (a manager sees all).\n\nScope: `read`.","operationId":"listMeetings","parameters":[{"name":"org","required":true,"in":"path","description":"Slug of the organization (from the brain’s address)","schema":{"type":"string"}},{"name":"brain","required":true,"in":"path","description":"Slug of the brain the token was made for","schema":{"type":"string"}},{"name":"mine","required":false,"in":"query","description":"`1` or `true` = only the meetings the member recorded","schema":{"example":"1","type":"string"}},{"name":"q","required":false,"in":"query","description":"Part of the title, case-insensitive","schema":{"maxLength":200,"example":"ACME","type":"string"}},{"name":"Accept-Language","in":"header","description":"cs (default) or en: the language of `error.message` and of `message`","required":false,"schema":{"type":"string","example":"en"}}],"responses":{"200":{"description":"The meetings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeetingListDto"}}}},"400":{"description":"Bad request. `BAD_REQUEST`: a query parameter or a body field is missing or invalid (the message names the field).","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["BAD_REQUEST"],"example":"BAD_REQUEST"},"message":{"type":"string","description":"For people: Czech by default, English with `Accept-Language: en`"}}}}}}}},"401":{"description":"Token missing or not valid. `UNAUTHORIZED`: no token, or the token was revoked, expired or does not exist.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED"],"example":"UNAUTHORIZED"},"message":{"type":"string","description":"For people: Czech by default, English with `Accept-Language: en`"}}}}}}}},"403":{"description":"Not allowed. `FORBIDDEN`: the route is not open to integration tokens, the token lacks the scope, or the member’s role may not do this.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["FORBIDDEN"],"example":"FORBIDDEN"},"message":{"type":"string","description":"For people: Czech by default, English with `Accept-Language: en`"}}}}}}}},"404":{"description":"Not found. `BRAIN_NOT_FOUND`: the brain is not the token’s brain, is archived, or the member no longer has access to it (the same answer as for a stranger); `NOT_FOUND`: meetings are not enabled on this server.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["BRAIN_NOT_FOUND","NOT_FOUND"],"example":"BRAIN_NOT_FOUND"},"message":{"type":"string","description":"For people: Czech by default, English with `Accept-Language: en`"}}}}}}}},"429":{"description":"Rate limit. `RATE_LIMITED`: too many requests: see `Retry-After`.","headers":{"Retry-After":{"description":"Seconds until the limit lets the token in again","schema":{"type":"integer","example":42}}},"content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["RATE_LIMITED"],"example":"RATE_LIMITED"},"message":{"type":"string","description":"For people: Czech by default, English with `Accept-Language: en`"}}}}}}}}},"security":[{"integrationToken":[]}],"summary":"List meetings","tags":["Integrations"],"x-integration-scope":"read"}},"/v1/brains/{org}/{brain}/meetings/{id}":{"get":{"description":"One meeting with its state and where its summary and transcript are in the brain (read them with `file`).\n\nScope: `read`.","operationId":"getMeeting","parameters":[{"name":"org","required":true,"in":"path","description":"Slug of the organization (from the brain’s address)","schema":{"type":"string"}},{"name":"brain","required":true,"in":"path","description":"Slug of the brain the token was made for","schema":{"type":"string"}},{"name":"id","required":true,"in":"path","description":"Id of the meeting","schema":{"type":"string","format":"uuid"}},{"name":"Accept-Language","in":"header","description":"cs (default) or en: the language of `error.message` and of `message`","required":false,"schema":{"type":"string","example":"en"}}],"responses":{"200":{"description":"The meeting","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeetingDto"}}}},"401":{"description":"Token missing or not valid. `UNAUTHORIZED`: no token, or the token was revoked, expired or does not exist.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED"],"example":"UNAUTHORIZED"},"message":{"type":"string","description":"For people: Czech by default, English with `Accept-Language: en`"}}}}}}}},"403":{"description":"Not allowed. `FORBIDDEN`: the route is not open to integration tokens, the token lacks the scope, or the member’s role may not do this.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["FORBIDDEN"],"example":"FORBIDDEN"},"message":{"type":"string","description":"For people: Czech by default, English with `Accept-Language: en`"}}}}}}}},"404":{"description":"Not found. `BRAIN_NOT_FOUND`: the brain is not the token’s brain, is archived, or the member no longer has access to it (the same answer as for a stranger); `NOT_FOUND`: meetings are not enabled on this server; `MEETING_NOT_FOUND`: the meeting does not exist, or the member does not see it.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["BRAIN_NOT_FOUND","NOT_FOUND","MEETING_NOT_FOUND"],"example":"BRAIN_NOT_FOUND"},"message":{"type":"string","description":"For people: Czech by default, English with `Accept-Language: en`"}}}}}}}},"429":{"description":"Rate limit. `RATE_LIMITED`: too many requests: see `Retry-After`.","headers":{"Retry-After":{"description":"Seconds until the limit lets the token in again","schema":{"type":"integer","example":42}}},"content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["RATE_LIMITED"],"example":"RATE_LIMITED"},"message":{"type":"string","description":"For people: Czech by default, English with `Accept-Language: en`"}}}}}}}}},"security":[{"integrationToken":[]}],"summary":"Get a meeting","tags":["Integrations"],"x-integration-scope":"read"}},"/v1/brains/{org}/{brain}/search":{"get":{"description":"Files whose name or text contains `q` (case-insensitive), as the role sees them: name matches first, then up to two lines per file. Folders starting with a dot are left out of name matches.\n\nScope: `read`.","operationId":"searchBrain","parameters":[{"name":"org","required":true,"in":"path","description":"Slug of the organization (from the brain’s address)","schema":{"type":"string"}},{"name":"brain","required":true,"in":"path","description":"Slug of the brain the token was made for","schema":{"type":"string"}},{"name":"q","required":true,"in":"query","description":"Part of a file name or of its text, case-insensitive","schema":{"minLength":2,"maxLength":100,"example":"onboarding","type":"string"}},{"name":"Accept-Language","in":"header","description":"cs (default) or en: the language of `error.message` and of `message`","required":false,"schema":{"type":"string","example":"en"}}],"responses":{"200":{"description":"The matches","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResultDto"}}}},"400":{"description":"Bad request. `BAD_REQUEST`: a query parameter or a body field is missing or invalid (the message names the field).","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["BAD_REQUEST"],"example":"BAD_REQUEST"},"message":{"type":"string","description":"For people: Czech by default, English with `Accept-Language: en`"}}}}}}}},"401":{"description":"Token missing or not valid. `UNAUTHORIZED`: no token, or the token was revoked, expired or does not exist.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED"],"example":"UNAUTHORIZED"},"message":{"type":"string","description":"For people: Czech by default, English with `Accept-Language: en`"}}}}}}}},"403":{"description":"Not allowed. `FORBIDDEN`: the route is not open to integration tokens, the token lacks the scope, or the member’s role may not do this.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["FORBIDDEN"],"example":"FORBIDDEN"},"message":{"type":"string","description":"For people: Czech by default, English with `Accept-Language: en`"}}}}}}}},"404":{"description":"Not found. `BRAIN_NOT_FOUND`: the brain is not the token’s brain, is archived, or the member no longer has access to it (the same answer as for a stranger).","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["BRAIN_NOT_FOUND"],"example":"BRAIN_NOT_FOUND"},"message":{"type":"string","description":"For people: Czech by default, English with `Accept-Language: en`"}}}}}}}},"429":{"description":"Rate limit. `RATE_LIMITED`: too many requests: see `Retry-After`.","headers":{"Retry-After":{"description":"Seconds until the limit lets the token in again","schema":{"type":"integer","example":42}}},"content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["RATE_LIMITED"],"example":"RATE_LIMITED"},"message":{"type":"string","description":"For people: Czech by default, English with `Accept-Language: en`"}}}}}}}}},"security":[{"integrationToken":[]}],"summary":"Search the brain","tags":["Integrations"],"x-integration-scope":"read"}},"/v1/brains/{org}/{brain}/proposals":{"post":{"description":"One proposal of up to 50 files (changes, new files, deletes) that waits for approval in onlybrain, whatever the role may write. A change and a delete need `base` from `GET file`; a new file `new: true`. Every file is checked the way the role allows: one refused file and nothing is saved. Counts into the hourly limit of proposals.\n\nScope: `propose`.","operationId":"proposeChanges","parameters":[{"name":"org","required":true,"in":"path","description":"Slug of the organization (from the brain’s address)","schema":{"type":"string"}},{"name":"brain","required":true,"in":"path","description":"Slug of the brain the token was made for","schema":{"type":"string"}},{"name":"Accept-Language","in":"header","description":"cs (default) or en: the language of `error.message` and of `message`","required":false,"schema":{"type":"string","example":"en"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProposeChangesDto"}}}},"responses":{"201":{"description":"Saved for approval (`review`), or nothing changed (`review: null`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProposalResultDto"}}}},"400":{"description":"Bad request. `BAD_REQUEST`: a query parameter or a body field is missing or invalid (the message names the field); `PROPOSAL_REFUSED`: a check of the proposal failed (a file the role may not change, a stale `base`, a file that exists already, ...): nothing was saved, the message names every file; `SECRET_FOUND`: the content contains something that looks like a password or a key: nothing was saved.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["BAD_REQUEST","PROPOSAL_REFUSED","SECRET_FOUND"],"example":"BAD_REQUEST"},"message":{"type":"string","description":"For people: Czech by default, English with `Accept-Language: en`"}}}}}}}},"401":{"description":"Token missing or not valid. `UNAUTHORIZED`: no token, or the token was revoked, expired or does not exist.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED"],"example":"UNAUTHORIZED"},"message":{"type":"string","description":"For people: Czech by default, English with `Accept-Language: en`"}}}}}}}},"403":{"description":"Not allowed. `FORBIDDEN`: the route is not open to integration tokens, the token lacks the scope, or the member’s role may not do this.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["FORBIDDEN"],"example":"FORBIDDEN"},"message":{"type":"string","description":"For people: Czech by default, English with `Accept-Language: en`"}}}}}}}},"404":{"description":"Not found. `BRAIN_NOT_FOUND`: the brain is not the token’s brain, is archived, or the member no longer has access to it (the same answer as for a stranger).","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["BRAIN_NOT_FOUND"],"example":"BRAIN_NOT_FOUND"},"message":{"type":"string","description":"For people: Czech by default, English with `Accept-Language: en`"}}}}}}}},"409":{"description":"Conflict. `BRAIN_ARCHIVED`: the brain is archived and takes no proposals.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["BRAIN_ARCHIVED"],"example":"BRAIN_ARCHIVED"},"message":{"type":"string","description":"For people: Czech by default, English with `Accept-Language: en`"}}}}}}}},"413":{"description":"Body too large. `REQUEST_TOO_LARGE`: the JSON body is larger than 2 MB.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["REQUEST_TOO_LARGE"],"example":"REQUEST_TOO_LARGE"},"message":{"type":"string","description":"For people: Czech by default, English with `Accept-Language: en`"}}}}}}}},"429":{"description":"Rate limit. `RATE_LIMITED`: too many requests: see `Retry-After`.","headers":{"Retry-After":{"description":"Seconds until the limit lets the token in again","schema":{"type":"integer","example":42}}},"content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["RATE_LIMITED"],"example":"RATE_LIMITED"},"message":{"type":"string","description":"For people: Czech by default, English with `Accept-Language: en`"}}}}}}}}},"security":[{"integrationToken":[]}],"summary":"Propose changes","tags":["Integrations"],"x-integration-scope":"propose"}},"/v1/brains/{org}/{brain}/notes":{"post":{"description":"A new Markdown note (a title and the text) as a proposal for approval, in `folder` or the brain’s inbox. It never overwrites a file: it takes a free name. Counts into the hourly limit of proposals.\n\nScope: `propose`.","operationId":"addNote","parameters":[{"name":"org","required":true,"in":"path","description":"Slug of the organization (from the brain’s address)","schema":{"type":"string"}},{"name":"brain","required":true,"in":"path","description":"Slug of the brain the token was made for","schema":{"type":"string"}},{"name":"Accept-Language","in":"header","description":"cs (default) or en: the language of `error.message` and of `message`","required":false,"schema":{"type":"string","example":"en"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteDto"}}}},"responses":{"201":{"description":"Saved for approval","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteResultDto"}}}},"400":{"description":"Bad request. `BAD_REQUEST`: a query parameter or a body field is missing or invalid (the message names the field); `PROPOSAL_REFUSED`: a check of the proposal failed (a file the role may not change, a stale `base`, a file that exists already, ...): nothing was saved, the message names every file; `SECRET_FOUND`: the content contains something that looks like a password or a key: nothing was saved.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["BAD_REQUEST","PROPOSAL_REFUSED","SECRET_FOUND"],"example":"BAD_REQUEST"},"message":{"type":"string","description":"For people: Czech by default, English with `Accept-Language: en`"}}}}}}}},"401":{"description":"Token missing or not valid. `UNAUTHORIZED`: no token, or the token was revoked, expired or does not exist.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED"],"example":"UNAUTHORIZED"},"message":{"type":"string","description":"For people: Czech by default, English with `Accept-Language: en`"}}}}}}}},"403":{"description":"Not allowed. `FORBIDDEN`: the route is not open to integration tokens, the token lacks the scope, or the member’s role may not do this.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["FORBIDDEN"],"example":"FORBIDDEN"},"message":{"type":"string","description":"For people: Czech by default, English with `Accept-Language: en`"}}}}}}}},"404":{"description":"Not found. `BRAIN_NOT_FOUND`: the brain is not the token’s brain, is archived, or the member no longer has access to it (the same answer as for a stranger).","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["BRAIN_NOT_FOUND"],"example":"BRAIN_NOT_FOUND"},"message":{"type":"string","description":"For people: Czech by default, English with `Accept-Language: en`"}}}}}}}},"409":{"description":"Conflict. `BRAIN_ARCHIVED`: the brain is archived and takes no proposals.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["BRAIN_ARCHIVED"],"example":"BRAIN_ARCHIVED"},"message":{"type":"string","description":"For people: Czech by default, English with `Accept-Language: en`"}}}}}}}},"413":{"description":"Body too large. `REQUEST_TOO_LARGE`: the JSON body is larger than 2 MB.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["REQUEST_TOO_LARGE"],"example":"REQUEST_TOO_LARGE"},"message":{"type":"string","description":"For people: Czech by default, English with `Accept-Language: en`"}}}}}}}},"429":{"description":"Rate limit. `RATE_LIMITED`: too many requests: see `Retry-After`.","headers":{"Retry-After":{"description":"Seconds until the limit lets the token in again","schema":{"type":"integer","example":42}}},"content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["RATE_LIMITED"],"example":"RATE_LIMITED"},"message":{"type":"string","description":"For people: Czech by default, English with `Accept-Language: en`"}}}}}}}}},"security":[{"integrationToken":[]}],"summary":"Add a note","tags":["Integrations"],"x-integration-scope":"propose"}}},"components":{"securitySchemes":{"integrationToken":{"type":"http","scheme":"bearer","bearerFormat":"obi_…","description":"Integration token of one brain. Scopes: `read` (read the files, history, search and meetings of the brain, as the member’s role sees them); `propose` (propose changes and notes; they always wait for approval in onlybrain)."}},"schemas":{"ActivityDto":{"type":"object","properties":{"range":{"$ref":"#/components/schemas/ActivityRangeDto"},"files":{"description":"Files the role sees now that changed in the range","type":"array","items":{"$ref":"#/components/schemas/FileActivityDto"}},"removed":{"description":"Files changed in the range that are no longer in the brain","type":"array","items":{"$ref":"#/components/schemas/RemovedActivityDto"}},"days":{"type":"array","items":{"$ref":"#/components/schemas/DayActivityDto"}},"commits":{"type":"number","example":9,"description":"Commits in the range with a change the role sees"},"truncated":{"type":"boolean","description":"Older history was not read; `historyFrom` is where it starts"},"historyFrom":{"type":"string","nullable":true}},"required":["range","files","removed","days","commits","truncated","historyFrom"]},"ActivityRangeDto":{"type":"object","properties":{"start":{"type":"string","nullable":true,"example":"2026-10-02T22:00:00.000Z","description":"Inclusive (UTC); null = from the beginning"},"end":{"type":"string","nullable":true,"example":"2026-10-05T22:00:00.000Z","description":"Exclusive (UTC); null = now"},"tz":{"type":"string","example":"Europe/Prague"}},"required":["start","end","tz"]},"AuthorCountDto":{"type":"object","properties":{"name":{"type":"string","example":"Jana Nováková","description":"As onlybrain knows the person; `Člen brainu` when the commit also changed files the role does not see"},"changes":{"type":"number","example":3,"description":"Commits"}},"required":["name","changes"]},"BrainChangedDataDto":{"type":"object","properties":{"branch":{"type":"string","example":"main"},"before":{"type":"string","nullable":true,"description":"Commit before the move; null when not known"},"after":{"type":"string","example":"9fceb02d0ae598e95dc970b74767f19372d61af8"},"commits":{"description":"At most 20","type":"array","items":{"$ref":"#/components/schemas/ChangedCommitDto"}},"commitCount":{"type":"number","example":1},"commitsTruncated":{"type":"boolean"},"paths":{"example":["klienti/acme.md"],"description":"Changed files, sorted, at most 100","type":"array","items":{"type":"string"}},"pathCount":{"type":"number","example":1},"pathsTruncated":{"type":"boolean"}},"required":["branch","before","after","commits","commitCount","commitsTruncated","paths","pathCount","pathsTruncated"]},"BrainChangedEventDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Id of the event: the same on every retry and on a resend, use it to drop duplicates"},"createdAt":{"type":"string","format":"date-time"},"brain":{"$ref":"#/components/schemas/WebhookBrainDto"},"event":{"type":"string","enum":["brain.changed"]},"data":{"$ref":"#/components/schemas/BrainChangedDataDto"}},"required":["id","createdAt","brain","event","data"]},"ChangedCommitDto":{"type":"object","properties":{"sha":{"type":"string","example":"9fceb02d0ae598e95dc970b74767f19372d61af8"},"author":{"$ref":"#/components/schemas/WebhookPersonDto"},"date":{"type":"string","example":"2026-10-21T10:15:00+02:00"},"source":{"type":"string","example":"web","description":"Where it came from: desktop, web, approval, revert, onlybrain or git"}},"required":["sha","author","date","source"]},"DayActivityDto":{"type":"object","properties":{"date":{"type":"string","example":"2026-10-03","description":"Day in `tz`"},"commits":{"type":"number","example":4,"description":"Commits with a change the role sees"},"files":{"type":"number","example":6,"description":"Distinct files changed"}},"required":["date","commits","files"]},"FileActivityDto":{"type":"object","properties":{"path":{"type":"string","example":"klienti/acme.md"},"created":{"type":"boolean","description":"Added in the range (also when deleted and added again)"},"modified":{"type":"boolean","description":"Changed in the range by a commit that did not add or delete it"},"deleted":{"type":"boolean","description":"Deleted in the range (it may exist again)"},"changes":{"type":"number","example":2,"description":"Commits in the range that changed the file"},"authors":{"type":"array","items":{"$ref":"#/components/schemas/AuthorCountDto"}},"firstChange":{"type":"string","example":"2026-10-03T09:12:00+02:00"},"lastChange":{"type":"string","example":"2026-10-04T16:40:00+02:00"}},"required":["path","created","modified","deleted","changes","authors","firstChange","lastChange"]},"FileDto":{"type":"object","properties":{"path":{"type":"string","example":"klienti/acme.md"},"sha":{"type":"string","example":"3b18e512dba79e4c8300dd08aeb37f8e728b8dad","description":"Git blob id; its first 12 characters are the `base` of a proposed change"},"size":{"type":"number","example":1834,"description":"Bytes"},"access":{"type":"string","enum":["read","write"],"description":"Whether the member’s role may change the file"},"content":{"type":"string","nullable":true,"description":"The text; null for a binary file (see `file/raw`) or one too large to show"},"binary":{"type":"boolean"},"tooLarge":{"type":"boolean","description":"Larger than 1 MB: no `content`"}},"required":["path","sha","size","access","content","binary","tooLarge"]},"FileMetaDto":{"type":"object","properties":{"path":{"type":"string","example":"klienti/acme.md"},"created":{"type":"string","nullable":true,"example":"2026-09-01T10:15:00+02:00","description":"First commit with the file (ISO 8601); null when older than the history read"},"modified":{"type":"string","nullable":true,"example":"2026-10-20T08:00:00+02:00","description":"Last commit that changed the file"},"authors":{"description":"Most changes first","type":"array","items":{"$ref":"#/components/schemas/AuthorCountDto"}}},"required":["path","created","modified","authors"]},"FilesMetaDto":{"type":"object","properties":{"files":{"description":"Every file the role sees, sorted by path","type":"array","items":{"$ref":"#/components/schemas/FileMetaDto"}}},"required":["files"]},"HistoryEntryDto":{"type":"object","properties":{"sha":{"type":"string","nullable":true,"example":"9fceb02d0ae598e95dc970b74767f19372d61af8","description":"Commit id; null for a role that does not see the whole brain"},"author":{"type":"string","example":"Jana Nováková","description":"`Člen brainu` when the commit also changed files the role does not see"},"date":{"type":"string","example":"2026-10-20T08:00:00+02:00","description":"ISO 8601; only the day (YYYY-MM-DD) when the author is hidden"},"message":{"type":"string","example":"Doplněn kontakt","description":"`Změna v brainu` for roles whose history is anonymized"},"files":{"example":["klienti/acme.md"],"description":"Changed files the role sees","type":"array","items":{"type":"string"}},"cursor":{"type":"string","example":"q1tJmF0aE2v9cQ…","description":"Pass as `cursor` for the commits after this one"}},"required":["sha","author","date","message","files","cursor"]},"MeetingAuthorDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","example":"Jana Nováková"}},"required":["id","name"]},"MeetingCanDto":{"type":"object","properties":{"summarize":{"type":"boolean"},"speakers":{"type":"boolean"},"delete":{"type":"boolean"},"retry":{"type":"boolean"},"share":{"type":"boolean","description":"May decide who sees the meeting (its author and the managers)"},"record":{"type":"boolean","description":"May send parts of the recording (its author while recording)"}},"required":["summarize","speakers","delete","retry","share","record"]},"MeetingDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","nullable":true,"example":"ACME demo"},"status":{"type":"string","enum":["recording","uploading","queued","transcribing","summarizing","ready","failed"]},"source":{"type":"string","enum":["web-mic","web-tab","file"]},"language":{"type":"string","enum":["cs","en","auto"]},"durationSec":{"type":"number","nullable":true,"example":1820},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"author":{"$ref":"#/components/schemas/MeetingAuthorDto"},"consentAt":{"type":"string","format":"date-time","description":"When the recording person confirmed the participants were told"},"participants":{"example":["Jana Nováková","Petr Svoboda"],"type":"array","items":{"type":"string"}},"speakers":{"type":"array","items":{"$ref":"#/components/schemas/MeetingSpeakerDto"}},"summaryPath":{"type":"string","example":"schuzky/2026-10-20-acme-demo.md","description":"The summary in the brain, when the role sees it"},"transcriptPath":{"type":"string","example":"schuzky/2026-10-20-acme-demo-prepis.md","description":"The transcript in the brain, when the role sees it"},"proposalId":{"type":"string","description":"The proposal with the meeting’s files, when they wait for approval"},"error":{"description":"Why it failed; on a queued meeting why it waits (TRANSCRIPTION_WAITING, a retry after TRANSCRIPTION_FAILED)","allOf":[{"$ref":"#/components/schemas/MeetingErrorDto"}]},"retryable":{"type":"boolean","description":"A failed meeting can be processed again"},"queue":{"description":"While queued, transcribing or summarizing: its place in the queue and an estimate","allOf":[{"$ref":"#/components/schemas/MeetingQueueDto"}]},"audience":{"type":"string","enum":["brain","private"],"description":"brain = everyone whose role sees the meetings of the brain; private = its author, the managers and whoever it is shared with"},"sharedWith":{"description":"People it is shared with besides","type":"array","items":{"$ref":"#/components/schemas/MeetingPersonDto"}},"sharedRoles":{"description":"Roles it is shared with besides","type":"array","items":{"$ref":"#/components/schemas/MeetingRoleRefDto"}},"parts":{"$ref":"#/components/schemas/MeetingPartsDto"},"can":{"description":"What the caller may do with it","allOf":[{"$ref":"#/components/schemas/MeetingCanDto"}]}},"required":["id","title","status","source","language","durationSec","createdAt","updatedAt","author","consentAt","participants","speakers","retryable","audience","sharedWith","sharedRoles","parts","can"]},"MeetingErrorDto":{"type":"object","properties":{"code":{"type":"string","example":"TRANSCRIPTION_FAILED"},"message":{"type":"string"}},"required":["code","message"]},"MeetingListDto":{"type":"object","properties":{"meetings":{"description":"Newest first, at most 200; others than the member’s own only when ready and the role may see them (its meetings permissions and who the meeting is shared with)","type":"array","items":{"$ref":"#/components/schemas/MeetingDto"}}},"required":["meetings"]},"MeetingPartsDto":{"type":"object","properties":{"summary":{"type":"boolean","description":"The summary can be read (GET …/meetings/:id/files/summary)"},"transcript":{"type":"boolean","description":"The transcript can be read: the role reads transcripts, not only summaries"}},"required":["summary","transcript"]},"MeetingPathsDto":{"type":"object","properties":{"summary":{"type":"string","example":"schuzky/2026-10-20-acme-demo.md"},"transcript":{"type":"string","example":"schuzky/2026-10-20-acme-demo-prepis.md"}},"required":["summary","transcript"]},"MeetingPersonDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","nullable":true,"example":"Jana Nováková"}},"required":["id","name"]},"MeetingQueueDto":{"type":"object","properties":{"position":{"type":"number","example":1,"description":"Meetings of the server before it; 0 = being worked on or next"},"readyInSec":{"type":"number","example":1500,"description":"Seconds until it is likely done (an estimate)"}},"required":["position","readyInSec"]},"MeetingReadyDataDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","example":"ACME demo"},"url":{"type":"string","example":"https://app.example.com/acme/firma/meetings/0b8e6f4e-1c5d-4a53-9a39-8f6c2f1d7e10"},"author":{"$ref":"#/components/schemas/WebhookPersonDto"},"durationSec":{"type":"number","nullable":true,"example":1820},"recordedAt":{"type":"string","format":"date-time"},"paths":{"$ref":"#/components/schemas/MeetingPathsDto"},"proposal":{"type":"string","nullable":true,"description":"The proposal with the files, when the author’s role only proposes into the folder"}},"required":["id","title","url","author","durationSec","recordedAt","paths","proposal"]},"MeetingReadyEventDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Id of the event: the same on every retry and on a resend, use it to drop duplicates"},"createdAt":{"type":"string","format":"date-time"},"brain":{"$ref":"#/components/schemas/WebhookBrainDto"},"event":{"type":"string","enum":["meeting.ready"]},"data":{"$ref":"#/components/schemas/MeetingReadyDataDto"}},"required":["id","createdAt","brain","event","data"]},"MeetingRoleRefDto":{"type":"object","properties":{"key":{"type":"string","example":"obchod"},"name":{"type":"string","example":"Obchod"}},"required":["key","name"]},"MeetingSpeakerDto":{"type":"object","properties":{"id":{"type":"string","example":"A"},"name":{"type":"string","example":"Jana Nováková"},"others":{"type":"boolean","description":"Everybody in the browser tab of a two-channel recording (\"Ostatní\"), not one person"}},"required":["id"]},"MemberAddedEventDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Id of the event: the same on every retry and on a resend, use it to drop duplicates"},"createdAt":{"type":"string","format":"date-time"},"brain":{"$ref":"#/components/schemas/WebhookBrainDto"},"event":{"type":"string","enum":["member.added"]},"data":{"$ref":"#/components/schemas/MemberDataDto"}},"required":["id","createdAt","brain","event","data"]},"MemberDataDto":{"type":"object","properties":{"member":{"$ref":"#/components/schemas/WebhookPersonDto"},"role":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/WebhookRoleDto"}]},"by":{"description":"Who added or removed the member (the inviter for an accepted invitation)","allOf":[{"$ref":"#/components/schemas/WebhookPersonDto"}]},"via":{"type":"string","enum":["added","invitation","removed"]}},"required":["member","role","by","via"]},"MemberRemovedEventDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Id of the event: the same on every retry and on a resend, use it to drop duplicates"},"createdAt":{"type":"string","format":"date-time"},"brain":{"$ref":"#/components/schemas/WebhookBrainDto"},"event":{"type":"string","enum":["member.removed"]},"data":{"$ref":"#/components/schemas/MemberDataDto"}},"required":["id","createdAt","brain","event","data"]},"NoteDto":{"type":"object","properties":{"title":{"type":"string","example":"Hovor s ACME","description":"The file name comes from it","minLength":1,"maxLength":200},"content":{"type":"string","example":"Domluveno demo na příští týden.","description":"Markdown","minLength":1,"maxLength":200000},"folder":{"type":"string","example":"klienti/acme","description":"Folder by the rules of the brain; inbox/ without it","maxLength":300}},"required":["title","content"]},"NoteResultDto":{"type":"object","properties":{"review":{"type":"string","example":"20261021101500-1b2c4d","description":"Id of the proposal waiting for approval"},"path":{"type":"string","example":"klienti/acme/hovor-s-acme.md","description":"Where the note goes once approved (a free name, never an existing file)"},"message":{"type":"string","description":"What happened, for people (in the language of `Accept-Language`)"}},"required":["review","path","message"]},"PingDataDto":{"type":"object","properties":{"webhook":{"type":"string","format":"uuid","description":"Id of the webhook"},"events":{"type":"array","example":["brain.changed","proposal.created"],"description":"The events it is subscribed to","items":{"type":"string","enum":["brain.changed","proposal.created","proposal.decided","meeting.ready","member.added","member.removed"]}}},"required":["webhook","events"]},"PingEventDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Id of the event: the same on every retry and on a resend, use it to drop duplicates"},"createdAt":{"type":"string","format":"date-time"},"brain":{"$ref":"#/components/schemas/WebhookBrainDto"},"event":{"type":"string","enum":["ping"]},"data":{"$ref":"#/components/schemas/PingDataDto"}},"required":["id","createdAt","brain","event","data"]},"ProposalCreatedDataDto":{"type":"object","properties":{"id":{"type":"string","example":"20261021101500-0f3a9c"},"url":{"type":"string","example":"https://app.example.com/acme/firma/changes"},"author":{"$ref":"#/components/schemas/WebhookPersonDto"},"role":{"$ref":"#/components/schemas/WebhookRoleDto"},"source":{"type":"string","enum":["push","web","mcp","api"],"description":"push (git, the desktop app), web, mcp (from a chat) or api (an integration token)"},"files":{"type":"number","example":2,"description":"Files in the proposal"},"paths":{"example":["klienti/acme.md","klienti/gama.md"],"description":"Sorted, at most 100","type":"array","items":{"type":"string"}},"pathCount":{"type":"number","example":2},"pathsTruncated":{"type":"boolean"},"createdAt":{"type":"string","example":"2026-10-21T08:15:00.000Z"}},"required":["id","url","author","role","source","files","paths","pathCount","pathsTruncated","createdAt"]},"ProposalCreatedEventDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Id of the event: the same on every retry and on a resend, use it to drop duplicates"},"createdAt":{"type":"string","format":"date-time"},"brain":{"$ref":"#/components/schemas/WebhookBrainDto"},"event":{"type":"string","enum":["proposal.created"]},"data":{"$ref":"#/components/schemas/ProposalCreatedDataDto"}},"required":["id","createdAt","brain","event","data"]},"ProposalDecidedDataDto":{"type":"object","properties":{"id":{"type":"string","example":"20261021101500-0f3a9c"},"url":{"type":"string","example":"https://app.example.com/acme/firma/changes"},"decision":{"type":"string","enum":["approved","partly","rejected"]},"author":{"$ref":"#/components/schemas/WebhookPersonDto"},"role":{"$ref":"#/components/schemas/WebhookRoleDto"},"decidedBy":{"$ref":"#/components/schemas/WebhookPersonDto"},"files":{"type":"number","example":1,"description":"Files brought into the brain (0 when rejected)"},"of":{"type":"number","example":2,"description":"Files in the proposal"},"paths":{"example":["klienti/acme.md"],"description":"The approved files, sorted, at most 100","type":"array","items":{"type":"string"}},"pathCount":{"type":"number","example":1},"pathsTruncated":{"type":"boolean"},"commit":{"type":"string","nullable":true,"description":"The commit that brought them in; null when rejected"}},"required":["id","url","decision","author","role","decidedBy","files","of","paths","pathCount","pathsTruncated","commit"]},"ProposalDecidedEventDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Id of the event: the same on every retry and on a resend, use it to drop duplicates"},"createdAt":{"type":"string","format":"date-time"},"brain":{"$ref":"#/components/schemas/WebhookBrainDto"},"event":{"type":"string","enum":["proposal.decided"]},"data":{"$ref":"#/components/schemas/ProposalDecidedDataDto"}},"required":["id","createdAt","brain","event","data"]},"ProposalResultDto":{"type":"object","properties":{"review":{"type":"string","nullable":true,"example":"20261021101500-0f3a9c","description":"Id of the proposal waiting for approval; null when nothing changed (no proposal saved)"},"changed":{"example":["klienti/acme.md"],"type":"array","items":{"type":"string"}},"created":{"example":["klienti/gama.md"],"type":"array","items":{"type":"string"}},"deleted":{"example":[],"type":"array","items":{"type":"string"}},"unchanged":{"example":[],"description":"Sent with the content the brain already has: left out","type":"array","items":{"type":"string"}},"message":{"type":"string","description":"What happened, for people (in the language of `Accept-Language`)"}},"required":["review","changed","created","deleted","unchanged","message"]},"ProposeChangesDto":{"type":"object","properties":{"changes":{"description":"At most 50 files; all of them or nothing","minItems":1,"maxItems":50,"type":"array","items":{"$ref":"#/components/schemas/ProposedFileDto"}},"reason":{"type":"string","example":"Nový kontakt z CRM","description":"Why the files change (shown to who approves it)","minLength":1,"maxLength":2000}},"required":["changes","reason"]},"ProposedFileDto":{"type":"object","properties":{"path":{"type":"string","example":"klienti/acme.md","description":"Path as the tree and file routes give it","minLength":1,"maxLength":1000},"content":{"type":"string","example":"# ACME\n\nKontakt: ACME s.r.o.\n","description":"The whole new content (a change and a new file)","maxLength":200000},"base":{"type":"string","example":"3b18e512dba7","description":"The `sha` of the file as read (or its first 12 characters): required for a change and a delete of an existing file","minLength":7,"maxLength":64},"new":{"type":"boolean","description":"true = a new file, not in the brain yet (without base)"},"delete":{"type":"boolean","description":"true = delete an existing file (with base, without content)"}},"required":["path"]},"RemovedActivityDto":{"type":"object","properties":{"path":{"type":"string","example":"klienti/acme.md"},"created":{"type":"boolean","description":"Added in the range (also when deleted and added again)"},"modified":{"type":"boolean","description":"Changed in the range by a commit that did not add or delete it"},"deleted":{"type":"boolean","description":"Deleted in the range (it may exist again)"},"changes":{"type":"number","example":2,"description":"Commits in the range that changed the file"},"authors":{"type":"array","items":{"$ref":"#/components/schemas/AuthorCountDto"}},"firstChange":{"type":"string","example":"2026-10-03T09:12:00+02:00"},"lastChange":{"type":"string","example":"2026-10-04T16:40:00+02:00"},"deletedAt":{"type":"string","nullable":true,"description":"When the file disappeared from the brain (its last delete), possibly after the range"}},"required":["path","created","modified","deleted","changes","authors","firstChange","lastChange","deletedAt"]},"RoleViewDto":{"type":"object","properties":{"key":{"type":"string","example":"obchod","description":"Key of the member’s role"},"name":{"type":"string","example":"Obchod"},"canManage":{"type":"boolean","description":"The role manages the brain"},"review":{"type":"boolean","description":"Changes of the role wait for approval"},"approve":{"type":"boolean","description":"The role approves proposals of others"}},"required":["key","name","canManage","review","approve"]},"SearchMatchDto":{"type":"object","properties":{"path":{"type":"string","example":"klienti/acme.md"},"line":{"type":"number","nullable":true,"example":3,"description":"Line with the query (1-based); null when the name matched"},"text":{"type":"string","nullable":true,"example":"Kontakt: ACME a.s.","description":"The line; null when the name matched"}},"required":["path","line","text"]},"SearchResultDto":{"type":"object","properties":{"query":{"type":"string","example":"acme","description":"The query as searched (trimmed)"},"matches":{"description":"Name matches first, at most 40","type":"array","items":{"$ref":"#/components/schemas/SearchMatchDto"}}},"required":["query","matches"]},"TreeDto":{"type":"object","properties":{"role":{"$ref":"#/components/schemas/RoleViewDto"},"entries":{"description":"Sorted by path; a folder is listed only when it has a visible file","type":"array","items":{"$ref":"#/components/schemas/TreeEntryDto"}}},"required":["role","entries"]},"TreeEntryDto":{"type":"object","properties":{"path":{"type":"string","example":"klienti/acme.md","description":"Path in the role’s view"},"type":{"type":"string","enum":["file","dir"]},"files":{"type":"number","example":12,"description":"Folders only: visible files anywhere below it"}},"required":["path","type"]},"WebhookBrainDto":{"type":"object","properties":{"org":{"type":"string","example":"acme"},"slug":{"type":"string","example":"firma"},"name":{"type":"string","example":"Firma"},"url":{"type":"string","example":"https://app.example.com/acme/firma"}},"required":["org","slug","name","url"]},"WebhookEventDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Id of the event: the same on every retry and on a resend, use it to drop duplicates"},"createdAt":{"type":"string","format":"date-time"},"brain":{"$ref":"#/components/schemas/WebhookBrainDto"},"event":{"type":"string","enum":["brain.changed","proposal.created","proposal.decided","meeting.ready","member.added","member.removed","ping"],"description":"The same as the `X-Onlybrain-Event` header"},"data":{"type":"object","additionalProperties":true,"description":"Depends on `event`, see the schemas of the events"}},"required":["id","createdAt","brain","event","data"]},"WebhookPersonDto":{"type":"object","properties":{"name":{"type":"string","example":"Jana Nováková"},"email":{"type":"string","example":"jana@acme.cz"}},"required":["name","email"]},"WebhookRoleDto":{"type":"object","properties":{"key":{"type":"string","example":"obchod"},"name":{"type":"string","example":"Obchod"}},"required":["key","name"]}},"headers":{"X-Onlybrain-Event":{"description":"The event, as `event` in the body","schema":{"type":"string","example":"brain.changed"}},"X-Onlybrain-Delivery":{"description":"Id of the delivery (uuid); a resend is a new delivery of the same body","schema":{"type":"string","format":"uuid"}},"X-Onlybrain-Timestamp":{"description":"Unix time (seconds) of this attempt","schema":{"type":"string","example":"1792570500"}},"X-Onlybrain-Signature":{"description":"`sha256=` and the hex HMAC-SHA256 of the raw body with the webhook’s secret (`whsec_…`, shown once when the webhook is created). Compare in constant time, over the body exactly as received.","schema":{"type":"string","example":"sha256=5d41402abc4b2a76b9719d911017c592ae0f5e8f3b1f1b1e0e5c8f9a6d4c3b2a"}}}},"x-webhooks":{"brain.changed":{"post":{"summary":"The main branch moved (a push, the web, an approval, onlybrain)","operationId":"webhook.brain.changed","tags":["Webhooks"],"parameters":[{"name":"X-Onlybrain-Event","in":"header","required":true,"description":"The event, as `event` in the body","schema":{"type":"string","example":"brain.changed"}},{"name":"X-Onlybrain-Delivery","in":"header","required":true,"description":"Id of the delivery (uuid); a resend is a new delivery of the same body","schema":{"type":"string","format":"uuid"}},{"name":"X-Onlybrain-Timestamp","in":"header","required":true,"description":"Unix time (seconds) of this attempt","schema":{"type":"string","example":"1792570500"}},{"name":"X-Onlybrain-Signature","in":"header","required":true,"description":"`sha256=` and the hex HMAC-SHA256 of the raw body with the webhook’s secret (`whsec_…`, shown once when the webhook is created). Compare in constant time, over the body exactly as received.","schema":{"type":"string","example":"sha256=5d41402abc4b2a76b9719d911017c592ae0f5e8f3b1f1b1e0e5c8f9a6d4c3b2a"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrainChangedEventDto"}}}},"responses":{"2XX":{"description":"Delivered. Anything else, a redirect or no answer in time is tried again later (a ping only once)."}}}},"proposal.created":{"post":{"summary":"A change waits for approval","operationId":"webhook.proposal.created","tags":["Webhooks"],"parameters":[{"name":"X-Onlybrain-Event","in":"header","required":true,"description":"The event, as `event` in the body","schema":{"type":"string","example":"brain.changed"}},{"name":"X-Onlybrain-Delivery","in":"header","required":true,"description":"Id of the delivery (uuid); a resend is a new delivery of the same body","schema":{"type":"string","format":"uuid"}},{"name":"X-Onlybrain-Timestamp","in":"header","required":true,"description":"Unix time (seconds) of this attempt","schema":{"type":"string","example":"1792570500"}},{"name":"X-Onlybrain-Signature","in":"header","required":true,"description":"`sha256=` and the hex HMAC-SHA256 of the raw body with the webhook’s secret (`whsec_…`, shown once when the webhook is created). Compare in constant time, over the body exactly as received.","schema":{"type":"string","example":"sha256=5d41402abc4b2a76b9719d911017c592ae0f5e8f3b1f1b1e0e5c8f9a6d4c3b2a"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProposalCreatedEventDto"}}}},"responses":{"2XX":{"description":"Delivered. Anything else, a redirect or no answer in time is tried again later (a ping only once)."}}}},"proposal.decided":{"post":{"summary":"A proposal was approved (wholly or partly) or rejected","operationId":"webhook.proposal.decided","tags":["Webhooks"],"parameters":[{"name":"X-Onlybrain-Event","in":"header","required":true,"description":"The event, as `event` in the body","schema":{"type":"string","example":"brain.changed"}},{"name":"X-Onlybrain-Delivery","in":"header","required":true,"description":"Id of the delivery (uuid); a resend is a new delivery of the same body","schema":{"type":"string","format":"uuid"}},{"name":"X-Onlybrain-Timestamp","in":"header","required":true,"description":"Unix time (seconds) of this attempt","schema":{"type":"string","example":"1792570500"}},{"name":"X-Onlybrain-Signature","in":"header","required":true,"description":"`sha256=` and the hex HMAC-SHA256 of the raw body with the webhook’s secret (`whsec_…`, shown once when the webhook is created). Compare in constant time, over the body exactly as received.","schema":{"type":"string","example":"sha256=5d41402abc4b2a76b9719d911017c592ae0f5e8f3b1f1b1e0e5c8f9a6d4c3b2a"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProposalDecidedEventDto"}}}},"responses":{"2XX":{"description":"Delivered. Anything else, a redirect or no answer in time is tried again later (a ping only once)."}}}},"meeting.ready":{"post":{"summary":"A meeting is transcribed and its files are in the brain (or wait for approval)","operationId":"webhook.meeting.ready","tags":["Webhooks"],"parameters":[{"name":"X-Onlybrain-Event","in":"header","required":true,"description":"The event, as `event` in the body","schema":{"type":"string","example":"brain.changed"}},{"name":"X-Onlybrain-Delivery","in":"header","required":true,"description":"Id of the delivery (uuid); a resend is a new delivery of the same body","schema":{"type":"string","format":"uuid"}},{"name":"X-Onlybrain-Timestamp","in":"header","required":true,"description":"Unix time (seconds) of this attempt","schema":{"type":"string","example":"1792570500"}},{"name":"X-Onlybrain-Signature","in":"header","required":true,"description":"`sha256=` and the hex HMAC-SHA256 of the raw body with the webhook’s secret (`whsec_…`, shown once when the webhook is created). Compare in constant time, over the body exactly as received.","schema":{"type":"string","example":"sha256=5d41402abc4b2a76b9719d911017c592ae0f5e8f3b1f1b1e0e5c8f9a6d4c3b2a"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeetingReadyEventDto"}}}},"responses":{"2XX":{"description":"Delivered. Anything else, a redirect or no answer in time is tried again later (a ping only once)."}}}},"member.added":{"post":{"summary":"A member joined the brain (added, or accepted an invitation)","operationId":"webhook.member.added","tags":["Webhooks"],"parameters":[{"name":"X-Onlybrain-Event","in":"header","required":true,"description":"The event, as `event` in the body","schema":{"type":"string","example":"brain.changed"}},{"name":"X-Onlybrain-Delivery","in":"header","required":true,"description":"Id of the delivery (uuid); a resend is a new delivery of the same body","schema":{"type":"string","format":"uuid"}},{"name":"X-Onlybrain-Timestamp","in":"header","required":true,"description":"Unix time (seconds) of this attempt","schema":{"type":"string","example":"1792570500"}},{"name":"X-Onlybrain-Signature","in":"header","required":true,"description":"`sha256=` and the hex HMAC-SHA256 of the raw body with the webhook’s secret (`whsec_…`, shown once when the webhook is created). Compare in constant time, over the body exactly as received.","schema":{"type":"string","example":"sha256=5d41402abc4b2a76b9719d911017c592ae0f5e8f3b1f1b1e0e5c8f9a6d4c3b2a"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberAddedEventDto"}}}},"responses":{"2XX":{"description":"Delivered. Anything else, a redirect or no answer in time is tried again later (a ping only once)."}}}},"member.removed":{"post":{"summary":"A member was removed from the brain","operationId":"webhook.member.removed","tags":["Webhooks"],"parameters":[{"name":"X-Onlybrain-Event","in":"header","required":true,"description":"The event, as `event` in the body","schema":{"type":"string","example":"brain.changed"}},{"name":"X-Onlybrain-Delivery","in":"header","required":true,"description":"Id of the delivery (uuid); a resend is a new delivery of the same body","schema":{"type":"string","format":"uuid"}},{"name":"X-Onlybrain-Timestamp","in":"header","required":true,"description":"Unix time (seconds) of this attempt","schema":{"type":"string","example":"1792570500"}},{"name":"X-Onlybrain-Signature","in":"header","required":true,"description":"`sha256=` and the hex HMAC-SHA256 of the raw body with the webhook’s secret (`whsec_…`, shown once when the webhook is created). Compare in constant time, over the body exactly as received.","schema":{"type":"string","example":"sha256=5d41402abc4b2a76b9719d911017c592ae0f5e8f3b1f1b1e0e5c8f9a6d4c3b2a"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberRemovedEventDto"}}}},"responses":{"2XX":{"description":"Delivered. Anything else, a redirect or no answer in time is tried again later (a ping only once)."}}}},"ping":{"post":{"summary":"The Test button of the webhook (sent once, never retried)","operationId":"webhook.ping","tags":["Webhooks"],"parameters":[{"name":"X-Onlybrain-Event","in":"header","required":true,"description":"The event, as `event` in the body","schema":{"type":"string","example":"brain.changed"}},{"name":"X-Onlybrain-Delivery","in":"header","required":true,"description":"Id of the delivery (uuid); a resend is a new delivery of the same body","schema":{"type":"string","format":"uuid"}},{"name":"X-Onlybrain-Timestamp","in":"header","required":true,"description":"Unix time (seconds) of this attempt","schema":{"type":"string","example":"1792570500"}},{"name":"X-Onlybrain-Signature","in":"header","required":true,"description":"`sha256=` and the hex HMAC-SHA256 of the raw body with the webhook’s secret (`whsec_…`, shown once when the webhook is created). Compare in constant time, over the body exactly as received.","schema":{"type":"string","example":"sha256=5d41402abc4b2a76b9719d911017c592ae0f5e8f3b1f1b1e0e5c8f9a6d4c3b2a"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PingEventDto"}}}},"responses":{"2XX":{"description":"Delivered. Anything else, a redirect or no answer in time is tried again later (a ping only once)."}}}}}}