[{"data":1,"prerenderedAt":714},["ShallowReactive",2],{"/api/overview":3,"/api/overview-surround":711},{"id":4,"title":5,"body":6,"description":701,"extension":702,"links":703,"meta":704,"navigation":705,"path":707,"seo":708,"stem":709,"__hash__":710},"docs/api/1.overview/index.md","Overview",{"type":7,"value":8,"toc":690},"minimark",[9,18,28,33,36,47,58,62,66,69,171,175,178,260,264,271,275,314,478,484,530,540,544,567,573,577,587,686],[10,11,12,13,17],"p",{},"The Capacities API is a REST API that gives you programmatic access to a ",[14,15,16],"strong",{},"single workspace space"," per access token. You can read and write objects, properties, block content, daily notes, and more.",[19,20,21],"warning",{},[10,22,23,24,27],{},"The new Capacities API is currently in ",[14,25,26],{},"beta"," and not publicly available yet.",[29,30,32],"h2",{"id":31},"base-url","Base URL",[10,34,35],{},"All requests go to:",[37,38,43],"pre",{"className":39,"code":41,"language":42},[40],"language-text","https://api.capacities.io\n","text",[44,45,41],"code",{"__ignoreMap":46},"",[10,48,49,50,53,54,57],{},"Paths in this documentation are relative to that host (for example ",[44,51,52],{},"GET /space/structures"," means ",[44,55,56],{},"https://api.capacities.io/space/structures",").",[29,59,61],{"id":60},"whats-in-these-docs","What's in these docs",[63,64,5],"h3",{"id":65},"overview",[10,67,68],{},"Fundamentals that apply to every request.",[70,71,72,85],"table",{},[73,74,75],"thead",{},[76,77,78,82],"tr",{},[79,80,81],"th",{},"Page",[79,83,84],{},"What you'll find",[86,87,88,101,116,131,145,156],"tbody",{},[76,89,90,98],{},[91,92,93],"td",{},[94,95,97],"a",{"href":96},"/api/overview/authentication","Authentication",[91,99,100],{},"Bearer tokens, scopes, and space binding",[76,102,103,109],{},[91,104,105],{},[94,106,108],{"href":107},"/api/overview/sdks","SDKs",[91,110,111,112,115],{},"TypeScript client (",[44,113,114],{},"@capacities/api",") — examples in the reference",[76,117,118,124],{},[91,119,120],{},[94,121,123],{"href":122},"/api/overview/versioning","Versioning",[91,125,126,127,130],{},"The ",[44,128,129],{},"X-Capacities-Api-Version"," header",[76,132,133,139],{},[91,134,135],{},[94,136,138],{"href":137},"/api/overview/rate-limiting","Rate Limiting",[91,140,141,142,130],{},"Per-endpoint quotas and the ",[44,143,144],{},"RateLimit",[76,146,147,153],{},[91,148,149],{},[94,150,152],{"href":151},"/api/overview/concurrency","Concurrency",[91,154,155],{},"Last-write-wins semantics and avoiding race conditions",[76,157,158,164],{},[91,159,160],{},[94,161,163],{"href":162},"/api/overview/errors","Errors",[91,165,166,167,170],{},"HTTP status codes and ",[44,168,169],{},"cap_*"," error codes",[63,172,174],{"id":173},"concepts","Concepts",[10,176,177],{},"Background knowledge for working with the API model.",[70,179,180,188],{},[73,181,182],{},[76,183,184,186],{},[79,185,81],{},[79,187,84],{},[86,189,190,205,216,227,238,249],{},[76,191,192,198],{},[91,193,194],{},[94,195,197],{"href":196},"/api/concepts/structures","Structures",[91,199,200,201,204],{},"Object types and ",[44,202,203],{},"structureId"," values",[76,206,207,213],{},[91,208,209],{},[94,210,212],{"href":211},"/api/concepts/properties","Properties",[91,214,215],{},"Typed property payloads on objects",[76,217,218,224],{},[91,219,220],{},[94,221,223],{"href":222},"/api/concepts/objects","Objects",[91,225,226],{},"Object responses, collections, and CRUD patterns",[76,228,229,235],{},[91,230,231],{},[94,232,234],{"href":233},"/api/concepts/blocks","Blocks",[91,236,237],{},"Block trees and append positions",[76,239,240,246],{},[91,241,242],{},[94,243,245],{"href":244},"/api/concepts/text-tokens","Text tokens",[91,247,248],{},"Inline formatting inside text blocks and rich text",[76,250,251,257],{},[91,252,253],{},[94,254,256],{"href":255},"/api/concepts/markdown","Markdown",[91,258,259],{},"Markdown as a compact alternative for body content",[63,261,263],{"id":262},"reference","Reference",[10,265,126,266,270],{},[94,267,269],{"href":268},"/api/reference","API Reference"," is the interactive OpenAPI specification — every endpoint, schema, rate limit, and TypeScript SDK sample. You can use it as a playground to test requests and see responses.",[29,272,274],{"id":273},"quick-start","Quick start",[276,277,278,298,311],"ol",{},[279,280,281,282,285,286,289,290,293,294,297],"li",{},"Generate an access token in the Capacities desktop app under ",[14,283,284],{},"Settings → Capacities API",". Choose a ",[14,287,288],{},"space"," and the scopes you need (",[44,291,292],{},"api:read",", ",[44,295,296],{},"api:write",", or both).",[279,299,300,301,304,305,307,308,310],{},"Optionally install the ",[94,302,303],{"href":107},"TypeScript SDK"," (",[44,306,114],{},"). Per-endpoint examples are in the ",[94,309,269],{"href":268},".",[279,312,313],{},"Make your first requests:",[37,315,319],{"className":316,"code":317,"language":318,"meta":46,"style":46},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { CapacitiesClient } from '@capacities/api'\n\nconst capacities = new CapacitiesClient({\n  apiToken: 'cap-api-…',\n})\n\nconst space = await capacities.space.get()\nconst { structures } = await capacities.space.structures()\n","typescript",[44,320,321,353,360,385,406,415,420,448],{"__ignoreMap":46},[322,323,326,330,334,338,341,344,347,350],"span",{"class":324,"line":325},"line",1,[322,327,329],{"class":328},"s7zQu","import",[322,331,333],{"class":332},"sMK4o"," {",[322,335,337],{"class":336},"sTEyZ"," CapacitiesClient",[322,339,340],{"class":332}," }",[322,342,343],{"class":328}," from",[322,345,346],{"class":332}," '",[322,348,114],{"class":349},"sfazB",[322,351,352],{"class":332},"'\n",[322,354,356],{"class":324,"line":355},2,[322,357,359],{"emptyLinePlaceholder":358},true,"\n",[322,361,363,367,370,373,376,379,382],{"class":324,"line":362},3,[322,364,366],{"class":365},"spNyl","const",[322,368,369],{"class":336}," capacities ",[322,371,372],{"class":332},"=",[322,374,375],{"class":332}," new",[322,377,337],{"class":378},"s2Zo4",[322,380,381],{"class":336},"(",[322,383,384],{"class":332},"{\n",[322,386,388,392,395,397,400,403],{"class":324,"line":387},4,[322,389,391],{"class":390},"swJcz","  apiToken",[322,393,394],{"class":332},":",[322,396,346],{"class":332},[322,398,399],{"class":349},"cap-api-…",[322,401,402],{"class":332},"'",[322,404,405],{"class":332},",\n",[322,407,409,412],{"class":324,"line":408},5,[322,410,411],{"class":332},"}",[322,413,414],{"class":336},")\n",[322,416,418],{"class":324,"line":417},6,[322,419,359],{"emptyLinePlaceholder":358},[322,421,423,425,428,430,433,436,438,440,442,445],{"class":324,"line":422},7,[322,424,366],{"class":365},[322,426,427],{"class":336}," space ",[322,429,372],{"class":332},[322,431,432],{"class":328}," await",[322,434,435],{"class":336}," capacities",[322,437,310],{"class":332},[322,439,288],{"class":336},[322,441,310],{"class":332},[322,443,444],{"class":378},"get",[322,446,447],{"class":336},"()\n",[322,449,451,453,455,458,460,463,465,467,469,471,473,476],{"class":324,"line":450},8,[322,452,366],{"class":365},[322,454,333],{"class":332},[322,456,457],{"class":336}," structures ",[322,459,411],{"class":332},[322,461,462],{"class":332}," =",[322,464,432],{"class":328},[322,466,435],{"class":336},[322,468,310],{"class":332},[322,470,288],{"class":336},[322,472,310],{"class":332},[322,474,475],{"class":378},"structures",[322,477,447],{"class":336},[10,479,480,481,394],{},"Or with ",[44,482,483],{},"curl",[37,485,489],{"className":486,"code":487,"language":488,"meta":46,"style":46},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","curl https://api.capacities.io/space/structures \\\n  -H \"Authorization: Bearer cap-api-…\" \\\n  -H \"X-Capacities-Api-Version: 0.1.0\"\n","bash",[44,490,491,502,518],{"__ignoreMap":46},[322,492,493,496,499],{"class":324,"line":325},[322,494,483],{"class":495},"sBMFI",[322,497,498],{"class":349}," https://api.capacities.io/space/structures",[322,500,501],{"class":336}," \\\n",[322,503,504,507,510,513,516],{"class":324,"line":355},[322,505,506],{"class":349},"  -H",[322,508,509],{"class":332}," \"",[322,511,512],{"class":349},"Authorization: Bearer cap-api-…",[322,514,515],{"class":332},"\"",[322,517,501],{"class":336},[322,519,520,522,524,527],{"class":324,"line":362},[322,521,506],{"class":349},[322,523,509],{"class":332},[322,525,526],{"class":349},"X-Capacities-Api-Version: 0.1.0",[322,528,529],{"class":332},"\"\n",[10,531,532,533,536,537,539],{},"The token is bound to one space — you do not pass ",[44,534,535],{},"spaceId"," on each request. Use ",[44,538,52],{}," to discover structure and property definitions before reading or writing objects.",[29,541,543],{"id":542},"developer-settings-in-the-app","Developer settings in the app",[10,545,546,547,293,549,551,552,555,556,558,559,562,563,566],{},"When you build integrations, you often need stable identifiers such as ",[44,548,535],{},[44,550,203],{},", and ",[44,553,554],{},"propertyId",". In the Capacities desktop app, open ",[14,557,284],{}," and scroll to ",[14,560,561],{},"Developer settings",". Enable ",[14,564,565],{},"Show developer information"," to display these IDs in relevant places throughout the app — for example next to space, structure, and property settings. Click a badge to copy the value to your clipboard.",[568,569,570],"tip",{},[10,571,572],{},"This is a display preference only. It does not enable or restrict API access — tokens and scopes work the same regardless of this setting.",[29,574,576],{"id":575},"working-with-multiple-spaces","Working with multiple spaces",[10,578,579,580,583,584,586],{},"Each token works in ",[14,581,582],{},"one space only",". To use the API in more than one space, create a separate token per space in ",[14,585,284],{}," and use one client per token:",[37,588,590],{"className":316,"code":589,"language":318,"meta":46,"style":46},"import { CapacitiesClient } from '@capacities/api'\n\nconst capacitiesPersonal = new CapacitiesClient({ apiToken: 'cap-api-…' }) // Personal space\nconst capacitiesWork = new CapacitiesClient({ apiToken: 'cap-api-…' }) // Work space\n",[44,591,592,610,614,652],{"__ignoreMap":46},[322,593,594,596,598,600,602,604,606,608],{"class":324,"line":325},[322,595,329],{"class":328},[322,597,333],{"class":332},[322,599,337],{"class":336},[322,601,340],{"class":332},[322,603,343],{"class":328},[322,605,346],{"class":332},[322,607,114],{"class":349},[322,609,352],{"class":332},[322,611,612],{"class":324,"line":355},[322,613,359],{"emptyLinePlaceholder":358},[322,615,616,618,621,623,625,627,629,632,635,637,639,641,643,645,648],{"class":324,"line":362},[322,617,366],{"class":365},[322,619,620],{"class":336}," capacitiesPersonal ",[322,622,372],{"class":332},[322,624,375],{"class":332},[322,626,337],{"class":378},[322,628,381],{"class":336},[322,630,631],{"class":332},"{",[322,633,634],{"class":390}," apiToken",[322,636,394],{"class":332},[322,638,346],{"class":332},[322,640,399],{"class":349},[322,642,402],{"class":332},[322,644,340],{"class":332},[322,646,647],{"class":336},") ",[322,649,651],{"class":650},"sHwdD","// Personal space\n",[322,653,654,656,659,661,663,665,667,669,671,673,675,677,679,681,683],{"class":324,"line":387},[322,655,366],{"class":365},[322,657,658],{"class":336}," capacitiesWork ",[322,660,372],{"class":332},[322,662,375],{"class":332},[322,664,337],{"class":378},[322,666,381],{"class":336},[322,668,631],{"class":332},[322,670,634],{"class":390},[322,672,394],{"class":332},[322,674,346],{"class":332},[322,676,399],{"class":349},[322,678,402],{"class":332},[322,680,340],{"class":332},[322,682,647],{"class":336},[322,684,685],{"class":650},"// Work space\n",[687,688,689],"style",{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}",{"title":46,"searchDepth":325,"depth":355,"links":691},[692,693,698,699,700],{"id":31,"depth":355,"text":32},{"id":60,"depth":355,"text":61,"children":694},[695,696,697],{"id":65,"depth":362,"text":5},{"id":173,"depth":362,"text":174},{"id":262,"depth":362,"text":263},{"id":273,"depth":355,"text":274},{"id":542,"depth":355,"text":543},{"id":575,"depth":355,"text":576},"Everything you need to build on the Capacities API — authentication, versioning, error handling, and the full endpoint reference.","md",null,{},{"icon":706},"i-ph-house-duotone","/api/overview",{"title":5,"description":701},"api/1.overview/index","rtjGstqEjdQudTD7F-dOhN75uCnrayoLjsCns4fo160",[703,712],{"title":97,"path":96,"stem":713,"children":-1},"api/1.overview/authentication",1781012283921]