[{"data":1,"prerenderedAt":216},["ShallowReactive",2],{"/api/overview/versioning":3,"/api/overview/versioning-surround":207},{"id":4,"title":5,"body":6,"description":198,"extension":199,"links":200,"meta":201,"navigation":202,"path":203,"seo":204,"stem":205,"__hash__":206},"docs/api/1.overview/versioning.md","Versioning",{"type":7,"value":8,"toc":193},"minimark",[9,13,26,31,39,74,78,140,166,170,180,189],[10,11,12],"p",{},"The Capacities API is versioned via a request header. This lets you pin your integration to the exact version it was built against and upgrade on your own schedule.",[10,14,15,16,19,20,25],{},"The current API version is ",[17,18],"api-version",{}," — you can also find it at the top of the ",[21,22,24],"a",{"href":23},"/api/reference","Reference"," page.",[27,28,30],"h2",{"id":29},"sending-the-version-header","Sending the version header",[10,32,33,34,38],{},"Include ",[35,36,37],"code",{},"X-Capacities-Api-Version"," in every request:",[40,41,46],"pre",{"className":42,"code":43,"language":44,"meta":45,"style":45},"language-http shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","GET /space/structures HTTP/1.1\nHost: api.capacities.io\nAuthorization: Bearer cap-api-AbCdEfGh...\nX-Capacities-Api-Version: \u003Cversion>\n","http","",[35,47,48,56,62,68],{"__ignoreMap":45},[49,50,53],"span",{"class":51,"line":52},"line",1,[49,54,55],{},"GET /space/structures HTTP/1.1\n",[49,57,59],{"class":51,"line":58},2,[49,60,61],{},"Host: api.capacities.io\n",[49,63,65],{"class":51,"line":64},3,[49,66,67],{},"Authorization: Bearer cap-api-AbCdEfGh...\n",[49,69,71],{"class":51,"line":70},4,[49,72,73],{},"X-Capacities-Api-Version: \u003Cversion>\n",[27,75,77],{"id":76},"rules","Rules",[79,80,81,94],"table",{},[82,83,84],"thead",{},[85,86,87,91],"tr",{},[88,89,90],"th",{},"Situation",[88,92,93],{},"Behavior",[95,96,97,106,114,128],"tbody",{},[85,98,99,103],{},[100,101,102],"td",{},"Header absent",[100,104,105],{},"Defaults to the current latest version",[85,107,108,111],{},[100,109,110],{},"Header present, valid semver",[100,112,113],{},"Request is routed to that version",[85,115,116,119],{},[100,117,118],{},"Header present, not valid semver",[100,120,121,124,125],{},[35,122,123],{},"400"," with ",[35,126,127],{},"cap_invalid_input",[85,129,130,133],{},[100,131,132],{},"Header present, below minimum supported version",[100,134,135,124,137,139],{},[35,136,123],{},[35,138,127],{}," and a message indicating the minimum",[10,141,142,146,147,150,151,157,158,161,162,165],{},[143,144,145],"strong",{},"Version format:"," ",[35,148,149],{},"MAJOR.MINOR.PATCH"," — standard ",[21,152,156],{"href":153,"rel":154},"https://semver.org",[155],"nofollow","semver",". Examples: ",[35,159,160],{},"1.0.0",", ",[35,163,164],{},"1.2.3",".",[27,167,169],{"id":168},"recommendation","Recommendation",[171,172,173],"tip",{},[10,174,175,176,179],{},"Always send the version your integration was built against — ",[143,177,178],{},"not"," the latest. This protects you from breaking changes when you are not ready to upgrade.",[10,181,182,183,188],{},"When we release a new version we will communicate it via our newsletter and in ",[21,184,187],{"href":185,"rel":186},"https://capacities.io/whats-new",[155],"What's new",". You can then review the changelog and opt in by bumping the header value in your integration.",[190,191,192],"style",{},"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);}",{"title":45,"searchDepth":52,"depth":58,"links":194},[195,196,197],{"id":29,"depth":58,"text":30},{"id":76,"depth":58,"text":77},{"id":168,"depth":58,"text":169},"How to target a specific API version using the X-Capacities-Api-Version request header.","md",null,{},true,"/api/overview/versioning",{"title":5,"description":198},"api/1.overview/versioning","Do3YfagLlJhj8r0W6ru7p_NdYY9gAwqvvc4Z9m8piGc",[208,212],{"title":209,"path":210,"stem":211,"children":-1},"SDKs","/api/overview/sdks","api/1.overview/sdks",{"title":213,"path":214,"stem":215,"children":-1},"Blocks","/api/concepts/blocks","api/2.concepts/blocks",1781012285071]