> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.livingbrain.com/api-reference/workspace/archive/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.livingbrain.com/_mcp/server. # Archive a page POST https://api.livingbrain.com/v1/brains/{brainId}/pages/{slug}/archive Archive a page. Archived pages are hidden from lists and search until restored, but their content, versions, and connections are kept. Use `restore` to bring the page back. Reference: https://docs.livingbrain.com/api-reference/workspace/archive ## Authentication - `x-api-key` header (required) — Your Living Brain API key. Create one from the dashboard; keys are scoped to an organization and carry the role of the member they were issued to. ## Request ### Path parameters - `brainId` (string, required) — Brain id - `slug` (string, required) — Page slug ## Response ### 201 - `id` (string, required) — Page id - `tenantId` (string, required) — Owning tenant id - `subjectId` (string, required) — Owning subject id (host-defined) - `brainId` (string, required) — Owning brain id - `source` (BrainSourceDto, required, nullable) — Opaque provenance - `pageType` (enum, required) — What kind of knowledge this page holds. - Allowed values: `source`, `topic`, `entity`, `project`, `decision`, `brief` - `bucket` (enum, required) — Top-level grouping the page belongs to. - Allowed values: `inbox`, `notes`, `ideas`, `projects` - `bucketSource` (enum, required) — Whether the bucket was set automatically or by the user - Allowed values: `auto`, `user` - `slug` (string, required) — URL-safe identifier, unique per brain - `title` (string, required) — Human-readable title. - `summary` (string, required) — Short generated summary of the content. - `body` (string, required) — Markdown body - `entities` (list of string, required) — Named entities extracted from the body - `sources` (list of BrainPageSourceRefDto, required) — Contributing ingest sources - `backlinks` (list of string, required) — Wikilink slugs referenced by the body - `embedding` (list of double, required) — Vector embedding used for semantic search (internal; can be large) - `version` (integer, required) — Monotonic version, bumped on every compile/edit - `pinned` (boolean, required) — Pinned pages rank first in the prompt index and are exempt from deprecation. - `archived` (boolean, required) — Whether the page has been retired by the user. - `status` (enum, required) — Lifecycle state. Deprecated and archived items are hidden from listings by default. - Allowed values: `active`, `deprecated`, `stale`, `contested`, `archived` - `lastCompiledAt` (datetime, required) — ISO 8601 timestamp of the last time this page was recompiled from its sources. - `lastReferencedAt` (datetime, required, nullable) — ISO 8601 timestamp of the last read. Reading a page bumps this, and it feeds the brain health score. - `createdAt` (datetime, required) — ISO 8601 timestamp of when this record was created. - `updatedAt` (datetime, required) — ISO 8601 timestamp of when this record was last modified. ## Errors ### 400 Bad Request Error Validation failed (e.g. empty title/body, slug already in use) - `statusCode` (integer, required) — HTTP status code - `timestamp` (string, required) — ISO timestamp of the failure - `path` (string, required) — Request path (query string stripped) - `message` (string, required) — Human-readable error message - `body` (ErrorResDtoBody, optional) — Original framework exception response when available, e.g. `{ statusCode, message, error }` with per-field validation messages ### 401 Unauthorized Error Unauthorized - `statusCode` (integer, required) — HTTP status code - `timestamp` (string, required) — ISO timestamp of the failure - `path` (string, required) — Request path (query string stripped) - `message` (string, required) — Human-readable error message - `body` (ErrorResDtoBody, optional) — Original framework exception response when available, e.g. `{ statusCode, message, error }` with per-field validation messages ### 404 Not Found Error Brain, page, change, or connection not found - `statusCode` (integer, required) — HTTP status code - `timestamp` (string, required) — ISO timestamp of the failure - `path` (string, required) — Request path (query string stripped) - `message` (string, required) — Human-readable error message - `body` (ErrorResDtoBody, optional) — Original framework exception response when available, e.g. `{ statusCode, message, error }` with per-field validation messages ## Types ### BrainSourceDto - `channel` (string, required) — Provenance channel - `ref` (string, optional, nullable) — Opaque host reference (e.g. agent id) - `label` (string, optional, nullable) — Human-readable provenance label ### BrainPageSourceRefDto - `ingestSourceId` (string, required) — Contributing ingest source id - `chunkUuids` (list of string, required) — Knowledge chunk uuids backing the source - `attachedAt` (datetime, required) — ISO 8601 timestamp of when this source was attached to the page. ### ErrorResDtoBody Original framework exception response when available, e.g. `{ statusCode, message, error }` with per-field validation messages ## Examples **Response** ```json { "id": "string", "tenantId": "string", "subjectId": "string", "brainId": "string", "source": { "channel": "chat", "ref": "string", "label": "via Sales Agent" }, "pageType": "source", "bucket": "inbox", "bucketSource": "auto", "slug": "string", "title": "string", "summary": "string", "body": "string", "entities": [ "string" ], "sources": [ { "ingestSourceId": "string", "chunkUuids": [ "string" ], "attachedAt": "2024-01-15T09:30:00Z" } ], "backlinks": [ "string" ], "embedding": [ 1.1 ], "version": 1, "pinned": true, "archived": true, "status": "active", "lastCompiledAt": "2024-01-15T09:30:00Z", "lastReferencedAt": "2024-01-15T09:30:00Z", "createdAt": "2024-01-15T09:30:00Z", "updatedAt": "2024-01-15T09:30:00Z" } ``` **SDK Code** ```python import requests url = "https://api.livingbrain.com/v1/brains/brainId/pages/slug/archive" headers = {"x-api-key": ""} response = requests.post(url, headers=headers) print(response.json()) ``` ```javascript const url = 'https://api.livingbrain.com/v1/brains/brainId/pages/slug/archive'; const options = {method: 'POST', headers: {'x-api-key': ''}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.livingbrain.com/v1/brains/brainId/pages/slug/archive" req, _ := http.NewRequest("POST", url, nil) req.Header.Add("x-api-key", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://api.livingbrain.com/v1/brains/brainId/pages/slug/archive") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["x-api-key"] = '' response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.livingbrain.com/v1/brains/brainId/pages/slug/archive") .header("x-api-key", "") .asString(); ``` ```php request('POST', 'https://api.livingbrain.com/v1/brains/brainId/pages/slug/archive', [ 'headers' => [ 'x-api-key' => '', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.livingbrain.com/v1/brains/brainId/pages/slug/archive"); var request = new RestRequest(Method.POST); request.AddHeader("x-api-key", ""); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["x-api-key": ""] let request = NSMutableURLRequest(url: NSURL(string: "https://api.livingbrain.com/v1/brains/brainId/pages/slug/archive")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```