1/*! For license information please see 9255.20b3bbf967e9955a76be.bundle.js.LICENSE.txt */ 2"use strict";(self.webpackChunkStackby_webapp=self.webpackChunkStackby_webapp||[]).push([[9255],{59255:(e,t,n)=>{n.r(t),n.d(t,{default:()=>D});var r=n(379),s=n.n(r),i=n(25052),a=n(98027),o=n(43911),l=n(20054),c=n(71735),d=n(61351),h=n(70510);function u(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",s=n.toStringTag||"@@toStringTag";function i(n,r,s,i){var l=r&&r.prototype instanceof o?r:o,c=Object.create(l.prototype);return p(c,"_invoke",function(n,r,s){var i,o,l,c=0,d=s||[],h=!1,u={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return i=t,o=0,l=e,u.n=n,a}};function p(n,r){for(o=n,l=r,t=0;!h&&c&&!s&&t<d.length;t++){var s,i=d[t],p=u.p,x=i[2];n>3?(s=x===r)&&(l=i[(o=i[4])?5:(o=3,3)],i[4]=i[5]=e):i[0]<=p&&((s=n<2&&p<i[1])?(o=0,u.v=r,u.n=i[1]):p<x&&(s=n<3||i[0]>r||r>x)&&(i[4]=n,i[5]=r,u.n=x,o=0))}if(s||n>1)return a;throw h=!0,r}return function(s,d,x){if(c>1)throw TypeError("Generator is already running");for(h&&1===d&&p(d,x),o=d,l=x;(t=o<2?e:l)||!h;){i||(o?o<3?(o>1&&(u.n=-1),p(o,l)):u.n=l:u.v=l);try{if(c=2,i){if(o||(s="next"),t=i[s]){if(!(t=t.call(i,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,o<2&&(o=0)}else 1===o&&(t=i.return)&&t.call(i),o<2&&(l=TypeError("The iterator does not provide a '"+s+"' method"),o=1);i=e}else if((t=(h=u.n<0)?l:n.call(r,u))!==a)break}catch(t){i=e,o=1,l=t}finally{c=1}}return{value:t,done:h}}}(n,s,i),!0),c}var a={};function o(){}function l(){}function c(){}t=Object.getPrototypeOf;var d=[][r]?t(t([][r]())):(p(t={},r,function(){return this}),t),h=c.prototype=o.prototype=Object.create(d);function x(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,p(e,s,"GeneratorFunction")),e.prototype=Object.create(h),e}return l.prototype=c,p(h,"constructor",c),p(c,"constructor",l),l.displayName="GeneratorFunction",p(c,s,"GeneratorFunction"),p(h),p(h,s,"Generator"),p(h,r,function(){return this}),p(h,"toString",function(){return"[object Generator]"}),(u=function(){return{w:i,m:x}})()}function p(e,t,n,r){var s=Object.defineProperty;try{s({},"",{})}catch(e){s=0}p=function(e,t,n,r){function i(t,n){p(e,t,function(e){return this._invoke(t,n,e)})}t?s?s(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},p(e,t,n,r)}function x(e,t,n,r,s,i,a){try{var o=e[i](a),l=o.value}catch(e){return void n(e)}o.done?t(l):Promise.resolve(l).then(r,s)}function j(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,s,i,a,o=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(o.push(r.value),o.length!==t);l=!0);}catch(e){c=!0,s=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw s}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return m(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var y=function(e){var t=e.children,n=e.language,r=void 0===n?"bash":n,i=j(s().useState(!1),2),a=i[0],o=i[1],l=function(){var e,n=(e=u().m(function e(){return u().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,navigator.clipboard.writeText(t);case 1:o(!0),setTimeout(function(){return o(!1)},2e3);case 2:return e.a(2)}},e)}),function(){var t=this,n=arguments;return new Promise(function(r,s){var i=e.apply(t,n);function a(e){x(i,r,s,a,o,"next",e)}function o(e){x(i,r,s,a,o,"throw",e)}a(void 0)})});return function(){return n.apply(this,arguments)}}();return(0,h.jsxs)("div",{className:"code-block-wrapper",children:[(0,h.jsxs)("button",{className:"copy-btn ".concat(a?"copied":""),onClick:l,children:[a?(0,h.jsx)(d.IoCheckmarkCircleOutline,{}):(0,h.jsx)(d.IoCopyOutline,{}),(0,h.jsx)("span",{className:"custom-tooltip",children:a?"Copied!":"Copy"})]}),(0,h.jsx)("pre",{className:"api-code-block language-".concat(r),children:(0,h.jsx)("code",{children:t})})]})},b=function(e){var t=e.headers,n=e.rows;return(0,h.jsxs)("table",{className:"api-table",children:[(0,h.jsx)("thead",{children:(0,h.jsx)("tr",{children:t.map(function(e,t){return(0,h.jsx)("th",{children:e},t)})})}),(0,h.jsx)("tbody",{children:n.map(function(e,t){return(0,h.jsx)("tr",{children:e.map(function(e,t){return(0,h.jsx)("td",{children:e},t)})},t)})})]})},f=function(e){var t=e.children,n=e.type,r=void 0===n?"warning":n;return(0,h.jsxs)("div",{className:"api-note api-note-".concat(r),children:[(0,h.jsx)("span",{className:"api-note-icon",children:"warning"===r?"â ï¸":"ð¡"}),(0,h.jsx)("div",{className:"api-note-content",children:t})]})},g=[{title:"Web API",description:"Work with records, fields, bases, and more using our powerful APIs.",link:"API docs",image:"https://stackbybucketprod.s3.ap-southeast-1.amazonaws.com/abstract_geometric_2.png"},{title:"Community forum",description:"Share what you're building and get help from other developers.",link:"Community forum",image:"https://stackbybucketprod.s3.ap-southeast-1.amazonaws.com/abstract_geometric_3.png"}],k={reference:[{title:"Getting Started",path:"getting-started"},{title:"Authentication",path:"authentication",isParent:!0,children:[{title:"Personal Access Tokens",path:"personal-access-tokens"},{title:"API Key (Legacy)",path:"api-key-legacy"},{title:"OAuth 2.0 Integration",path:"oauth-20-integration"}]},{title:"Base URL & Versioning",path:"base-url-versioning"},{title:"Request & Response Format",path:"request-response-format"},{title:"Error Codes & Handling",path:"error-codes-handling"},{title:"Rate Limiting",path:"rate-limiting"},{title:"Pagination",path:"pagination"},{title:"Row Operations",path:"row-operations",isParent:!0,children:[{title:"List Row",path:"list-rows"},{title:"Get Row by ID",path:"get-row-by-id"},{title:"Create Row(s)",path:"create-rows"},{title:"Update Row",path:"update-row"},{title:"Delete Row",path:"delete-row"}]},{title:"Fields Operations",path:"fields-operations",isParent:!0,children:[{title:"List Field",path:"list-fields"},{title:"Create Field(s)",path:"create-fields"},{title:"Delete Field",path:"delete-field"}]},{title:"Tables Operations",path:"tables-operations",isParent:!0,children:[{title:"List Table",path:"list-tables"},{title:"Create Table(s)",path:"create-tables"},{title:"Delete Table",path:"delete-table"}]},{title:"View Operations",path:"view-operations",isParent:!0,children:[{title:"List View",path:"list-views"},{title:"List Rows from a View",path:"list-rows-view"}]},{title:"Workspace Operations",path:"workspace-operations",isParent:!0,children:[{title:"Create Worksp
2ace",path:"create-workspace"},{title:"List Workspaces",path:"list-workspaces"},{title:"Workspace Detail",path:"workspace-detail"}]},{title:"Bases (Stacks) Operations",path:"bases-operations",isParent:!0,children:[{title:"List Stack",path:"list-bases"},{title:"Create Stack(s)",path:"create-bases"},{title:"Delete Stack",path:"delete-base"}]},{title:"File Operations",path:"file-operations",isParent:!0,children:[{title:"Upload a File",path:"upload-file"}]},{title:"Field Types Reference",path:"field-types-reference"},{title:"Code Examples",path:"code-examples"},{title:"Changelog & Migration Guide",path:"changelog-migration-guide"},{title:"Quick Reference",path:"quick-reference"},{title:"Resources & Support",path:"resources-support"}],guides:[{title:"Introduction",path:"introduction"},{title:"Personal access tokens",path:"personal-access-tokens-guide"},{title:"OAuth integrations",path:"oauth-integrations-guide"}]},w={"getting-started":(0,h.jsxs)("div",{children:[(0,h.jsx)("p",{children:"To make your first API call, follow these steps:"}),(0,h.jsxs)("ol",{children:[(0,h.jsxs)("li",{children:["Create a Stackby account at ",(0,h.jsx)("a",{href:"https://stackby.com",target:"_blank",rel:"noopener noreferrer",children:"https://stackby.com"})," (free plan available)"]}),(0,h.jsx)("li",{children:"Generate an API credential (see Authentication section)"}),(0,h.jsx)("li",{children:"Identify your Stack ID and Table ID from the Stackby UI (found in the page URL)"}),(0,h.jsx)("li",{children:"Make your first request"})]}),(0,h.jsx)("h3",{children:"Quick Test"}),(0,h.jsx)("p",{children:"Replace the placeholders with your real values and run:"}),(0,h.jsx)(y,{children:'curl -X GET "https://stackby.com/api/v1/rowlist/{STACK_ID}/{TABLE_ID}" \\\n -H "api-key: YOUR_API_KEY" \\\n -H "Content-Type: application/json"'}),(0,h.jsx)("h3",{children:"Finding Your Stack ID and Table ID"}),(0,h.jsx)("p",{children:"Open your Stack in Stackby. The URL follows this pattern:"}),(0,h.jsx)(y,{children:"https://stackby.com/stack/{STACK_ID}/table/{TABLE_ID}"}),(0,h.jsx)("p",{children:"Copy the relevant IDs for use in API calls."})]}),"personal-access-tokens":(0,h.jsxs)("div",{children:[(0,h.jsx)("p",{children:"Personal Access Tokens (PATs) are the recommended authentication method for all new integrations. They are the industry standard for secure programmatic access and can be named, revoked, and rotated independently."}),(0,h.jsx)("h3",{children:"Generating a Personal Access Token"}),(0,h.jsxs)("ol",{children:[(0,h.jsxs)("li",{children:["Log in to your Stackby account at ",(0,h.jsx)("a",{href:"https://stackby.com",children:"https://stackby.com"})]}),(0,h.jsx)("li",{children:"Click your profile icon in the top-right corner"}),(0,h.jsx)("li",{children:"Select Account from the dropdown menu"}),(0,h.jsx)("li",{children:"Navigate to Builder Hub in account settings"}),(0,h.jsx)("li",{children:"Under Personal Access Tokens, click Generate Token"}),(0,h.jsx)("li",{children:"Give your token a descriptive name (e.g., Production Integration, Dev Script)"}),(0,h.jsx)("li",{children:"Copy the token immediately - it will not be shown again"})]}),(0,h.jsx)("h3",{children:"Managing Personal Access Tokens"}),(0,h.jsxs)("ul",{children:[(0,h.jsx)("li",{children:"Generate multiple tokens for different applications or environments"}),(0,h.jsx)("li",{children:"Revoke any token at any time from the Builder Hub settings page"}),(0,h.jsx)("li",{children:"Revoking a token immediately invalidates all API calls using it"}),(0,h.jsx)("li",{children:"Rotate tokens periodically as a security best practice"})]}),(0,h.jsx)("h3",{children:"Using a PAT in API Requests"}),(0,h.jsx)("p",{children:"Pass the token in the api-key header:"}),(0,h.jsx)(y,{children:'curl -X GET "https://stackby.com/api/v1/rowlist/{STACK_ID}/{TABLE_ID}" \\\n -H "api-key: pat_xxxxxxxxxxxxxxxxxxxx" \\\n -H "Content-Type: application/json"'}),(0,h.jsx)("h3",{children:"JavaScript (fetch):"}),(0,h.jsx)(y,{language:"javascript",children:"const response = await fetch(\n `https://stackby.com/api/v1/rowlist/${STACK_ID}/${TABLE_ID}`,\n {\n method: 'GET',\n headers: {\n 'api-key': 'pat_xxxxxxxxxxxxxxxxxxxx',\n 'Content-Type': 'application/json',\n },\n }\n);\nconst data = await response.json();"}),(0,h.jsx)("h3",{children:"Security Best Practices"}),(0,h.jsxs)("ul",{children:[(0,h.jsx)("li",{children:"Store tokens in environment variables - never hardcode them"}),(0,h.jsx)("li",{children:"Use separate tokens per environment (development, staging, production)"}),(0,h.jsx)("li",{children:"Revoke and regenerate tokens immediately if you suspect compromise"})]})]}),"api-key-legacy":(0,h.jsxs)("div",{children:[(0,h.jsx)("p",{children:"The legacy API Key is still supported, but Personal Access Tokens are preferred for all new integrations."}),(0,h.jsx)("h3",{children:"Generating an API Key"}),(0,h.jsxs)("ol",{children:[(0,h.jsx)("li",{children:"Log in to your Stackby account"}),(0,h.jsx)("li",{children:"Click your profile icon â Account"}),(0,h.jsx)("li",{children:"Scroll to the API Key section"}),(0,h.jsx)("li",{children:"Click Create API Key"}
2),(0,h.jsx)("li",{children:"Copy the key displayed"})]}),(0,h.jsx)("h3",{children:"Using an API Key"}),(0,h.jsx)(y,{children:'curl -X GET "https://stackby.com/api/v1/rowlist/{STACK_ID}/{TABLE_ID}" \\\n -H "api-key: YOUR_LEGACY_API_KEY" \\\n -H "Content-Type: application/json"'})]}),"oauth-20-integration":(0,h.jsxs)("div",{children:[(0,h.jsx)("p",{children:"OAuth 2.0 allows your application to act on behalf of a Stackby user without requiring them to share their credentials. This is the appropriate method for building third-party applications that access data belonging to multiple Stackby users."}),(0,h.jsx)("h3",{children:"OAuth Flow Overview (Authorization Code Grant)"}),(0,h.jsx)("p",{children:"The standard four-step OAuth 2.0 Authorization Code flow:"}),(0,h.jsxs)("ol",{children:[(0,h.jsx)("li",{children:"Your app redirects the user to Stackby's authorization endpoint"}),(0,h.jsx)("li",{children:"Stackby redirects back to your app with a temporary code"}),(0,h.jsx)("li",{children:"Your server exchanges the code for an access_token and refresh_token"}),(0,h.jsx)("li",{children:"Your server uses the access_token to call the Stackby API"})]}),(0,h.jsx)("h3",{children:"Step 1 - Register Your Application"}),(0,h.jsx)("p",{children:"Contact Stackby or apply through the Developer Portal to register your OAuth application. You will receive:"}),(0,h.jsxs)("ul",{children:[(0,h.jsxs)("li",{children:[(0,h.jsx)("strong",{children:"client_id"})," - Your application's unique identifier"]}),(0,h.jsxs)("li",{children:[(0,h.jsx)("strong",{children:"client_secret"})," - A secret key (keep this confidential)"]}),(0,h.jsxs)("li",{children:[(0,h.jsx)("strong",{children:"redirect_uri"})," - The URL Stackby redirects to after authorization"]})]}),(0,h.jsx)("h3",{children:"Step 2 - Redirect the User to Authorization"}),(0,h.jsx)(y,{children:"GET https://stackby.com/oauth/authorize\n ?client_id=YOUR_CLIENT_ID\n &redirect_uri=https://yourapp.com/callback\n &response_type=code\n &scope=read:rows write:rows\n &state=RANDOM_STATE_STRING"}),(0,h.jsx)("h3",{children:"Authorization Parameters"}),(0,h.jsx)(b,{headers:["Parameter","Required","Description"],rows:[["client_id","Yes","Your registered application client ID"],["redirect_uri","Yes","Must match the registered redirect URI exactly"],["response_type","Yes","Must be code"],["scope","Yes","Space-separated list of requested permissions"],["state","Recommended","Random string to protect against CSRF attacks"]]}),(0,h.jsx)("h3",{children:"Available Scopes"}),(0,h.jsx)(b,{headers:["Scope","Description"],rows:[["read:rows","Read rows from any accessible table"],["write:rows","Create, update, and delete rows"],["read:views","List and read views"],["read:stacks","List accessible stacks and tables"],["files:upload","Upload file attachments"]]}),(0,h.jsx)("h3",{children:"Step 3 - Exchange Code for Access Token"}),(0,h.jsx)(y,{children:"POST https://stackby.com/oauth/token\nContent-Type: application/x-www-form-urlencoded\n\ngrant_type=authorization_code\n&code=AUTHORIZATION_CODE\n&redirect_uri=https://yourapp.com/callback\n&client_id=YOUR_CLIENT_ID\n&client_secret=YOUR_CLIENT_SECRET"}),(0,h.jsx)("h3",{children:"Response (200 OK)"}),(0,h.jsx)(y,{language:"json",children:'{\n "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",\n "token_type": "Bearer",\n "expires_in": 3600,\n "refresh_token": "dGhpcyBpcyBhIHJlZnJlc2ggdG9rZW4...",\n "scope": "read:rows write:rows"\n}'}),(0,h.jsx)("h3",{children:"Step 4 - Use the Access Token"}),(0,h.jsx)(y,{children:'curl -X GET "https://stackby.com/api/v1/rowlist/{STACK_ID}/{TABLE_ID}" \\\n -H "api-key: ACCESS_TOKEN_HERE" \\\n -H "Content-Type: application/json"'}),(0,h.jsx)("h3",{children:"Step 5 - Refresh an Expired Access Token"}),(0,h.jsx)(y,{children:"POST https://stackby.com/oauth/token\nContent-Type: application/x-www-form-urlencoded\n\ngrant_type=refresh_token\n&refresh_token=YOUR_REFRESH_TOKEN\n&client_id=YOUR_CLIENT_ID\n&client_secret=YOUR_CLIENT_SECRET"}),(0,h.jsx)("h3",{children:"Step 6 - Revoke a Token"}),(0,h.jsx)(y,{children:"POST https://stackby.com/oauth/revoke\nContent-Type: application/x-www-form-urlencoded\n\ntoken=TOKEN_TO_REVOKE\n&client_id=YOUR_CLIENT_ID\n&client_secret=YOUR_CLIENT_SECRET"}),(0,h.jsx)("h3",{children:"OAuth Security Best Practices"}),(0,h.jsxs)("ul",{children:[(0,h.jsx)("li",{children:"Always validate the state parameter to prevent CSRF attacks"}),(0,h.jsx)("li",{children:"Store refresh tokens securely (encrypted at rest)"}),(0,h.jsx)("li",{children:"Request only the scopes your application actually needs"}),(0,h.jsx)("li",{children:"Handle token expiry gracefully with automatic refresh logic"}),(0,h.jsx)("li",{children:"Never expose your client_secret in client-side or mobile code"})]})]}),"base-url-versioning":(0,h.jsxs)("div",{children:[(0,h.jsx)(y,{children:"https://stackby.com/api/v1"}),(0,h.jsx)("p",{children:"All API endpoints are prefixed with this base URL. The current active version is v1."}),(0,h.jsx)(f,{type:"warning",children:"Deprecated Versions (removed June 30, 2025)"}),(0,h.jsx)(b,{headers:["Version","Status","Notes"],rows:[["/api/v1","â
Active","Current recommended version"],["/api/betav1","â Deprecated","Removed June 30, 2025"],["/api/v0","â Deprecated","Removed June 30, 2025"]]})]}),"request-response-format":(0,h.jsxs)("div",{children:[(0,h.jsx)("h3",{children:"Required Headers"}),(0,h.jsx)(b,{headers:["Header","Value","When Required"],rows:[["api-key","Your PAT, API Key, or OAuth token","All requests"],["Content-Type","application/json","POST and PUT requests"]]}),(0,h.jsx)("h3",{children:"Response Envelope"}),(0,h.jsx)("p",{children:"All responses are returned as JSON. Successful responses follow this structure:"}),(0,h.jsx)(y,{language:"json",children:'{\n "data": { ... },\n "status": "ok"\n}'}),(0,h.jsx)("p",{children:"Paginated list responses also include an offset cursor:"}),(0,h.jsx)(y,{language:"json",children:'{\n "data": [ ... ],\n "offset": "NEXT_PAGE_CURSOR",\n "status": "ok"\n}'}),(0,h.jsxs)("p",{children:["Timestamps are returned in ISO 8601 format (e.g., ",(0,h.jsx)("code",{children:"2026-05-18T10:30:00.000Z"}),")."]})]}),"error-codes-handling":(0,h.jsxs)("div",{children:[(0,h.jsx)("h3",{children:"HTTP Status Codes"}),(0,h.jsx)(b,{headers:["Code","Meaning","Description"],rows:[["200","OK","Request succeeded"],["201","Created","Resource successfully created"],["400","Bad Request","Malformed request, missing required fields, or invalid parameters"],["401","Unauthorized","Missing or invalid api-key"],["403","Forbidden","Valid credentials but insufficient permissions for this resource"],["404","Not Found","Stack, table, or row does not exist"],["422","Unprocessable Entity","Request is
2well-formed but contains semantic errors"],["429","Too Many Requests","Rate limit exceeded"],["500","Internal Server Error","Stackby server error - retry with exponential backoff"]]}),(0,h.jsx)("h3",{children:"Error Response Format"}),(0,h.jsx)(y,{language:"json",children:'{\n "error": {\n "code": "ERROR_CODE",\n "message": "Human-readable description of the error"\n }\n}'}),(0,h.jsx)("h3",{children:"Error Codes"}),(0,h.jsx)(b,{headers:["Error Code","Description"],rows:[["AUTHENTICATION_REQUIRED","No api-key header provided"],["INVALID_API_KEY","The api-key is not recognized or has been revoked"],["STACK_NOT_FOUND","The specified stackId does not exist or is inaccessible"],["TABLE_NOT_FOUND","The specified tableId does not exist in this stack"],["ROW_NOT_FOUND","The specified rowId does not exist"],["VIEW_NOT_FOUND","The specified viewId does not exist"],["INVALID_FIELD_VALUE","A field value does not match the expected type"],["MISSING_REQUIRED_FIELD","A required field was not provided in the request body"],["RATE_LIMIT_EXCEEDED","Too many requests in a given time window"]]})]}),"rate-limiting":(0,h.jsxs)("div",{children:[(0,h.jsxs)("p",{children:["Rate limits are applied per API key or access token. The API is limited to ",(0,h.jsx)("strong",{children:"5 requests per second per stack"}),". When exceeded, the API returns ",(0,h.jsx)("code",{children:"429 Too Many Requests"}),"."]}),(0,h.jsx)("h3",{children:"Rate Limit Headers"}),(0,h.jsx)(b,{headers:["Header","Description"],rows:[["X-RateLimit-Limit","Maximum requests allowed per window"],["X-RateLimit-Remaining","Requests remaining in the current window"],["X-RateLimit-Reset","Unix timestamp when the window resets"],["Retry-After","Seconds to wait before retrying (on 429 only)"]]}),(0,h.jsx)("h3",{children:"Retry Pattern (JavaScript)"}),(0,h.jsx)(y,{language:"javascript",children:"async function apiCallWithRetry(url, options, maxRetries = 3) {\n for (let attempt = 0; attempt < maxRetries; attempt++) {\n const response = await fetch(url, options);\n if (response.status !== 429) return response;\n const retryAfter = response.headers.get('Retry-After') || 2 ** attempt;\n await new Promise(r => setTimeout(r, retryAfter * 1000));\n }\n throw new Error('Max retries exceeded');\n}"})]}),pagination:(0,h.jsxs)("div",{children:[(0,h.jsx)("p",{children:"List endpoints return paginated results. By default, a maximum of 100 records are returned per request."}),(0,h.jsx)("h3",{children:"Pagination Query Parameters"}),(0,h.jsx)(b,{headers:["Parameter","Type","Default","Description"],rows:[["maxRecord","integer","100","Max records to return per page (maximum: 100)"],["offset","string","-","Pagination cursor returned by the previous response"]]}),(0,h.jsxs)("p",{children:["When the response includes an ",(0,h.jsx)("code",{children:"offset"})," field, more records exist. Pass it in your next request. When offset is absent, you have reached the last page."]}),(0,h.jsx)("h3",{children:"Fetching All Records (JavaScript)"}),(0,h.jsx)(y,{language:"javascript",children:"async function getAllRows(stackId, tableId, apiKey) {\n const allRows = [];\n let offset = null;
2\n\n do {\n const url = new URL(`https://stackby.com/api/v1/rowlist/${stackId}/${tableId}`);\n url.searchParams.set('maxRecord', '100');\n if (offset) url.searchParams.set('offset', offset);\n\n const res = await fetch(url.toString(), {\n headers: { 'api-key': apiKey, 'Content-Type': 'application/json' }\n });\n const data = await res.json();\n\n allRows.push(...data.data);\n offset = data.offset || null;\n } while (offset);\n\n return allRows;\n}"})]}),"list-rows":(0,h.jsxs)("div",{children:[(0,h.jsx)("p",{children:"Retrieves a list of rows from a specific table. Results can be filtered by view and paginated."}),(0,h.jsx)("h3",{children:"Endpoint"}),(0,h.jsxs)(y,{children:["GET /rowlist/","stackId","/","tableId"]}),(0,h.jsx)("table",{className:"api-endpoint-table",children:(0,h.jsxs)("tbody",{children:[(0,h.jsxs)("tr",{children:[(0,h.jsx)("td",{children:"Endpoint"}),(0,h.jsx)("td",{children:(0,h.jsxs)("code",{children:["GET /rowlist/","{stackId}","/","{tableId}"]})})]}),(0,h.jsxs)("tr",{children:[(0,h.jsx)("td",{children:"Authentication"}),(0,h.jsx)("td",{children:"Required"})]})]})}),(0,h.jsx)("h3",{children:"Path Parameters"}),(0,h.jsx)(b,{headers:["Parameter","Type","Required","Description"],rows:[["stackId","string","Yes","The unique ID of the Stack"],["tableId","string","Yes","The unique ID of the Table within the Stack"]]}),(0,h.jsx)("h3",{children:"Query Parameters"}),(0,h.jsx)(b,{headers:["Parameter","Type","Required","Default","Description"],rows:[["maxRecord","integer","No","100","Number of records to return per page (max: 100)"],["offset","string","No","-","Pagination cursor from a previous response"],["viewId","string","No","-","Filter and sort results using a specific saved View"]]}),(0,h.jsx)("h3",{children:"Request"}),(0,h.jsx)(y,{children:'curl -X GET "https://stackby.com/api/v1/rowlist/stk123abc/tbl456def?maxRecord=50" \\\n -H "api-key: pat_xxxxxxxxxxxxxxxxxxxx" \\\n -H "Content-Type: application/json"'}),(0,h.jsx)("h3",{children:"Response (200 OK)"}),(0,h.jsx)(y,{language:"json",children:'{\n "data": [\n {\n "rowId": "row_abc001",\n "fields": {\n "Name": "Acme Corp",\n "Status": "Active",\n "Revenue": 125000,\n "Created Date": "2026-04-10T00:00:00.000Z"\n },\n "createdTime": "2026-04-10T12:34:56.000Z"\n },\n {\n "rowId": "row_abc002",\n "fields": {\n "Name": "Globex Inc",\n "Status": "Inactive",\n "Revenue": 89000,\n "Created Date": "2026-04-15T00:00:00.000Z"\n },\n "createdTime": "2026-04-15T09:22:11.000Z"\n }\n ],\n "offset": "row_abc050",\n "status": "ok"\n}'})]}),"get-row-by-id":(0,h.jsxs)("div",{children:[(0,h.jsx)("p",{children:"Retrieves a single row by its unique row ID."}),(0,h.jsx)("h3",{children:"Endpoint"}),(0,h.jsxs)(y,{children:["GET /row/","stackId","/","tableId","/","rowId"]}),(0,h.jsx)("table",{className:"api-endpoint-table",children:(0,h.jsxs)("tbody",{children:[(0,h.jsxs)("tr",{children:[(0,h.jsx)("td",{children:"Endpoint"}),(0,h.jsx)("td",{children:(0,h.jsxs)("code",{children:["GET /row/","{stackId}","/","{tableId}","/","{rowId}"]})})]}),(0,h.jsxs)("tr",{children:[(0,h.jsx)("td",{children:"Authentication"}),(0,h.jsx)("td",{children:"Required"})]})]})}),(0,h.jsx)("h3",{children:"Path Parameters"}),(0,h.jsx)(b,{headers:["Parameter","Type","Required","Description"],rows:[["stackId","string","Yes","The unique ID of the Stack"],["tableId","string","Yes","The unique ID of the Table"],["rowId","string","Yes","The unique ID of the Row"]]}),(0,h.jsx)("h3",{children:"Request"}),(0,h.jsx)(y,{children:'curl -X GET "https://stackby.com/api/v1/row/stk123abc/tbl456def/row_abc001" \\\n -H "api-key: pat_xxxxxxxxxxxxxxxxxxxx" \\\n -H "Content-Type: application/json"'}),(0,h.jsx)("h3",{children:"Response (200 OK)"}),(0,h.jsx)(y,{language:"json",children:'{\n "data": {\n "rowId": "row_abc001",\n "fields": {\n "Name": "Acme Corp",\n "Status": "Active",\n "Revenue": 125000,\n "Website": "https://acme.com",\n "Tags": ["Enterprise", "US"],\n "Created Date": "2026-04-10T00:00:00.000Z"\n },\n "createdTime": "2026-04-10T12:34:56.000Z",\n "lastModifiedTime": "2026-05-01T08:11:00.000Z"\n },\n "status": "ok"\n}'})]}),"create-rows":(0,h.jsxs)("div",{children:[(0,h.jsx)("p",{children:"Appends one or more new rows to a table. You can create up to 10 rows in a single request."}),(0,h.jsx)("h3",{children:"Endpoint"}),(0,h.jsxs)(y,{children:["POST /rowcreate/","stackId","/","tableId"]}),(0,h.jsx)("table",{className:"api-endpoint-table",children:(0,h.jsxs)("tbody",{children:[(0,h.jsxs)("tr",{children:[(0,h.jsx)("td",{children:"Endpoint"}),(0,h.jsx)("td",{children:(0,h.jsxs)("code",{children:["POST /rowcreate/","{stackId}","/","{tableId}"]})})]}),(0,h.jsxs)("tr",{children:[(0,h.jsx)("td",{children:"Authentication"}),(0,h.jsx)("td",{children:"Required"})]}),(0,h.jsxs)("tr",{children:[(0,h.jsx)("td",{children:"Content-Type"}),(0,h.jsx)("td",{children:"application/json"})]})]})}),(0,h.jsx)("h3",{children:"Path Parameters"}),(0,h.jsx)(b,{headers:["Parameter","Type","Required","Description"],rows:[["stackId","string","Yes","The unique ID of the Stack"],["tableId","string","Yes","The unique ID of the Table"]]}),(0,h.jsx)("h3",{children:"Request Body"}),(0,h.jsx)(y,{language:"json",children:'{\n "rows": [\n {\n "fields": {\n "COLUMN_NAME_1": "value",\n "COLUMN_NAME_2": 42,\n "COLUMN_NAME_3": ["Tag A", "Tag B"]\n }\n }\n ]\n}'}),(0,h.jsx)("p",{children:"Column names in fields must match exactly (case-sensitive) the column names in your Stackby table. Omitted columns are left empty."}),(0,h.jsx)("h3",{children:"Request"}),(0,h.jsx)(y,{children:'curl -X POST "https://stackby.com/api/v1/rowcreate/stk123abc/tbl456def" \\\n -H "api-key: pat_xxxxxxxxxxxxxxxxxxxx" \\\n -H "Content-Type: application/json" \\\n -d \'{\n "rows": [\n {\n "fields": {\n "Name": "New Company",\n "Status": "Active",\n "Revenue": 50000\n }\n }\n ]\n }\''}
2),(0,h.jsx)("h3",{children:"Response (201 Created)"}),(0,h.jsx)(y,{language:"json",children:'{\n "data": {\n "rows": [\n {\n "rowId": "row_newXYZ",\n "fields": {\n "Name": "New Company",\n "Status": "Active",\n "Revenue": 50000\n },\n "createdTime": "2026-05-18T14:00:00.000Z"\n }\n ]\n },\n "status": "ok"\n}'})]}),"update-row":(0,h.jsxs)("div",{children:[(0,h.jsx)("p",{children:"Updates the fields of an existing row. Only the fields specified in the request body are modified - all other fields are preserved (partial update)."}),(0,h.jsx)("h3",{children:"Endpoint"}),(0,h.jsxs)(y,{children:["PATCH /rowupdate/","stackId","/","tableId","/","rowId"]}),(0,h.jsx)("table",{className:"api-simple-table api-endpoint-table",children:(0,h.jsxs)("tbody",{children:[(0,h.jsxs)("tr",{children:[(0,h.jsx)("td",{children:(0,h.jsx)("strong",{children:"Endpoint"})}),(0,h.jsx)("td",{children:(0,h.jsxs)("code",{children:["PATCH /rowupdate/","{stackId}","/","{tableId}"," "]})})]}),(0,h.jsxs)("tr",{children:[(0,h.jsx)("td",{children:(0,h.jsx)("strong",{children:"Authentication"})}),(0,h.jsx)("td",{children:"Required"})]}),(0,h.jsxs)("tr",{children:[(0,h.jsx)("td",{children:(0,h.jsx)("strong",{children:"Content-Type"})}),(0,h.jsx)("td",{children:"application/json"})]})]})}),(0,h.jsx)("h3",{children:"Path Parameters"}),(0,h.jsx)(b,{headers:["Parameter","Type","Required","Description"],rows:[["stackId","string","Yes","The unique ID of the Stack"],["tableId","string","Yes","The unique ID of the Table"],["rowId","string","Yes","The unique ID of the row to update"]]}),(0,h.jsx)("h3",{children:"Request"}),(0,h.jsx)(y,{children:'curl -X PATCH "https://stackby.com/api/v1/rowupdate/stk123abc/tbl456def/row_abc001" \\\n -H "api-key: pat_xxxxxxxxxxxxxxxxxxxx" \\\n -H "Content-Type: application/json" \\\n -d \'{\n "fields": {\n "Status": "Inactive",\n "Revenue": 130000\n }\n }\''}),(0,h.jsx)("h3",{children:"Response (200 OK)"}),(0,h.jsx)(y,{language:"json",children:'{\n "data": {\n "rowId": "row_abc001",\n "fields": {\n "Name": "Acme Corp",\n "Status": "Inactive",\n "Revenue": 130000\n },\n "lastModifiedTime": "2026-05-18T14:05:00.000Z"\n },\n "status": "ok"\n}'}),(0,h.jsxs)(f,{children:["Note: To clear a field, explicitly pass null:"," ",(0,h.jsx)("code",{children:'{"fields": {"Status": null}}'})]})]}),"delete-row":(0,h.jsxs)("div",{children:[(0,h.jsx)("p",{children:"Permanently deletes a single row. This action cannot be undone."}),(0,h.jsx)("h3",{children:"Endpoint"}),(0,h.jsxs)(y,{children:["DELETE /rowdelete/","stackId","/","tableId","/","rowId"]}),(0,h.jsx)("table",{className:"api-endpoint-table",children:(0,h.jsxs)("tbody",{children:[(0,h.jsxs)("tr",{children:[(0,h.jsx)("td",{children:"Endpoint"}),(0,h.jsx)("td",{children:(0,h.jsxs)("code",{children:["DELETE /rowdelete/","{stackId}","/","{tableId}","/","{rowId}"]})})]}),(0,h.jsxs)("tr",{children:[(0,h.jsx)("td",{children:"Authentication"}),(0,h.jsx)("td",{children:"Required"})]})]})}),(0,h.jsx)("h3",{children:"Path Parameters"}),(0,h.jsx)(b,{headers:["Parameter","Type","Required","Description"],rows:[["stackId","string","Yes","The unique ID of the Stack"],["tableId","string","Yes","The unique ID of the Table"],["rowId","string","Yes","The unique ID of the row to delete"]]}),(0,h.jsx)("h3",{children:"Request"}),(0,h.jsx)(y,{children:'curl -X DELETE "https://stackby.com/api/v1/rowdelete/stk123abc/tbl456def/row_abc001" \\\n -H "api-key: pat_xxxxxxxxxxxxxxxxxxxx"'}),(0,h.jsx)("h3",{children:"Response (200 OK)"}),(0,h.jsx)(y,{language:"json",children:'{\n "data": {\n "rowId": "row_abc001",\n "deleted": true\n },\n "status": "ok"\n}'}),(0,h.jsx)("h3",{children:"Error Response (404 Not Found)"}),(0,h.jsx)(y,{language:"json",children:'{\n "error": {\n "code": "ROW_NOT_FOUND",\n "message": "Row with ID \'row_abc001\' does not exist or has already been deleted."\n }\n}'})]}),"list-fields":(0,h.jsxs)("div",{children:[(0,h.jsx)("p",{children:"Returns all fields for a given table & view."}),(0,h.jsx)("table",{className:"api-endpoint-table",children:(0,h.jsxs)("tbody",{children:[(0,h.jsxs)("tr",{children:[(0,h.jsx)("td",{children:"Endpoint"}),(0,h.jsx)("td",{children:(0,h.jsx)("code",{children:"GET /columnsList/{stackId}/{tableId}"})})]}),(0,h.jsxs)("tr",{children:[(0,h.jsx)("td",{children:"Authentication"}),(0,h.jsx)("td",{children:"Required"})]})]})}),(0,h.jsx)("h3",{children:"Request"}),(0,h.jsx)(y,{children:'curl -X GET "https://stackby.com/api/v1/columnsList/stk123abc/tbl456def" \\\n -H "api-key: pat_xxxxxxxxxxxxxxxxxxxx" \\\n -H "Content-Type: application/json"'}
2),(0,h.jsx)("h3",{children:"Response (200 OK)"}),(0,h.jsx)(y,{language:"json",children:'[\n {\n "columnId": "cl17791019086657282f5",\n "name": "Name",\n "type": "text",\n "typeOptions": null,\n "showType": null\n },\n {\n "columnId": "cl1779101908750d5d45d",\n "name": "Notes",\n "type": "multilineText",\n "typeOptions": null,\n "showType": null\n },\n {\n "columnId": "cl1779101908813747536",\n "name": "Attachments",\n "type": "multipleAttachment",\n "typeOptions": null,\n "showType": null\n }\n]'})]}),"create-fields":(0,h.jsxs)("div",{children:[(0,h.jsx)("h3",{children:"Request"}),(0,h.jsx)("table",{className:"api-endpoint-table",children:(0,h.jsxs)("tbody",{children:[(0,h.jsxs)("tr",{children:[(0,h.jsx)("td",{children:"Endpoint"}),(0,h.jsx)("td",{children:(0,h.jsx)("code",{children:"POST /columnCreate/{type}"})})]}),(0,h.jsxs)("tr",{children:[(0,h.jsx)("td",{children:"Authentication"}),(0,h.jsx)("td",{children:"Required"})]})]})}),(0,h.jsx)(y,{children:'curl -X GET "https://stackby.com/api/v1/columnCreate/type" \\\n -H "api-key: pat_xxxxxxxxxxxxxxxxxxxx" \\\n -H "Content-Type: application/json" \\\n -d \'{\n "name": "Column Name",\n "stackId": "STACK_ID",\n "tableId": "TABLE_ID",\n "viewId": "VIEW_ID"\n }\''}),(0,h.jsxs)("div",{children:[(0,h.jsx)("h3",{children:"Supported Field Types"}),(0,h.jsx)("h4",{children:"Basic Text Columns"}),(0,h.jsx)(b,{headers:["Field","Type"],rows:[["Short Text","shortText"],["Long Text","longText"]]}),(0,h.jsx)("h4",{children:"Collaborator Columns"}),(0,h.jsx)(b,{headers:["Field","Type"],rows:[["Single Collaborator","singleCollaborator"],["Multiple Collaborator","multipleCollaborator"]]}),(0,h.jsx)("h4",{children:"Option Columns"}),(0,h.jsx)(b,{headers:["Field","Type"],rows:[["Single Option","singleOption"],["Multiple Options","multipleOptions"]]}),(0,h.jsx)("p",{children:"Required parameters in body"}),(0,h.jsx)(y,{language:"json",children:'{\n "options": ["Option A", "Option B", "Option C"]\n}'}),(0,h.jsx)("h4",{children:"File & Boolean"}),(0,h.jsx)(b,{headers:["Field","Type"],rows:[["Attachment","attachment"],["Checkbox","checkbox"]]}),(0,h.jsx)("h4",{children:"Date & Time"}),(0,h.jsx)(b,{headers:["Field","Type"],rows:[["Date and Time","dateAndTime"]]}),(0,h.jsx)("p",{children:"Required parameters in body"}),(0,h.jsx)(y,{language:"json",children:'{\n "isTimeInclude": true,\n "timeFormat": "24"\n}'}),(0,h.jsx)(f,{type:"warning",children:'Note: timeFormat values: "12" or "24"'}),(0,h.jsx)("h4",{children:"Numeric & Contact Fields"}),(0,h.jsx)(b,{headers:["Column","Type"],rows:[["Number","number"],["Phone Number","phoneNumber"],["Duration","duration"],["Time","time"],["Rating","rating"],["Email","email"],["URL","url"],["Barcode","barcode"]]}),(0,h.jsx)("h4",{children:"System & Auto Fields"}),(0,h.jsx)(b,{headers:["Column","Type"],rows:[["Formula","formula"],["Created Time","createdTime"],["Updated Time","updatedTime"],["Created By","createdBy"],["Updated By","updatedBy"],["Auto Number","autoNumber"]]}),(0,h.jsx)("h4",{children:"Advanced Field Types"}),(0,h.jsx)(b,{headers:["Field","Type"],rows:[["Check List","checkList"],["Location","location"],["Signature","signatureEndFragment"]]}),(0,h.jsx)("h4",{children:"Link to Another Table"}),(0,h.jsx)(b,{headers:["Type"],rows:[["link"]]}),(0,h.jsx)("p",{children:"Required parameters in body"}),(0,h.jsx)(y,{language:"json",children:'{\n "name": "Linked Table",\n "stackId": "STACK_ID",\n "tableId": "CURRENT_TABLE_ID",\n "viewId": "VIEW_ID",\n "linkToTableId": "FOREIGN_TABLE_ID",\n "linkToTableViewId": "FOREIGN_VIEW_ID"\n}'}),(0,h.jsx)("h4",{children:"Lookup Column"}),(0,h.jsx)(b,{headers:["Type"],rows:[["lookup"]]}),(0,h.jsx)("p",{children:"Required parameters in body"}),(0,h.jsx)(y,{language:"json",children:'{\n "name": "Lookup Column",\n "stackId": "STACK_ID",\n "tableId": "TABLE_ID",\n "viewId": "VIEW_ID",\n "linkToTableId": "FOREIGN_TABLE_ID",\n "linkColumnId": "LINK_COLUMN_ID",\n "linkedColumnId": "FOREIGN_COLUMN_ID"\n}'}),(0,h.jsx)("h4",{children:"Lookup Count"}),(0,h.jsx)(b,{headers:["Type"],rows:[["lookupCount"]]}),(0,h.jsx)("p",{children:"Required parameters in body"}),(0,h.jsx)(y,{language:"json",children:'{\n "name": "Lookup Count",\n "stackId": "STACK_ID",\n "tableId": "TABLE_ID",\n "viewId": "VIEW_ID",\n "linkColumnId": "LINK_COLUMN_ID",\n "linkToTableId": "FOREIGN_TABLE_ID"\n}'}),(0,h.jsx)("h4",{children:"Aggregation Column"}),(0,h.jsx)(b,{headers:["Type"],rows:[["aggregation"]]}),(0,h.jsx)("p",{children:"Required parameters in body"}),(0,h.jsx)(y,{language:"json",children:'{\n "name": "Aggregation Column",\n "stackId": "STACK_ID",\n "tableId": "TABLE_ID",\n "viewId": "VIEW_ID",\n "linkColumnId": "LINK_COLUMN_ID",\n "linkToTableId": "FOREIGN_TABLE_ID",\n "linkedColumnId": "FOREIGN_COLUMN_ID",\n "linkToTableViewId": "FOREIGN_VIEW_ID"\n}'})]}
2),(0,h.jsx)("h3",{children:"Response (200 OK)"}),(0,h.jsx)(y,{language:"json",children:'{\n "columnId": "cl17794287777385f2bee",\n "columnCreateResponse": {},\n "cellValuesArray": [],\n "stackId": "stkIDmXrWsPZFlErFg",\n "actionId": "",\n "workspaceId": "ws177910114858624d234",\n "name": "Column 1",\n "tableId": "tb48VYD41baB46wTmQ",\n "viewId": "vw1779101907067c8ece0",\n "type": "text",\n "columnIndex": 0,\n "copyColumn": "",\n "copyColumnData": false,\n "insertType": "normal"\n}'})]}),"delete-field":(0,h.jsxs)("div",{children:[(0,h.jsx)("table",{className:"api-endpoint-table",children:(0,h.jsxs)("tbody",{children:[(0,h.jsxs)("tr",{children:[(0,h.jsx)("td",{children:"Endpoint"}),(0,h.jsx)("td",{children:(0,h.jsx)("code",{children:"POST /columnDelete/{stackId}"})})]}),(0,h.jsxs)("tr",{children:[(0,h.jsx)("td",{children:"Authentication"}),(0,h.jsx)("td",{children:"Required"})]})]})}),(0,h.jsx)("h3",{children:"Request"}),(0,h.jsx)(y,{children:'curl -X GET "https://stackby.com/api/v1/columnDelete/st123abc" \\\n -H "api-key: pat_xxxxxxxxxxxxxxxxxxxx" \\\n -H "Content-Type: application/json" \\\n -d \'{\n "tableId": "TABLE_ID",\n "viewId": "VIEW_ID",\n "columnId": "COLUMN_ID"\n }\''}),(0,h.jsx)("h3",{children:"Response (200 OK)"}),(0,h.jsx)(y,{language:"json",children:'[\n {\n "id": 5,\n "columnId": "cl1779425789893d819d4",\n "syncColumn": null,\n "name": "Label",\n "type": "text",\n "showType": null,\n "description": null,\n "defaultValue": null,\n "typeOptions": null,\n "isSync": 0,\n "isVisible": 0,\n "updatedAt": "2026-05-22T05:35:44.000Z",\n "createdAt": "2026-05-22T04:56:30.000Z"\n }\n]'})]}),"create-workspace":(0,h.jsxs)("div",{children:[(0,h.jsx)("p",{children:"Creates a new workspace for the authenticated user."}),(0,h.jsx)("h3",{children:"Endpoint"}),(0,h.jsx)(y,{children:"POST /workspaceAct/create"}),(0,h.jsx)("table",{className:"api-endpoint-table",children:(0,h.jsxs)("tbody",{children:[(0,h.jsxs)("tr",{children:[(0,h.jsx)("td",{children:"Endpoint"}),(0,h.jsx)("td",{children:(0,h.jsx)("code",{children:"POST /workspaceAct/create"})})]}),(0,h.jsxs)("tr",{children:[(0,h.jsx)("td",{children:"Authentication"}),(0,h.jsx)("td",{children:"Required"})]})]})}),(0,h.jsx)("h3",{children:"Request Body"}),(0,h.jsx)(b,{headers:["Parameter","Type","Required","Description"],rows:[["name","string","Yes","Name of the workspace (1-150 chars)"]]}),(0,h.jsx)("h3",{children:"Request"}),(0,h.jsx)(y,{children:'curl -X POST "https://stackby.com/api/v1/workspaceAct/create" \\\n -H "api-key: pat_xxxxxxxxxxxxxxxxxxxx" \\\n -H "Content-Type: application/json" \\\n -d \'{"name": "My New Workspace"}\''}),(0,h.jsx)("h3",{children:"Response (200 OK)"}),(0,h.jsx)(y,{language:"json",children:'{\n "data": {\n "workspaceId": "ws178057332398207d384",\n "name": "My New Workspace",\n "planName": "Free Forever",\n "totalWorkspaceCount": "5",\n "isPowerUpEnabled": false\n }\n}'})]}),"list-workspaces":(0,h.jsxs)("div",{children:[(0,h.jsx)("p",{children:"Retrieves a list of all workspaces owned by the authenticated user. Results can be filtered by name."}),(0,h.jsx)("h3",{children:"Endpoint"}),(0,h.jsx)(y,{children:"GET /workspaceAct/list"}),(0,h.jsx)("table",{className:"api-endpoint-table",children:(0,h.jsxs)("tbody",{children:[(0,h.jsxs)("tr",{children:[(0,h.jsx)("td",{children:"Endpoint"}),(0,h.jsx)("td",{children:(0,h.jsx)("code",{children:"GET /workspaceAct/list"})})]}),(0,h.jsxs)("tr",{children:[(0,h.jsx)("td",{children:"Authentication"}),(0,h.jsx)("td",{children:"Required"})]})]})}),(0,h.jsx)("h3",{children:"Query Parameters"}),(0,h.jsx)(b,{headers:["Parameter","Type","Required","Default","Description"],rows:[["workspaceName","string","No","â","Search/filter workspaces by name (case-insensitive, partial match)"]]}),(0,h.jsx)("h3",{children:"Request"}),(0,h.jsx)(y,{children:'curl -X GET "https://stackby.com/api/v1/workspaceAct/list?workspaceName=marketing" \\\n -H "api-key: pat_xxxxxxxxxxxxxxxxxxxx" \\\n -H "Content-Type: application/json"'}
2),(0,h.jsx)("h3",{children:"Response (200 OK)"}),(0,h.jsx)(y,{language:"json",children:'{\n "data": [\n {\n "id": "ws178057332398207d384",\n "name": "Marketing Team"\n },\n {\n "id": "ws178057332398207a291",\n "name": "Marketing Campaigns"\n }\n ]\n}'})]}),"workspace-detail":(0,h.jsxs)("div",{children:[(0,h.jsx)("p",{children:"Retrieves detailed information about a specific workspace. Only returns data if the workspace belongs to the authenticated user."}),(0,h.jsx)("h3",{children:"Endpoint"}),(0,h.jsx)(y,{children:"GET /workspaceAct/detail"}),(0,h.jsx)("table",{className:"api-endpoint-table",children:(0,h.jsxs)("tbody",{children:[(0,h.jsxs)("tr",{children:[(0,h.jsx)("td",{children:"Endpoint"}),(0,h.jsx)("td",{children:(0,h.jsx)("code",{children:"GET /workspaceAct/detail"})})]}),(0,h.jsxs)("tr",{children:[(0,h.jsx)("td",{children:"Authentication"}),(0,h.jsx)("td",{children:"Required"})]})]})}),(0,h.jsx)("h3",{children:"Query Parameters"}),(0,h.jsx)(b,{headers:["Parameter","Type","Required","Description"],rows:[["workspaceId","string","Yes","The unique ID of the workspace"]]}),(0,h.jsx)("h3",{children:"Request"}),(0,h.jsx)(y,{children:'curl -X GET "https://stackby.com/api/v1/workspaceAct/detail?workspaceId=ws178057332398207d384" \\\n -H "api-key: pat_xxxxxxxxxxxxxxxxxxxx" \\\n -H "Content-Type: application/json"'}),(0,h.jsx)("h3",{children:"Response (200 OK)"}),(0,h.jsx)(y,{language:"json",children:'{\n "data": {\n "id": "ws178057332398207d384",\n "name": "My New Workspace",\n "planName": "Free Forever",\n "powerupsEnable": false,\n "allowedUsersCount": "5",\n "extraUsersCount": 0,\n "expireSubscriptionsAt": null,\n "createdAt": "2026-06-04T10:30:00.000Z"\n }\n}'}),(0,h.jsx)("h3",{children:"Error Response (400)"}),(0,h.jsx)(y,{language:"json",children:'{\n "error": "400::workspaceId is required"\n}'}),(0,h.jsx)(y,{language:"json",children:'{\n "error": "400::Workspace not found"\n}'})]}),"list-tables":(0,h.jsxs)("div",{children:[(0,h.jsx)("table",{className:"api-endpoint-table",children:(0,h.jsxs)("tbody",{children:[(0,h.jsxs)("tr",{children:[(0,h.jsx)("td",{children:"Endpoint"}),(0,h.jsx)("td",{children:(0,h.jsx)("code",{children:"GET /tableList/{stackId}"})})]}),(0,h.jsxs)("tr",{children:[(0,h.jsx)("td",{children:"Authentication"}),(0,h.jsx)("td",{children:"Required"})]})]})}),(0,h.jsx)("h3",{children:"Request"}),(0,h.jsx)(y,{children:'curl --location GET "https://stackby.com/api/v1/tableList/stk123abc" \\\n -H "api-key: pat_xxxxxxxxxxxxxxxxxxxx"'}),(0,h.jsx)("h3",{children:"Response (200 OK)"}),(0,h.jsx)(y,{language:"json",children:'[\n {\n "id": "tb48VYD41baB46wTmQ",\n "name": "Table 1"\n }\n]'})]}),"create-tables":(0,h.jsxs)("div",{children:[(0,h.jsx)("table",{className:"api-endpoint-table",children:(0,h.jsxs)("tbody",{children:[(0,h.jsxs)("tr",{children:[(0,h.jsx)("td",{children:"Endpoint"}),(0,h.jsx)("td",{children:(0,h.jsx)("code",{children:"POST /tableCreate/{stackId}"})})]}),(0,h.jsxs)("tr",{children:[(0,h.jsx)("td",{children:"Authentication"}),(0,h.jsx)("td",{children:"Required"})]})]})}),(0,h.jsx)("h3",{children:"Request"}),(0,h.jsx)(y,{children:'curl --location -g POST "https://stackby.com/api/v1/tableCreate/stabc123" \\\n -H "api-key: pat_xxxxxxxxxxxxxxxxxxxx" \\\n -H "Content-Type: application/json" \\\n -d \'{\n "name": "Table Name",\n "type": "default",\n "data": "",\n "copyTableData": false,\n "copyTable": false\n }\''}),(0,h.jsx)("h3",{children:"Response (200 OK)"}),(0,h.jsx)(y,{language:"json",children:'{\n "id": 2,\n "sequence": 2,\n "tableId": "tbl1779429037404b8e386",\n "syncSourceTable": null,\n "isLock": 0,\n "name": "Tasks",\n "syncFrequrncy": null,\n "description": null,\n "primaryColumnId": "cl1779429037685b8a33e",\n "isSync": 0,\n "isVisible": 1,\n "isLeveDeletedSyncRow": 0,\n "updatedAt": "2026-05-22T05:50:37.000Z",\n "createdAt": "2026-05-22T05:50:37.000Z",\n "viewId": "vw17794290374597f96eb",\n "tableshareId": "tbshr1779429037422361b86",\n "viewshareId": "vwshr1779429037422d7dedb",\n "isSharedTable": true,\n "allowedUsers": [\n {\n "id": 97308,\n "allAccessTable": 1\n }\n ]\n}'})]}),"delete-table":(0,h.jsxs)("div",{children:[(0,h.jsx)("table",{className:"api-endpoint-table",children:(0,h.jsxs)("tbody",{children:[(0,h.jsxs)("tr",{children:[(0,h.jsx)("td",{children:"Endpoint"}),(0,h.jsx)("td",{children:(0,h.jsx)("code",{children:"DELETE /tableDelete/{stackId}/{tableId}"})})]}),(0,h.jsxs)("tr",{children:[(0,h.jsx)("td",{children:"Authentication"}),(0,h.jsx)("td",{children:"Required"})]})]})}),(0,h.jsx)("h3",{children:"Request"}),(0,h.jsx)(y,{children:'curl -X DELETE "https://stackby.com/api/v1/tableDelete/st123abc" \\\n -H "api-key: pat_xxxxxxxxxxxxxxxxxxxx"'}
vendor: 5,019 bytes, line 2
2),(0,h.jsx)("h3",{children:"Response (200 OK)"}),(0,h.jsx)(y,{language:"json",children:'{\n "id": 2,\n "sequence": 2,\n "tableId": "tbl1779429037404b8e386",\n "syncSourceTable": null,\n "isLock": 0,\n "name": "Tasks",\n "syncFrequrncy": null,\n "description": null,\n "primaryColumnId": "cl1779429037685b8a33e",\n "isSync": 0,\n "isVisible": 0,\n "isLeveDeletedSyncRow": 0,\n "updatedAt": "2026-05-22T05:53:23.000Z",\n "createdAt": "2026-05-22T05:50:37.000Z",\n "lastTableId": "tb48VYD41baB46wTmQ",\n "lastViewId": "vw1779101907067c8ece0",\n "columnSchema": [],\n "users": [\n "97308"\n ],\n "actionId": "",\n "stackId": "stkIDmXrWsPZFlErFg",\n "workspaceId": "ws177910114858624d234"\n}'})]}),"list-bases":(0,h.jsxs)("div",{children:[(0,h.jsx)("table",{className:"api-endpoint-table",children:(0,h.jsxs)("tbody",{children:[(0,h.jsxs)("tr",{children:[(0,h.jsx)("td",{children:"Endpoint"}),(0,h.jsx)("td",{children:(0,h.jsx)("code",{children:"GET /stackList"})})]}),(0,h.jsxs)("tr",{children:[(0,h.jsx)("td",{children:"Authentication"}),(0,h.jsx)("td",{children:"Required"})]})]})}),(0,h.jsx)("h3",{children:"Request"}),(0,h.jsx)(y,{children:'curl --location POST "https://stackby.com/api/v1/stackList" \\\n -H "api-key: pat_xxxxxxxxxxxxxxxxxxxx" \\\n -b \'{\n "workspaceId": "WORKSPACE_ID"\n }\''}),(0,h.jsx)("h3",{children:"Response (200 OK)"}),(0,h.jsx)(y,{language:"json",children:'{\n "data": [\n {\n "id": "stCkxVEBpdX82ElNMw",\n "stackName": "Untitled stack",\n "workspaceId": "ws177910114858624d234",\n "color": "#3384F7",\n "icon": "ios-beer-outline",\n "firstTableId": "tbyHGbHWvbanU68c9l",\n "firstViewId": "vw17791019451165b2a09"\n }\n ]\n}'})]}),"create-bases":(0,h.jsxs)("div",{children:[(0,h.jsx)("table",{className:"api-endpoint-table",children:(0,h.jsxs)("tbody",{children:[(0,h.jsxs)("tr",{children:[(0,h.jsx)("td",{children:"Endpoint"}),(0,h.jsx)("td",{children:(0,h.jsx)("code",{children:"POST /stack/create"})})]}),(0,h.jsxs)("tr",{children:[(0,h.jsx)("td",{children:"Authentication"}),(0,h.jsx)("td",{children:"Required"})]})]})}),(0,h.jsx)("h3",{children:"skipDefaultColumns Parameter"}),(0,h.jsx)("p",{children:"The skipDefaultColumns parameter is a specific instruction used in the Stackby Developer API (specifically when creating a new Stack) to control the initial structure of the database."}),(0,h.jsx)("p",{children:'By default, when you create a new stack in Stackby, the system automatically includes a set of "standard" columns (like Name, Notes, Status, etc.) to help you get started. Using this parameter allows you to bypass that "starter" template.'}),(0,h.jsx)("h4",{children:"How it Works"}),(0,h.jsx)("p",{children:'When you send a POST request to create a stack, the "skipDefaultColumns": "True" flag tells the Stackby server: "Do not apply the default spreadsheet template; just give me a blank slate."'}),(0,h.jsxs)("ul",{children:[(0,h.jsxs)("li",{children:[(0,h.jsx)("strong",{children:"Standard Behavior:"})," Creates a stack with 3â4 pre-defined columns and one empty row."]}),(0,h.jsxs)("li",{children:[(0,h.jsx)("strong",{children:"With skipDefaultColumns:"})," Creates a stack that is truly empty. You will have a table, but you must then use the Field API to manually define every column (Name, Date, Dropdown, etc.) that you want."]})]}),(0,h.jsx)("h4",{children:"Technical Implementation"}),(0,h.jsx)("p",{children:"Typically, this is passed in the JSON body of your API request."}),(0,h.jsx)("h4",{children:"Why use it?"}),(0,h.jsx)("p",{children:"This is primarily used by developers who are programmatically mirroring another data source."}),(0,h.jsxs)("ul",{children:[(0,h.jsxs)("li",{children:[(0,h.jsx)("strong",{children:"Avoid Cleanup:"}),' If you are importing 50 custom columns from a different database, you don\'t want to manually delete "Notes" or "Status" columns that Stackby created by default.']}),(0,h.jsxs)("li",{children:[(0,h.jsx)("strong",{children:"Precision:"})," It ensures that your automated setup is clean and only contains the exact data schema your application requires."]}),(0,h.jsxs)("li",{children:[(0,h.jsx)("strong",{children:"Efficiency:"})," It reduces the number of API calls needed. Instead of Create â Delete Defaults â Create Custom, you just do Create (Empty) â Create Custom."]})]}),(0,h.jsx)(f,{type:"warning",children:'Because Stackby is a relational database, every table needs at least one "Primary Column." Even with this flag set to True, the system may still require you to define a primary column immediately after creation before you can add rows.'}),(0,h.jsx)("h3",{children:"Request"}),(0,h.jsx)(y,{children:'curl --location -g POST "https://stackby.com/api/v1/stack/create" \\\n -H "api-key: pat_xxxxxxxxxxxxxxxxxxxx" \\\n -H "Content-Type: application/json" \\\n -d \'{\n "name": "Stack Name",\n "color": "#4F46E5",\n "icon": "ð",\n "workspaceId": "WORKSPACE_ID",\n "skipDefaultColumns": "True"\n }\''}
2),(0,h.jsx)("h3",{children:"Response (200 OK)"}),(0,h.jsx)(y,{language:"json",children:'{\n "stack": [\n {\n "stackId": "st1779430786110103bc9",\n "workspaceId": "wsoiGskZX7T6wkNY09",\n "stackName": "My Stack",\n "info": "",\n "color": "#4F46E5",\n "icon": "ð",\n }\n ]\n}'})]}),"delete-base":(0,h.jsxs)("div",{children:[(0,h.jsx)("table",{className:"api-endpoint-table",children:(0,h.jsxs)("tbody",{children:[(0,h.jsxs)("tr",{children:[(0,h.jsx)("td",{children:"Endpoint"}),(0,h.jsx)("td",{children:(0,h.jsx)("code",{children:"DELETE /stackDelete/{stackId}"})})]}),(0,h.jsxs)("tr",{children:[(0,h.jsx)("td",{children:"Authentication"}),(0,h.jsx)("td",{children:"Required"})]})]})}),(0,h.jsx)("h3",{children:"Request"}),(0,h.jsx)(y,{children:'curl -X DELETE "https://stackby.com/api/v1/stackDelete/st123abc" \\\n -H "api-key: pat_xxxxxxxxxxxxxxxxxxxx"'}),(0,h.jsx)("h3",{children:"Response (200 OK)"}),(0,h.jsx)(y,{language:"json",children:'{\n "shareId": "shr17794302053238e7c61",\n "isPublished": 0,\n "sharedViewId": null,\n "shareTableId": null,\n "formshareId": null,\n "userId": "97308",\n "stackName": "My Stack",\n "type": "default",\n "workspaceId": "ws177910114858624d234",\n "info": "",\n "color": "#4F46E5",\n "icon": "ð",\n "firstTableId": "tbl177943020476851a66b",\n "firstViewId": "vw177943020532398917c",\n "uploadAttachmentBytes": 0,\n "isVisible": 0,\n "isExpandValidate": 0,\n "isRestrictCsv": 0,\n "isCopyStack": 1,\n "isShowOrgLogo": 0,\n "auth": null,\n "isPasswordRestricted": 0,\n "emailDomain": null,\n "isDomainRestricted": 0,\n "fromShareId": null,\n "lastTrashEmptyAt": null,\n "isOverLimit": 0,\n "updatedAt": "2026-05-22T06:13:09.000Z",\n "createdAt": "2026-05-22T06:10:05.000Z",\n "canCopyPasteFromShareLink": 1,\n "isShareLinkVisible": 0,\n "stackId": "st177943020476875622e"\n}'})]}),"list-views":(0,h.jsxs)("div",{children:[(0,h.jsx)("p",{children:"Views are saved configurations of filters, sorting, hidden columns, and groupings applied to a table. Use the viewId parameter on the List Rows endpoint to retrieve data as filtered by a view"}),(0,h.jsx)("p",{children:"Returns all views for a given table."}),(0,h.jsx)("h3",{children:"Endpoint"}),(0,h.jsxs)(y,{children:["GET /viewlist/","stackId","/","tableId"]}),(0,h.jsx)("table",{className:"api-endpoint-table",children:(0,h.jsxs)("tbody",{children:[(0,h.jsxs)("tr",{children:[(0,h.jsx)("td",{children:"Endpoint"}),(0,h.jsx)("td",{children:(0,h.jsxs)("code",{children:["GET /viewlist/","{stackId}","/","{tableId}"]})})]}),(0,h.jsxs)("tr",{children:[(0,h.jsx)("td",{children:"Authentication"}),(0,h.jsx)("td",{children:"Required"})]})]})}),(0,h.jsx)("h3",{children:"Request"}),(0,h.jsx)(y,{children:'curl -X GET "https://stackby.com/api/v1/viewlist/{"stackId"}/{"tableId"}" \\\n -H "api-key: pat_xxxxxxxxxxxxxxxxxxxx" \\\n -H "Content-Type: application/json"'}),(0,h.jsx)("h3",{children:"Response (200 OK)"}),(0,h.jsx)(y,{language:"json",children:'{\n "data": {\n "views": [\n { "viewId": "vw_001", "name": "All Records", "type": "grid" },\n { "viewId": "vw_002", "name": "Active Accounts", "type": "grid" },\n { "viewId": "vw_003", "name": "Kanban by Status", "type": "kanban" },\n { "viewId": "vw_004", "name": "Project Timeline", "type": "gantt" }\n ]\n },\n "status": "ok"\n}'}),(0,h.jsx)("h3",{children:"View Types"}),(0,h.jsx)(b,{headers:["Type","Description"],rows:[["grid","Standard spreadsheet / table view"],["kanban","Kanban board view (grouped by a column)"],["gallery","Card/gallery view"],["timeline","Timeline"],["calendar","Calendar view (requires a date column)"],["form","Form view for data collection"]]})]}),"list-rows-view":(0,h.jsxs)("div",{children:[(0,h.jsxs)("p",{children:["Use the ",(0,h.jsx)("code",{children:"viewId"})," query parameter on the List Rows endpoint to retrieve rows filtered and sorted by a view:"]}),(0,h.jsx)(y,{children:"GET https://stackby.com/api/v1/rowlist/{stackId}/{tableId}?viewId={viewId}"}),(0,h.jsx)("h3",{children:'Example - fetch only "Active Accounts"'}),(0,h.jsx)(y,{children:'curl -X GET "https://stackby.com/api/v1/rowlist/{"stackId"}/{"tableId"}?viewId=vw_002" \\\n -H "api-key: pat_xxxxxxxxxxxxxxxxxxxx" \\\n -H "Content-Type: application/json"'})]}),"upload-file":(0,h.jsxs)("div",{children:[(0,h.jsx)("p",{children:"Uploads a file attachment. The returned URL can then be set in an Attachment column when creating or updating a row."}),(0,h.jsx)("h3",{children:"Endpoint"}),(0,h.jsxs)(y,{children:["POST /uploadfile/","stackId","/","tableId"]}),(0,h.jsx)(b,{headers:["Property","Value"],rows:[["Authentication","Required"],["Content-Type","multipart/form-data"],["Max File Size","25 MB"]]}),(0,h.jsx)("h3",{children:"Request"}),(0,h.jsx)(y,{children:'curl -X POST "https://stackby.com/api/v1/uploadfile/stk123abc/tbl456def" \\\n -H "api-key: pat_xxxxxxxxxxxxxxxxxxxx" \\\n -F "file=@/path/to/document.pdf"'}
2),(0,h.jsx)("h3",{children:"Response (201 Created)"}),(0,h.jsx)(y,{language:"json",children:'{\n "data": {\n "fileId": "file_xyz789",\n "filename": "document.pdf",\n "mimeType": "application/pdf",\n "size": 204800,\n "url": "https://stackby.com/files/stk123abc/file_xyz789/document.pdf",\n "uploadedAt": "2026-05-18T14:10:00.000Z"\n },\n "status": "ok"\n}'}),(0,h.jsx)("h3",{children:"Attaching an Uploaded File to a Row"}),(0,h.jsx)(y,{children:'curl -X PUT "https://stackby.com/api/v1/row/stk123abc/tbl456def/row_abc001" \\\n -H "api-key: pat_xxxxxxxxxxxxxxxxxxxx" \\\n -H "Content-Type: application/json" \\\n -d \'{\n "fields": {\n "Attachments": [\n {\n "url": "https://stackby.com/files/stk123abc/file_xyz789/document.pdf",\n "filename": "document.pdf"\n }\n ]\n }\n }\''})]}),"field-types-reference":(0,h.jsxs)("div",{children:[(0,h.jsx)(b,{headers:["Field Type","JSON Type","Example Value","Notes"],rows:[["Text","string",'"Acme Corp"',"Single-line text"],["Long Text","string",'"Multiline\\ntext"',"Supports newline characters"],["Number","number","42 or 3.14","Integer or float"],["Currency","number","125000.50","Stored as a number"],["Percent","number","75","Integer 0â100"],["Checkbox","boolean","true or false","-"],["Date","string (ISO 8601)",'"2026-05-18"',"YYYY-MM-DD format"],["Date & Time","string (ISO 8601)",'"2026-05-18T10:30:00.000Z"',"UTC timezone"],["Select","string",'"Active"',"Single select option value"],["Multi-Select","array of strings",'["Tag A", "Tag B"]',"Array of option strings"],["Email","string",'"[email protected]"',"-"],["Phone","string",'"+1-555-123-4567"',"-"],["URL","string",'"https://example.com"',"-"],["Attachment","array of objects","See below","File references with url, filename, mimeType, size"],["Rating","number","4","Integer 1â5 (or custom max)"],["Formula","(read-only)","Computed by Stackby","Cannot be set via API"],["Lookup","(read-only)","Pulled from linked table","Cannot be set via API"],["Rollup","(read-only)","Aggregated value","Cannot be set via API"],["Created Time","string (ISO 8601)",'"2026-04-10T12:34:56.000Z"',"Auto-set; read-only"],["Last Modified","string (ISO 8601)",'"2026-05-01T08:11:00.000Z"',"Auto-set; read-only"],["Percent","number",'"55"',"-"],["AI","string",'"Generated text"',"-"],["Collaborator","array of strings",'["userId"]',"Only stack collaborator selection"],["Multi-collaborators","array of strings",'["userId A", "userId B"]',"Only stack collaborator selection"],["Checkbox","number","0 or 1","-"],["Duration","number (Unix timestamp)","1779357420285","-"],["Time","number (Unix timestamp)","1779357420285","-"],["Auto number","number","5","Auto-set, read-only"],["Created by","string",'"userId"',"Auto-set, read-only"],["Updated by","string",'"userId"',"Auto-set, read-only"],["Barcode","number","321456987","-"],["Check list","string","Computed by Stackby","-"],["Signature","base64","Base64 format","Only set via form submit"],["Link","string","Computed by Stackby","Cannot be set via API"],["Button","string","Button style, label, formula, action","-"],["API connector","string","-","-"],["Push message","string","-","-"]]}),(0,h.jsx)("h3",{children:"Attachment Object Structure"}),(0,h.jsx)(y,{language:"json",children:'{\n "url": "https://stackby.com/files/.../filename.pdf",\n "filename": "filename.pdf",\n "mimeType": "application/pdf",\n "size": 204800\n}'}),(0,h.jsx)("h3",{children:"Clearing a Field Value"}),(0,h.jsx)("p",{children:"To clear any writable field, pass null:"}),(0,h.jsx)(y,{language:"json",children:'{\n "fields": {\n "Status": null,\n "Revenue": null\n }\n}'})]}),"code-examples":(0,h.jsxs)("div",{children:[(0,h.jsx)("h3",{children:"JavaScript / Node.js"}),(0,h.jsx)(y,{language:"javascript",children:"const API_KEY = process.env.STACKBY_API_KEY;\nconst BASE_URL = 'https://stackby.com/api/v1';\nconst STACK_ID = 'stk123abc';\nconst TABLE_ID = 'tbl456def';\n\nconst headers = {\n 'api-key': API_KEY,\n 'Content-Type': 'application/json',\n};\n\nasync function getAllRows() {\n const allRows = [];\n let offset = null;
2\n\n do {\n const url = new URL(`${BASE_URL}/rowlist/${STACK_ID}/${TABLE_ID}`);\n url.searchParams.set('maxRecord', '100');\n\n if (offset) {\n url.searchParams.set('offset', offset);\n }\n\n const res = await fetch(url.toString(), { headers });\n\n if (!res.ok) {\n throw new Error(`Error ${res.status}`);\n }\n\n const data = await res.json();\n allRows.push(...data.data);\n offset = data.offset || null;\n\n } while (offset);\n\n return allRows;\n}\n\nasync function createRow(fields) {\n const res = await fetch(`${BASE_URL}/row/${STACK_ID}/${TABLE_ID}`, {\n method: 'POST',\n headers,\n body: JSON.stringify({\n rows: [{ fields }]\n }),\n });\n\n if (!res.ok) {\n throw new Error(`Error ${res.status}`);\n }\n\n return res.json();\n}\n\nasync function updateRow(rowId, fields) {\n const res = await fetch(`${BASE_URL}/row/${STACK_ID}/${TABLE_ID}/${rowId}`, {\n method: 'PUT',\n headers,\n body: JSON.stringify({ fields }),\n });\n\n if (!res.ok) {\n throw new Error(`Error ${res.status}`);\n }\n\n return res.json();\n}\n\nasync function deleteRow(rowId) {\n const res = await fetch(`${BASE_URL}/row/${STACK_ID}/${TABLE_ID}/${rowId}`, {\n method: 'DELETE',\n headers,\n });\n\n if (!res.ok) {\n throw new Error(`Error ${res.status}`);\n }\n\n return res.json();\n}"}),(0,h.jsx)("h3",{children:"Python"}),(0,h.jsx)(y,{language:"python",children:"import os\nimport requests\n\nAPI_KEY = os.environ['STACKBY_API_KEY']\nBASE_URL = 'https://stackby.com/api/v1'\nSTACK_ID = 'stk123abc'\nTABLE_ID = 'tbl456def'\n\nheaders = {\n 'api-key': API_KEY,\n 'Content-Type': 'application/json',\n}\n\ndef list_all_rows():\n rows = []\n params = {'maxRecord': 100}\n\n while True:\n res = requests.get(\n f'{BASE_URL}/rowlist/{STACK_ID}/{TABLE_ID}',\n headers=headers,\n params=params\n )\n\n res.raise_for_status()\n data = res.json()\n rows.extend(data['data'])\n\n if 'offset' not in data:\n break\n\n params['offset'] = data['offset']\n\n return rows\n\ndef create_row(fields):\n res = requests.post(\n f'{BASE_URL}/row/{STACK_ID}/{TABLE_ID}',\n headers=headers,\n json={'rows': [{'fields': fields}]}\n )\n\n res.raise_for_status()\n return res.json()\n\ndef update_row(row_id, fields):\n res = requests.put(\n f'{BASE_URL}/row/{STACK_ID}/{TABLE_ID}/{row_id}',\n headers=headers,\n json={'fields': fields}\n )\n\n res.raise_for_status()\n return res.json()\n\ndef delete_row(row_id):\n res = requests.delete(\n f'{BASE_URL}/row/{STACK_ID}/{TABLE_ID}/{row_id}',\n headers=headers\n )\n\n res.raise_for_status()\n return res.json()\n"}),(0,h.jsx)("h3",{children:"Quick Reference - All Endpoints (cURL)"}),(0,h.jsx)(y,{children:'# List rows\ncurl -X GET "https://stackby.com/api/v1/rowlist/{STACK_ID}/{TABLE_ID}" \\\n -H "api-key: YOUR_KEY"\n\n# List rows filtered by view\ncurl -X GET "https://stackby.com/api/v1/rowlist/{STACK_ID}/{TABLE_ID}?viewId={VIEW_ID}" \\\n -H "api-key: YOUR_KEY"\n\n# Get a specific row\ncurl -X GET "https://stackby.com/api/v1/row/{STACK_ID}/{TABLE_ID}/{ROW_ID}" \\\n -H "api-key: YOUR_KEY"\n\n# Create a row\ncurl -X POST "https://stackby.com/api/v1/row/{STACK_ID}/{TABLE_ID}" \\\n -H "api-key: YOUR_KEY" \\\n -H "Content-Type: application/json" \\\n -d \'{"rows":[{"fields":{"Name":"Test","Status":"Active"}}]}\'\n\n# Update a row\ncurl -X PUT "https://stackby.com/api/v1/row/{STACK_ID}/{TABLE_ID}/{ROW_ID}" \\\n -H "api-key: YOUR_KEY" \\\n -H "Content-Type: application/json" \\\n -d \'{"fields":{"Status":"Inactive"}}\'\n\n# Delete a row\ncurl -X DELETE "https://stackby.com/api/v1/row/{STACK_ID}/{TABLE_ID}/{ROW_ID}" \\\n -H "api-key: YOUR_KEY"\n\n# List views\ncurl -X GET "https://stackby.com/api/v1/viewlist/{STACK_ID}/{TABLE_ID}" \\\n -H "api-key: YOUR_KEY"\n\n# Upload a file\ncurl -X POST "https://stackby.com/api/v1/uploadfile/{STACK_ID}/{TABLE_ID}" \\\n -H "api-key: YOUR_KEY" \\\n -F "file=@/path/to/file.pdf"'})]}),"changelog-migration-guide":(0,h.jsxs)("div",{children:[(0,h.jsx)("h3",{children:"API Version History"}),(0,h.jsx)(b,{headers:["Version","Status","Notes"],rows:[["v1","â
Active","Current recommended version for all new integrations"],["betav1","â Deprecated","Removed June 30, 2025"],["v0","â Deprecated","Removed June 30, 2025"]]}),(0,h.jsx)("h3",{children:"Migrating from betav1 / v0 to v1"}),(0,h.jsx)("ol",{children:(0,h.jsx)("li",{children:(0,h.jsx)("strong",{children:"Update your base URL:"})})}),(0,h.jsx)(y,{children:"# Before\nhttps://stackby.com/api/betav1/...\nhttps://stackby.com/api/v0/...\n\n# After\nhttps://stackby.com/api/v1/..."}),(0,h.jsxs)("ol",{start:2,children:[(0,h.jsxs)("li",{children:[(0,h.jsx)("strong",{children:"Review endpoint paths"})," - confirm you are using /rowlist/, /row/, and /viewlist/ path prefixes"]}),(0,h.jsxs)("li",{children:[(0,h.jsx)("strong",{children:"Update response parsing"}),' - v1 wraps all data in a "data" key with a "status" field']}),(0,h.jsxs)("li",{children:[(0,h.jsx)("strong",{children:"Migrate to Personal Access Tokens"})," - generate a PAT from Builder Hub for improved security"]})]}
2),(0,h.jsx)("h3",{children:"Recent Changelog"}),(0,h.jsx)(b,{headers:["Date","Change"],rows:[["May 2026","Personal Access Tokens (PATs) launched - recommended for all new integrations"],["June 2025","betav1 and v0 officially retired and removed"],["Jan 2025","v1 API made generally available with full CRUD support, pagination, and view filtering"]]})]}),"quick-reference":(0,h.jsxs)("div",{children:[(0,h.jsx)(b,{headers:["Operation","Method","Endpoint"],rows:[["List Rows","GET","/rowlist/{stackId}/{tableId}"],["Get Row","GET","/row/{stackId}/{tableId}/{rowId}"],["Create Row(s)","POST","/row/{stackId}/{tableId}"],["Update Row","PUT","/row/{stackId}/{tableId}/{rowId}"],["Delete Row","DELETE","/row/{stackId}/{tableId}/{rowId}"],["List Views","GET","/viewlist/{stackId}/{tableId}"],["Upload File","POST","/uploadfile/{stackId}/{tableId}"]]}),(0,h.jsx)("h3",{children:"Common Query Parameters"}),(0,h.jsx)(b,{headers:["Parameter","Description"],rows:[["maxrowcount","Maximum number of rows to return per request (default: 25, max: 100)."],["startingAfter","Row ID to paginate from. Returns rows after this ID."],["filterByFormula","A formula string to filter rows server-side (e.g., {Status} = 'Active')."],["sortBy","Column name to sort results by."],["sortOrder","Sort direction: asc or desc."]]}),(0,h.jsx)("h3",{children:"Stackby Terminology vs. Airtable Terminology"}),(0,h.jsx)(b,{headers:["Stackby Term","Airtable Equivalent"],rows:[["Stack","Base"],["Table","Table"],["Row","Record"],["Column","Field"],["View","View"],["Workspace","Workspace / Organisation"],["Builder Hub","Developer Hub"],["Personal Access Token (PAT)","Personal Access Token (PAT)"],["API Key","Legacy API Key (deprecated in Airtable)"]]}),(0,h.jsxs)("ul",{children:[(0,h.jsxs)("li",{children:[(0,h.jsx)("strong",{children:"Base URL:"})," ",(0,h.jsx)("code",{children:"https://stackby.com/api/v1"})]}),(0,h.jsxs)("li",{children:[(0,h.jsx)("strong",{children:"Auth Header:"})," ",(0,h.jsx)("code",{children:"api-key: YOUR_TOKEN"})]}),(0,h.jsxs)("li",{children:[(0,h.jsx)("strong",{children:"Format:"})," ",(0,h.jsx)("code",{children:"Content-Type: application/json"})]})]})]}),"resources-support":(0,h.jsxs)("div",{children:[(0,h.jsx)("p",{children:"Helpful resources for developers building with Stackby APIs."}),(0,h.jsx)(b,{headers:["Resource","URL"],rows:[["Official Docs",(0,h.jsx)("a",{href:"https://help.stackby.com/en/article/102-developer-api",target:"_blank",rel:"noopener noreferrer",children:"https://help.stackby.com/en/article/102-developer-api"})],["Postman Collection",(0,h.jsx)("a",{href:"https://documenter.getpostman.com/view/7317658/2sAYkGLz1i",target:"_blank",rel:"noopener noreferrer",children:"https://documenter.getpostman.com/view/7317658/2sAYkGLz1i"})],["Community Forum",(0,h.jsx)("a",{href:"https://community.stackby.com",target:"_blank",rel:"noopener noreferrer",children:"https://community.stackby.com"})],["Stackby Website",(0,h.jsx)("a",{href:"https://stackby.com",target:"_blank",rel:"noopener noreferrer",children:"https://stackby.com"})]]})]})},v={introduction:(0,h.jsxs)("div",{children:[(0,h.jsx)("h2",{children:"Introduction"}),(0,h.jsx)("p",{children:"Welcome to Stackby developer guides."})]}),"personal-access-tokens-guide":(0,h.jsxs)("div",{children:[(0,h.jsx)("h3",{children:"Overview"}),(0,h.jsx)("p",{children:"Personal Access Tokens (PATs) are the recommended way for individual developers to authenticate with the Stackby API. A PAT acts like a password tied to your Stackby account, letting you make authenticated API requests without exposing your account credentials."}),(0,h.jsx)("p",{children:(0,h.jsx)("strong",{children:"Use a PAT when you are:"})}),(0,h.jsxs)("ul",{children:[(0,h.jsx)("li",{children:"Building personal scripts or automation that access your own stacks"}),(0,h.jsx)("li",{children:"Testing the Stackby API during development"}),(0,h.jsx)("li",{children:"Creating MCP connectors for tools like Claude or ChatGPT"}),(0,h.jsx)("li",{children:"Accessing Stackby data from server-side code you control"})]}),(0,h.jsx)(f,{type:"warning",children:"For integrations built on behalf of other Stackby users, see Part 2: Building Integrations. PATs only grant access to the account that generated them."}),(0,h.jsx)("h3",{children:"Creating a Personal Access Token"}),(0,h.jsx)("p",{children:"Follow these steps to generate a new PAT from your Stackby account:"}),(0,h.jsxs)("ol",{children:[(0,h.jsxs)("li",{children:["Log in to your Stackby account at ",(0,h.jsx)("a",{href:"https://stackby.com",target:"_blank",rel:"noopener noreferrer",children:"stackby.com"}),"."]}),(0,h.jsx)("li",{children:"Click your account avatar or workspace name in the top-left corner to open account settings."}),(0,h.jsxs)("li",{children:["Navigate to ",(0,h.jsx)("strong",{children:"Settings â Builder Hub"}),"."]}),(0,h.jsx)("li",{children:'Click "Create New Token" (or "+ New Token") in the Personal Access Tokens section.'}),(0,h.jsx)("li",{children:'Give your token a descriptive name (e.g., "My Automation Script" or "Production Integration"). This name is for your reference only.'}),(0,h.jsx)("li",{children:"Select the permission scopes your token requires (see Token Scopes below)."}),(0,h.jsx)("li",{children:"Optionally, assign the token access to specific stacks or to all stacks in your account."}),(0,h.jsx)("li",{children:'Click "Create Token". The token value will be shown once â copy and store it securely immediately.'})]}),(0,h.jsx)(f,{type:"warning",children:"Stackby will only display the full token value once, immediately after creation. If you lose it, you must revoke the token and create a new one."}),(0,h.jsx)("h3",{children:"Token Scopes"}),(0,h.jsx)("p",{children:"Scopes define exactly what the token is permitted to do. Follow the principle of least privilege: grant only the scopes your use case requires."}),(0,h.jsx)(b,{headers:["Scope","Description"],rows:[["stack:read","Read data from stacks, tables, rows, and columns you have access to."],["stack:write","Create, update, and delete rows in stacks and tables."],["stack:schema:read","Read stack and table schema (column definitions, views, etc.)."],["stack:schema:write","Modify stack and table structure â add, rename, or delete columns; create tables."],["workspace:read","List workspaces and their metadata."],["user:read","Read basic profile information for the authenticated user."]]}),(0,h.jsx)("h4",{children:"Common scope combinations:"}),(0,h.jsxs)("ul",{children:[(0,h.jsxs)("li",{children:[(0,h.jsx)("strong",{children:"Read-only automation:"})," stack:read, stack:schema:read"]}),(0,h.jsxs)("li",{children:[(0,h.jsx)("strong",{children:"Data import/export scripts:"})," stack:read, stack:write"]}),(0,h.jsxs)("li",{children:[(0,h.jsx)("strong",{children:"Full developer access:"})," all scopes above"]})]}),(0,h.jsx)("h3",{children:"Using a PAT in API Requests"}),(0,h.jsxs)("p",{children:["Include your token in the ",(0,h.jsx)("code",{children:"api_key"})," header of every API request. The base URL for all Stackby API calls is:"]}),(0,h.jsx)(y,{children:"https://stackby.com/api/betav1"}),(0,h.jsx)("h4",{children:"Authentication Header"}),(0,h.jsxs)("p",{children:["Pass your token in the ",(0,h.jsx)("code",{children:"api_key"})," request header:"]}),(0,h.jsx)(y,{children:"api_key: YOUR_PERSONAL_ACCESS_TOKEN"}),(0,h.jsx)("h4",{children:"Example: Fetch Rows from a Table (curl)"}),(0,h.jsx)(y,{children:'curl -X GET \\\n "https://stackby.com/api/betav1/rowlist/{stackId}/{tableId}?maxrowcount=50" \\\n -H "api_key: YOUR_PERSONAL_ACCESS_TOKEN" \\\n -H "Content-Type: application/json"'}),(0,h.jsx)("h4",{children:"Example: Create a Row (curl)"}),(0,h.jsx)(y,{children:'curl -X POST \\\n "https://stackby.com/api/betav1/rowlist/{stackId}/{tableId}" \\\n -H "api_key: YOUR_PERSONAL_ACCESS_TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{\n "data": [\n {\n "Name": "New Row",\n "Status": "Active",\n "Priority": "High"\n }\n ]\n }\''}),(0,h.jsx)("h4",{children:"Example: JavaScript (Node.js / fetch)"}),(0,h.jsx)(y,{language:"javascript",children:'const STACKBY_TOKEN = process.env.STACKBY_PAT;\nconst STACK_ID = \'stXXXXXXXXXX\';\nconst TABLE_ID = \'tbXXXXXXXXXX\';\n\nasync function getRows() {\n const res = await fetch(\n `https://stackby.com/api/betav1/rowlist/${STACK_ID}/${TABLE_ID}`,\n {\n headers: {\n "api_key": STACKBY_TOKEN,\n "Content-Type": "application/json",\n },\n }\n );\n if (!res.ok) throw new Error(`HTTP ${res.status}`);\n return res.json();\n}'}),(0,h.jsx)("h4",{children:"Example: Python (requests)"}),(0,h.jsx)(y,{language:"python",children:"import os, requests\n\nTOKEN = os.environ['STACKBY_PAT']\nSTACK_ID = '
2stXXXXXXXXXX'\nTABLE_ID = 'tbXXXXXXXXXX'\n\nheaders = {\n 'api_key': TOKEN,\n 'Content-Type': 'application/json',\n}\n\nr = requests.get(\n f'https://stackby.com/api/betav1/rowlist/{STACK_ID}/{TABLE_ID}',\n headers=headers,\n)\nr.raise_for_status()\nprint(r.json())"}),(0,h.jsx)("h3",{children:"Finding Your Stack ID and Table ID"}),(0,h.jsx)("p",{children:"Every API call requires a Stack ID and a Table ID. Both are available from the Stackby web interface."}),(0,h.jsx)("h4",{children:"Stack ID"}),(0,h.jsxs)("ol",{children:[(0,h.jsx)("li",{children:"Open the stack in your browser."}),(0,h.jsxs)("li",{children:["Look at the URL: ",(0,h.jsxs)("code",{children:["https://stackby.com/workspace/","{workspaceId}","/stack/","{stackId}"]})]}),(0,h.jsxs)("li",{children:["The ",(0,h.jsx)("code",{children:"stackId"})," segment (beginning with ",(0,h.jsx)("code",{children:"st"}),") is your Stack ID."]})]}),(0,h.jsx)("h4",{children:"Table ID"}),(0,h.jsxs)("ol",{children:[(0,h.jsx)("li",{children:"Select the table within the stack."}),(0,h.jsx)("li",{children:"The URL updates to include the table identifier."}),(0,h.jsxs)("li",{children:["The ",(0,h.jsx)("code",{children:"tableId"})," segment (beginning with ",(0,h.jsx)("code",{children:"tb"}),") is your Table ID."]})]}),(0,h.jsxs)(f,{type:"tip",children:["You can also retrieve a list of tables for a stack via the API: ",(0,h.jsxs)("code",{children:["GET /tablequery/","{stackId}"]})," returns all table IDs and names in a given stack."]}),(0,h.jsx)("h3",{children:"Managing Tokens"}),(0,h.jsx)("h4",{children:"Listing Your Tokens"}),(0,h.jsxs)("p",{children:["All tokens you have created are visible under ",(0,h.jsx)("strong",{children:"Settings â Builder Hub â Personal Access Tokens"}),". Each token shows its name, creation date, last-used date, and assigned scopes."]}),(0,h.jsx)("h4",{children:"Revoking a Token"}),(0,h.jsxs)("p",{children:["To revoke a token, navigate to ",(0,h.jsx)("strong",{children:"Settings â Builder Hub"}),", locate the token in the list, and click ",(0,h.jsx)("strong",{children:"Revoke"})," (or the trash icon). Revocation is immediate â any API requests using that token will return a ",(0,h.jsx)("code",{children:"401 Unauthorized"})," error."]}),(0,h.jsx)("h4",{children:"Revoke a token immediately if:"}),(0,h.jsxs)("ul",{children:[(0,h.jsx)("li",{children:"You suspect the token has been exposed or leaked."}),(0,h.jsx)("li",{children:"An employee or contractor with access to the token leaves your organisation."}),(0,h.jsx)("li",{children:"The integration using the token is decommissioned."})]}),(0,h.jsx)("h4",{children:"Rotating a Token"}),(0,h.jsx)("p",{children:"Stackby does not rotate tokens in place. To rotate, revoke the existing token and create a new one with the same scopes, then update the token value in all services that use it."}),(0,h.jsx)("h3",{children:"Security Best Practices"}),(0,h.jsxs)("ul",{children:[(0,h.jsxs)("li",{children:[(0,h.jsx)("strong",{children:"Never hardcode tokens in source code."})," Use environment variables (e.g., ",(0,h.jsx)("code",{children:"STACKBY_PAT"}),") or a secrets manager."]}),(0,h.jsxs)("li",{children:[(0,h.jsx)("strong",{children:"Never commit tokens to version control."})," Add secret scanning to your CI pipeline."]}),(0,h.jsxs)("li",{children:[(0,h.jsx)("strong",{children:"Use the narrowest scope possible."})," If your script only reads rows, grant ",(0,h.jsx)("code",{children:"stack:read"})," only."]}),(0,h.jsxs)("li",{children:[(0,h.jsx)("strong",{children:"Create separate tokens for separate integrations."})," This limits blast radius if a token is compromised."]}),(0,h.jsxs)("li",{children:[(0,h.jsx)("strong",{children:"Set a descriptive name per token"})," so you know which system uses it when auditing."]}),(0,h.jsxs)("li",{children:[(0,h.jsx)("strong",{children:"Audit token usage regularly"})," in Settings â Builder Hub. Revoke any unused tokens."]}),(0,h.jsxs)("li",{children:[(0,h.jsx)("strong",{children:"Treat tokens like passwords:"})," never paste them into chat, email, or Slack."]})]})]}),"oauth-integrations-guide":(0,h.jsxs)("div",{children:[(0,h.jsx)("h3",{children:"OAuth integrations"}),(0,h.jsx)("p",{children:"OAuth integrations allow you to register with Stackby so that users may grant you the ability to access Stackby's API on their behalf via the OAuth grant flow."}),(0,h.jsx)("br",{}),(0,h.jsxs)("p",{children:["If you are building an Stackby integration for your product or for many different users that needs to use the Stackby API on behalf of those users, you will need to create an OAuth
2integration. This guide will walk you through how to create your OAuth integration. For full reference on how to authorize via OAuth, please see our ",(0,h.jsx)("a",{href:"/developers/web/api/authentication/oauth-20-integration",children:"OAuth reference"}),"."]}),(0,h.jsx)("h3",{children:"Registering a new integration"}),(0,h.jsxs)("p",{children:["You can access the OAuth integrations panel at ",(0,h.jsx)("code",{children:(0,h.jsx)("a",{href:"/create/oauth",children:"/create/oauth"})}),". From here you can register new integrations, and see a summary of previously created integrations and their possible scopes."]}),(0,h.jsx)("p",{children:"Click the 'Register new OAuth integration' button to create a new OAuth integration."}),(0,h.jsx)("p",{children:"Give your integration a unique name and register a valid redirect URL and click 'Register integration'. You will be able to change these later. For more details on how we validate the redirect URL, see its section in the OAuth reference."}),(0,h.jsx)("h3",{children:"OAuth integration properties"}),(0,h.jsx)("p",{children:"After navigating to an existing OAuth integration's management page, you can edit the various properties of your integration."}),(0,h.jsx)("br",{}),(0,h.jsx)("p",{children:'When you are satisfied with your changes, you can click the "Save changes" button at the bottom of the page.'}),(0,h.jsx)("br",{}),(0,h.jsx)("p",{children:"Most properties are optional, but note that the Privacy policy URL and Terms of service URL must be provided before sharing your OAuth integration with other users - if you have not provided them, other users will not be able to authorize your integration."}),(0,h.jsx)("br",{}),(0,h.jsx)("p",{children:"All of these fields will be visible to users when they authorize your integration."}),(0,h.jsx)(b,{headers:["Property","Description"],rows:[["Name","The name of your integration."],["OAuth redirect URI","A URI you control for use in the OAuth authorization flow. See the reference documentation for more details."],["Permission scopes","The actions that your integration can take on behalf of a user. See the Scopes reference for a full list of possible scopes."],["Tagline (optional)","A brief description of what your integration does."],["Homepage URL (optional)","URL of your website or homepage."],["Logo (optional)","Your logo. Visible to users when authorizing your integration."],["Support email (optional)","A support email where users may reach you."],["Privacy policy URL (required to share integration)","Your service's privacy policy."],["Terms of service URL (required to share integration)","Your service's TOS."]]}),(0,h.jsx)("h3",{children:"Previewing the user authorization dialog"}),(0,h.jsx)("p",{children:"When managing your OAuth integration, you can preview what the user authorization dialog will look like after adding at least one scope to your integration."}),(0,h.jsx)("h3",{children:"Updating your client secret"}),(0,h.jsx)("p",{children:"A client secret is an optional private key that authenticates your integration when requesting an OAuth token. You should generate a client secret if you will be issuing token requests from a server."}),(0,h.jsx)("br",{}),(0,h.jsx)("p",{children:'To generate a client secret, navigate to your integration\'s management page and click "Generate client secret".'}),(0,h.jsx)(f,{type:"warning",children:"Note that generating a client secret is potentially a breaking change: if you are already sending existing authorization requests, they will fail until you start sending this client secret. We ask you to confirm your decision to verify that this is ok."}),(0,h.jsx)("p",{children:'If you click "Generate", a client secret will be generated.'}),(0,h.jsx)("br",{}),(0,h.jsx)("p",{children:'You will be unable to click "done" until you copy the client secret. Note that the client secret is not recoverable, as Stackby does not store a copy of your client secret. If you forget or misplace it, you can click "Regenerate client secret" to create a new one.'}),(0,h.jsx)("br",{}),(0,h.jsx)("p",{children:"Once your client secret is generated, you may also delete or regenerate your client secret at any time."}),(0,h.jsx)("h3",{children:"Building your integration"}),(0,h.jsx)("p",{children:"You can view our OAuth reference for more details about how to construct an authorization request. The OAuth.net Getting Started guide is a good general resource about the OAuth protocol."}),(0,h.jsx)("p",{children:"If you feel ready to jump into some code, you can check out our example setup repo here."}),(0,h.jsx)("h3",{children:"Making API requests"}),(0,h.jsxs)("p",{children:["The OAuth access tokens you receive should be passed with your API requests as a ",(0,h.jsx)("code",{children:"Authorization: Bearer"})," header."]}),(0,h.jsx)("br",{}),(0,h.jsx)("p",{children:"Refer to the authentication reference page for more details."}),(0,h.jsx)("br",{}),(0,h.jsx)("p",{children:"The token will only be able to access endpoints corresponding to the scopes granted to it, and the bases that the user has granted to it. These may change at any time (e.g. the user could add an additional base, or revoke access to one). Use the list bases endpoint to list the bases that the token has access to, and the get userId and scopes endpoint to list the token's scopes."}),(0,h.jsx)("br",{}),(0,h.jsx)("p",{children:"OAuth access tokens can be used to make requests to most public Stackby API endpoints (assuming that the corresponding scopes have been requested) including endpoints that were previously limited in availability such as the Metadata API and Enterprise API endpoints."}),(0,h.jsx)(f,{type:"warning",children:"Note: OAuth access and refresh tokens should be treated as opaque, variable-length strings. In particular, do not rely on tokens having a particular length or format. Changes to the token format (for newly created tokens) are not considered to be breaking changes."}),(0,h.jsx)("h3",{children:"Distributing your integration"}),(0,h.jsxs)("p",{children:["After your integration has been built, the last step is to add a supp
2ort email, privacy policy, and terms of service to your integration (via the management page at ",(0,h.jsx)("code",{children:(0,h.jsx)("a",{href:"/create/oauth",children:"/create/oauth"})}),"). This will enable other users to authorize your integration."]})]})};function T(e){return T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},T(e)}function I(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function A(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?I(Object(n),!0).forEach(function(t){S(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function S(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=T(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=T(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==T(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function R(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,s,i,a,o=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(o.push(r.value),o.length!==t);l=!0);}catch(e){c=!0,s=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw s}}return o}}(e,t)||_(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(e,t){if(e){if("string"==typeof e)return E(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?E(e,t):void 0}}function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var C=function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,s=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=_(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,s=function(){};return{s,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw i}}}}(t);try{for(s.s();!(n=s.n()).done;){var i,a=n.value;if(a.path===e)return{item:a,parent:r};if(null!==(i=a.children)&&void 0!==i&&i.length){var o=C(e,a.children,a);if(o)return o}}}catch(e){s.e(e)}finally{s.f()}return null};const D=function(){var e=(0,i.zy)(),t=(0,i.Zp)(),n=R((0,r.useState)(!1),2),d=n[0],u=n[1],p=R((0,r.useState)("reference"),2),x=p[0],j=p[1],m=R((0,r.useState)(null),2),y=m[0],b=m[1],f=R((0,r.useState)(null),2),T=f[0],I=f[1],_=R((0,r.useState)({}),2),E=_[0],D=_[1],P=R((0,r.useState)(!1),2),O=P[0],N=P[1];(0,r.useEffect)(function(){var t=e.pathname.toLowerCase();if(t.includes("/web/api")){var n;u(!0),j("reference");var r=R((null!==(n=t.split("/web/api/")[1])&&void 0!==n?n:"").split("/"),2),s=r[0],i=r[1],a=k.reference,o=s?a.find(function(e){return e.path===s}):null;if(o){var l,c,d;b(o),D(function(e){return A(A({},e),{},S({},o.path,!0))});var h=i&&o.children&&null!==(l=o.children.find(function(e){return e.path===i}))&&void 0!==l?l:null;I(null!==(c=null!=h?h:null===(d=o.children)||void 0===d?void 0:d[0])&&void 0!==c?c:null)}else{var p=s?C(s,a):null;null!=p&&p.parent?(b(p.parent),I(p.item),D(function(e){return A(A({},e),{},S({},p.parent.path,!0))})):(b(a[0]),I(null))}}else if(t.includes("/web/guides")){var x,m;u(!0),j("guides");var y=null!==(x=t.split("/web/guides/")[1])&&void 0!==x?x:"",f=null!==(m=k.guides.find(function(e){return e.path===y}))&&void 0!==m?m:k.guides[0];b(f),I(null)}else u(!1)},[e.pathname]);var L,q,U,B,K,Y=(0,r.useMemo)(function(){return"reference"===x?"/developers/web/api":"/developers/web/guides"},[x]),F=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=n?"".concat(Y,"/").concat(e.path,"/").concat(n.path):"".concat(Y,"/").concat(e.path);t(r)},H=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=window.innerWidth<=768;if(e.isParent){var r,s;D(function(t){return A(A({},t),{},S({},e.path,!t[e.path]))});var i=null!==(r=null===(s=e.children)||void 0===s?void 0:s[0])&&void 0!==r?r:null;b(e),n||(I(i),F(e,i))}else t?(b(t),I(e),D(function(e){return A(A({},e),{},S({},t.path,!0))}),F(t,e),n&&N(!1)):(b(e),I(null),F(e),n&&N(!1))},G=function(e){if(j(e),"reference"===e){var n=k.reference[0];b(n),I(null),t("/developers/web/api/getting-started")}else{var r=k.guides[0];b(r),I(null),t("/developers/web/guides/introduction")}},X=function(e){var n=e.item;return(0,h.jsxs)("div",{className:"developer-card",children:[(0,h.jsx)("div",{className:"developer-card__image",children:(0,h.jsx)("img",{src:n.image,alt:n.title})}),(0,h.jsxs)("div",{className:"developer-card__content",children:[(0,h.jsx)("h2",{children:n.title}),(0,h.jsx)("p",{children:n.description}),(0,h.jsxs)("a",{href:"/",onClick:function(e){e.preventDefault(),"API docs"===n.link&&(u(!0),j("reference"),b(k.reference[0]),I(null),t("/developers/web/api/getting-started"))},children:[(0,h.jsx)("span",{children:n.link}),(0,h.jsx)(a.X6T,{size:13})]})]})]})};if(d){var M,V,W=null!==(M=null!==(V=null==T?void 0:T.title)&&void 0!==V?V:null==y?void 0:y.title)&&void 0!==M?M:"API Documentation",z="reference"===x?k.reference:k.guides;return(0,h.jsxs)("div",{className:"api-page",children:[(0,h.jsxs)("header",{className:"api-header",children:[(0,h.jsxs)("div",{className:"api-header-left",children:[(0,h.jsxs)("div",{className:"api-logo",onClick:function(){u(!1),t("/developers")},children:[(0,h.jsx)("img",{src:o,alt:"Stackby logo"}),(0,h.jsx)("span",{className:"api-logo-text",children:"Developers"})]}),(0,h.jsxs)("nav",{className:"api-nav",children:[(0,h.jsx)("span",{className:"reference"===x?"active":"",onClick:function(){return G("reference")},children:"API REFERENCE"}),(0,h.jsx)("span",{className:"guides"===x?"active":"",onClick:function(){return G("guides")},children:"GUIDES"})]})]}),(0,h.jsxs)("div",{className:"api-header-right",children:[(0,h.jsx)("button",{className:"sidebar-toggle-btn",onClick:function(){return N(function(e){return!e})},"aria-label":"Toggle sidebar",children:(0,h.jsx)(c.Znj,{})}),(0,h.jsx)("div",{className:"search-box",children:(0,h.jsx)("input",{type:"text",placeholder:"Search API reference..."})})]})]}),(0,h.jsxs)("div",{className:"api-layout",children:[(0,h.jsx)("aside",{className:"Webapi-sidebar".concat(O?" open":""),children:(K=z,K.map(function(e){var t,n=(null==y?void 0:y.path)===e.path,r=!!E[e.path];return(0,h.jsxs)(s().Fragment,{children:[(0,h.jsxs)("div",{className:["sidebar-item","level-0",n&&!T?"active":"",n&&T?"parent-active":"",e.isParent?"has-children":""].filter(
2Boolean).join(" "),onClick:function(){return H(e)},style:{paddingLeft:16},children:[(0,h.jsx)("span",{className:"sidebar-item-title",children:e.title}),e.isParent&&(0,h.jsx)("span",{className:"chevron",children:r?(0,h.jsx)(a.Vr3,{size:12}):(0,h.jsx)(a.X6T,{size:12})})]}),e.isParent&&r&&(null===(t=e.children)||void 0===t?void 0:t.map(function(t){return(0,h.jsx)("div",{className:["sidebar-item","level-1",(null==T?void 0:T.path)===t.path?"active":""].filter(Boolean).join(" "),onClick:function(){return H(t,e)},style:{paddingLeft:32},children:(0,h.jsx)("span",{className:"sidebar-item-title",children:t.title})},t.path)}))]},e.path)}))}),(0,h.jsx)("div",{className:"sidebar-overlay".concat(O?" visible":""),onClick:function(){return N(!1)}}),(0,h.jsxs)("main",{className:"api-content",children:[(0,h.jsx)("span",{className:"guide-label",children:"guides"===x?"GUIDE":"REFERENCE"}),(0,h.jsx)("h1",{children:W}),(B=null!==(L=null==T?void 0:T.path)&&void 0!==L?L:null==y?void 0:y.path,B?"reference"===x?null!==(U=w[B])&&void 0!==U?U:(0,h.jsx)("p",{children:"Content coming soon."}):null!==(q=v[B])&&void 0!==q?q:(0,h.jsx)("p",{children:"Content coming soon."}):(0,h.jsx)("p",{children:"Select a topic from the sidebar."}))]})]})]})}return(0,h.jsxs)("div",{className:"developer-page",children:[(0,h.jsx)("header",{className:"developer-header",children:(0,h.jsxs)("div",{className:"developer-logo",children:[(0,h.jsx)("img",{src:o,alt:"Stackby logo"}),(0,h.jsx)("span",{children:"Developers"})]})}),(0,h.jsxs)("section",{className:"developer-hero",children:[(0,h.jsxs)("div",{className:"hero-text",children:[(0,h.jsx)("h1",{children:"Welcome, developers!"}),(0,h.jsx)("p",{children:"Build on Stackby to create the perfect tool for your team."})]}),(0,h.jsx)("div",{className:"hero-graphic",children:(0,h.jsx)("img",{src:"https://stackbybucketprod.s3.ap-southeast-1.amazonaws.com/abstract_geometric_1.png",alt:"Hero"})})]}),(0,h.jsx)("section",{className:"developer-grid",children:g.map(function(e){return(0,h.jsx)(X,{item:e},e.title)})}),(0,h.jsxs)("footer",{className:"developer-footer",children:[(0,h.jsx)("div",{className:"footer-left",children:(0,h.jsx)("img",{src:l,alt:"Stackby logo"})}),(0,h.jsxs)("div",{className:"footer-right",children:[(0,h.jsx)("span",{children:"© Stackby"}),(0,h.jsx)("a",{href:"/tos",children:"Terms"}),(0,h.jsx)("a",{href:"/privacy",children:"Privacy"})]})]})]})}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.