The SDK is a single script served from sdk.usehasp.com. It defines a global HaspSDK class. Every release is published under two kinds of URL — pick one based on how much change you want to absorb automatically.
Pinned
Floating
URL
https://sdk.usehasp.com/hasp-sdk.<version>.js
https://sdk.usehasp.com/v1.js
Contents
One exact release, forever
The latest 1.x release
Caching
public, max-age=31536000, immutable — cached for a year, never revalidated
public, max-age=300, stale-while-revalidate=86400 — fixes reach your app within about 5 minutes
Pin an exact version and add its integrity hash. The browser refuses to run the script if a single byte differs from what you pinned, so a compromised or misconfigured CDN cannot change the code running next to your users’ data — and nothing changes in your app until you change the tag.
<script src="https://sdk.usehasp.com/hasp-sdk.1.1.0.js" integrity="sha384-…" crossorigin="anonymous"></script><script> const sdk = new HaspSDK();</script>
crossorigin="anonymous" is required: browsers only check integrity on cross-origin scripts fetched with CORS.Get the current version and its integrity value from the release manifest (the values in these examples are illustrative — always copy them from the manifest):
Use files.versioned as the file name and integrity as the attribute value. files.hashed names the same bytes by content hash, if you prefer content-addressed URLs. A published version is never modified: a fix ships as a new version, so upgrading is a deliberate change to the version and integrity in your tag.You can confirm which build a page loaded with HaspSDK.version.
<script src="https://sdk.usehasp.com/v1.js"></script><script> const sdk = new HaspSDK();</script>
v1.js always serves the latest 1.x release. Releases on the v1 channel never remove or rename anything, so your code keeps working; you receive fixes and additions within about 5 minutes without editing your app. Don’t add integrity to this URL — the next release would stop your app from loading.
Always use the full CDN URL. Never use a relative path like /sdk/v1.js.
The SDK is a classic script, not an ES module — import HaspSDK from '…/v1.js' does not work. Load it with a <script> tag before your module code, then use the global:
<script src="https://sdk.usehasp.com/hasp-sdk.1.1.0.js" integrity="sha384-…" crossorigin="anonymous"></script><script type="module"> const sdk = new window.HaspSDK();</script>
The SDK wraps the Data API; every SDK method maps to a Data API endpoint.
const sdk = new HaspSDK({ // All options are optional — defaults work for most apps. appId: undefined, // Auto-detected from window.__HASP__ — never set this manually baseUrl: '/api/hasp/v1', // Data API base path — do not change (exposed for testing environments only) onUnauthorized: () => { // Called on 401. Default: redirect to the runtime sign-in page. // Override to save draft state before redirecting. }, onMaintenanceStart: (status) => { // Called with { status, message?, estimatedSeconds? } when maintenance begins. }, onMaintenanceEnd: () => { // Called when maintenance ends (any request succeeds after a 503). }, retry: { maxRetries: 3, // Retries for 429/502 (default: 3) baseDelayMs: 500, // Base delay before first retry (default: 500ms) },});
The SDK reads appId from window.__HASP__.appId, which is injected by HASP when your app is served. You never set this yourself. If appId cannot be resolved, the constructor throws immediately with ErrorCode.MissingAppId.
429 Rate Limited — respects Retry-After header if present (integer seconds or HTTP-date)
502 Bad Gateway — network infrastructure hiccups
Network failures (device offline, DNS failure) — for GET and single-record DELETE only (idempotent)
POST, PATCH, and bulk DELETE are not retried on network failure to avoid double-writes. Single-record DELETE is retried because it is idempotent.503 Maintenance is never retried — the SDK enters maintenance mode immediately.
Call destroy() when your app unmounts to abort all in-flight requests and clear event handlers:
sdk.destroy();
Pending promises reject with an AbortError. After destroy(), maintenance event handlers are also cleared.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"HASP","colors":{"primary":"#0EA5E9","light":"#38BDF8","dark":"#0369A1"},"logo":{"light":"https://mintcdn.com/workapps/0CUJixHMbM2i7Uxm/logo/light.svg?fit=max\u0026auto=format\u0026n=0CUJixHMbM2i7Uxm\u0026q=85\u0026s=ec1dbeb022fb6132da3624b1705c42c1","dark":"https://mintcdn.com/workapps/0CUJixHMbM2i7Uxm/logo/dark.svg?fit=max\u0026auto=format\u0026n=0CUJixHMbM2i7Uxm\u0026q=85\u0026s=1d00328b497b04c805590ee7be1aed39"},"favicon":"https://mintcdn.com/workapps/0CUJixHMbM2i7Uxm/favicon.svg?fit=max\u0026auto=format\u0026n=0CUJixHMbM2i7Uxm\u0026q=85\u0026s=04809a8e26ea35a1e8acb7d9bb2d8e97","integrations":{"fathom":{"siteId":"ZMRUNVZJ"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"workapps","hasAudioNarration":false,"actualSubdomain":"workapps","customDomains":["docs.usehasp.com"],"gitSource":{"type":"github","owner":"charity-wages","repo":"hasp-monorepo","deployBranch":"staging","contentDirectory":"apps/docs-site","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6aeb30b91ffad441390190e6","collectionId":"367fc5e9-abec-4e40-b446-dfab9c39a114","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6aeb30b91ffad441390190e6"},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6aedea93af0db5f4a249065f","clientVersion":"0.0.4074","searchFilterCounts":[{"language":"default","tag":"AI API","count":159},{"language":"default","tag":"Endpoints","count":132},{"language":"default","tag":"App Builder SDK","count":22},{"language":"default","tag":"AI Studio","count":18},{"language":"default","tag":"Platform","count":16},{"language":"default","tag":"Data API","count":15},{"language":"default","tag":"Control Plane","count":12},{"language":"default","tag":"Reference","count":12},{"language":"default","tag":"Agents","count":11},{"language":"default","tag":"Concepts","count":10}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"app-builder/sdk/initialization","slug":"/app-builder/sdk/initialization","pageMetadata":{"title":"SDK Initialization","description":"Loading the HASP JS SDK, constructor options, retry behavior, and cleanup.","href":"/app-builder/sdk/initialization"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Loading the HASP JS SDK, constructor options, retry behavior, and cleanup.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`loading-the-sdk`,children:`Loading the SDK`}),`\n`,_jsxs(_components.p,{children:[`The SDK is a single script served from `,_jsx(_components.code,{children:`sdk.usehasp.com`}),`. It defines a global `,_jsx(_components.code,{children:`HaspSDK`}),` class. Every release is published under two kinds of URL — pick one based on how much change you want to absorb automatically.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{}),_jsx(_components.th,{children:`Pinned`}),_jsx(_components.th,{children:`Floating`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`URL`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`https://sdk.usehasp.com/hasp-sdk.\u003cversion>.js`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`https://sdk.usehasp.com/v1.js`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Contents`}),_jsx(_components.td,{children:`One exact release, forever`}),_jsxs(_components.td,{children:[`The latest `,_jsx(_components.code,{children:`1.x`}),` release`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Caching`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`public, max-age=31536000, immutable`}),` — cached for a year, never revalidated`]}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`public, max-age=300, stale-while-revalidate=86400`}),` — fixes reach your app within about 5 minutes`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Subresource Integrity`}),_jsx(_components.td,{children:`Yes — the bytes never change`}),_jsx(_components.td,{children:`No — the bytes change with each release`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Use for`}),_jsx(_components.td,{children:`Production and regulated deployments`}),_jsx(_components.td,{children:`Prototypes and internal tools`})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`pinned-+-integrity-production`,children:`Pinned + integrity (production)`}),`\n`,_jsxs(_components.p,{children:[`Pin an exact version and add its `,_jsx(_components.code,{children:`integrity`}),` hash. The browser refuses to run the script if a single byte differs from what you pinned, so a compromised or misconfigured CDN cannot change the code running next to your users’ data — and nothing changes in your app until you change the tag.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`html`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`html`,children:_jsxs(_components.code,{language:`html`,numberOfLines:`8`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`script`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` src`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://sdk.usehasp.com/hasp-sdk.1.1.0.js\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` integrity`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"sha384-…\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` crossorigin`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"anonymous\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`script`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`script`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` sdk`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` HaspSDK`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`script`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`crossorigin=\"anonymous\"`}),` is required: browsers only check integrity on cross-origin scripts fetched with CORS.`]}),`\n`,_jsx(_components.p,{children:`Get the current version and its integrity value from the release manifest (the values in these examples are illustrative — always copy them from the manifest):`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -s`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://sdk.usehasp.com/v1.manifest.json`})]}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`10`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"version\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"1.1.0\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"integrity\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"sha384-…\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"files\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"floating\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"v1.js\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"versioned\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"hasp-sdk.1.1.0.js\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"hashed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"hasp-sdk.\u003ccontenthash>.js\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"manifest\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"v1.manifest.json\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Use `,_jsx(_components.code,{children:`files.versioned`}),` as the file name and `,_jsx(_components.code,{children:`integrity`}),` as the attribute value. `,_jsx(_components.code,{children:`files.hashed`}),` names the same bytes by content hash, if you prefer content-addressed URLs. A published version is never modified: a fix ships as a new version, so upgrading is a deliberate change to the version and integrity in your tag.`]}),`\n`,_jsxs(_components.p,{children:[`You can confirm which build a page loaded with `,_jsx(_components.code,{children:`HaspSDK.version`}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`floating-prototypes`,children:`Floating (prototypes)`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`html`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`html`,children:_jsxs(_components.code,{language:`html`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`script`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` src`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://sdk.usehasp.com/v1.js\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`script`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`script`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` sdk`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` HaspSDK`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`script`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`v1.js`}),` always serves the latest `,_jsx(_components.code,{children:`1.x`}),` release. Releases on the `,_jsx(_components.code,{children:`v1`}),` channel never remove or rename anything, so your code keeps working; you receive fixes and additions within about 5 minutes without editing your app. Don’t add `,_jsx(_components.code,{children:`integrity`}),` to this URL — the next release would stop your app from loading.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Always use the full CDN URL. Never use a relative path like `,_jsx(_components.code,{children:`/sdk/v1.js`}),`.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`es-modules`,children:`ES modules`}),`\n`,_jsxs(_components.p,{children:[`The SDK is a classic script, not an ES module — `,_jsx(_components.code,{children:`import HaspSDK from '…/v1.js'`}),` does not work. Load it with a `,_jsx(_components.code,{children:`\u003cscript>`}),` tag before your module code, then use the global:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`html`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`html`,children:_jsxs(_components.code,{language:`html`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`script`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` src`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://sdk.usehasp.com/hasp-sdk.1.1.0.js\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` integrity`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"sha384-…\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` crossorigin`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"anonymous\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`script`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`script`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"module\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` sdk`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` window`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`HaspSDK`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`script`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The SDK wraps the `,_jsx(_components.a,{href:`/data-api/overview`,children:`Data API`}),`; every SDK method maps to a Data API endpoint.`]}),`\n`,_jsx(Heading,{level:`2`,id:`constructor-options`,children:`Constructor Options`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`24`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`24`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` sdk`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` HaspSDK`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // All options are optional — defaults work for most apps.`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` appId:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` undefined`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Auto-detected from window.__HASP__ — never set this manually`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` baseUrl:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '/api/hasp/v1'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Data API base path — do not change (exposed for testing environments only)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` onUnauthorized`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` () `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Called on 401. Default: redirect to the runtime sign-in page.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Override to save draft state before redirecting.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` onMaintenanceStart`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`status`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Called with { status, message?, estimatedSeconds? } when maintenance begins.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` onMaintenanceEnd`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` () `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Called when maintenance ends (any request succeeds after a 503).`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` retry:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` maxRetries:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 3`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Retries for 429/502 (default: 3)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` baseDelayMs:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 500`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Base delay before first retry (default: 500ms)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})}),`\n`,_jsxs(Heading,{level:`2`,id:`how-appid-is-resolved`,children:[`How `,_jsx(_components.code,{children:`appId`}),` is Resolved`]}),`\n`,_jsxs(_components.p,{children:[`The SDK reads `,_jsx(_components.code,{children:`appId`}),` from `,_jsx(_components.code,{children:`window.__HASP__.appId`}),`, which is injected by HASP when your app is served. You never set this yourself. If `,_jsx(_components.code,{children:`appId`}),` cannot be resolved, the constructor throws immediately with `,_jsx(_components.code,{children:`ErrorCode.MissingAppId`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`retry-behavior`,children:`Retry Behavior`}),`\n`,_jsx(_components.p,{children:`The SDK retries automatically for:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`429 Rate Limited`}),` — respects `,_jsx(_components.code,{children:`Retry-After`}),` header if present (integer seconds or HTTP-date)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`502 Bad Gateway`}),` — network infrastructure hiccups`]}),`\n`,_jsxs(_components.li,{children:[`Network failures (device offline, DNS failure) — for `,_jsx(_components.code,{children:`GET`}),` and single-record `,_jsx(_components.code,{children:`DELETE`}),` only (idempotent)`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`POST`}),`, `,_jsx(_components.code,{children:`PATCH`}),`, and bulk `,_jsx(_components.code,{children:`DELETE`}),` are `,_jsx(_components.strong,{children:`not`}),` retried on network failure to avoid double-writes. Single-record `,_jsx(_components.code,{children:`DELETE`}),` is retried because it is idempotent.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`503 Maintenance`}),` is never retried — the SDK enters maintenance mode immediately.`]}),`\n`,_jsx(Heading,{level:`2`,id:`cleanup`,children:`Cleanup`}),`\n`,_jsxs(_components.p,{children:[`Call `,_jsx(_components.code,{children:`destroy()`}),` when your app unmounts to abort all in-flight requests and clear event handlers:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`sdk`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`destroy`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Pending promises reject with an `,_jsx(_components.code,{children:`AbortError`}),`. After `,_jsx(_components.code,{children:`destroy()`}),`, maintenance event handlers are also cleared.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"SDK Initialization","description":"Loading the HASP JS SDK, constructor options, retry behavior, and cleanup.","href":"/app-builder/sdk/initialization"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Loading the SDK","slug":"loading-the-sdk","depth":2,"children":[{"title":"Pinned + integrity (production)","slug":"pinned-+-integrity-production","depth":3,"children":[]},{"title":"Floating (prototypes)","slug":"floating-prototypes","depth":3,"children":[]},{"title":"ES modules","slug":"es-modules","depth":3,"children":[]}]},{"title":"Constructor Options","slug":"constructor-options","depth":2,"children":[]},{"title":"How appId is Resolved","slug":"how-appid-is-resolved","depth":2,"children":[]},{"title":"Retry Behavior","slug":"retry-behavior","depth":2,"children":[]},{"title":"Cleanup","slug":"cleanup","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"workapps","siteName":"HASP","title":"SDK Initialization - HASP","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-09T23:48:23.810Z","originalFileLocation":"app-builder/sdk/initialization.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Loading the HASP JS SDK, constructor options, retry behavior, and cleanup.\">\u003cmeta data-mint-head name=\"application-name\" content=\"HASP\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/workapps/kP-rXhixNqC1D8jR/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/workapps/kP-rXhixNqC1D8jR/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/workapps/kP-rXhixNqC1D8jR/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/workapps/kP-rXhixNqC1D8jR/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/workapps/kP-rXhixNqC1D8jR/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/workapps/kP-rXhixNqC1D8jR/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/workapps/kP-rXhixNqC1D8jR/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/workapps/kP-rXhixNqC1D8jR/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/workapps/kP-rXhixNqC1D8jR/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"SDK Initialization - HASP\">\u003cmeta data-mint-head property=\"og:description\" content=\"Loading the HASP JS SDK, constructor options, retry behavior, and cleanup.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"HASP\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.usehasp.com/app-builder/sdk/initialization\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://workapps.mintlify.site/_mintlify/api/og/v2?division=SDK\u0026amp;title=SDK+Initialization\u0026amp;description=Loading+the+HASP+JS+SDK%2C+constructor+options%2C+retry+behavior%2C+and+cleanup.\u0026amp;theme=262f935bc2f41b10b1c70bfe\u0026amp;signature=2c3e97c2d415bfd1b6121bd5c13327f07d14a1bd72f0ab019b5772ff21ce0963\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"SDK Initialization - HASP\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Loading the HASP JS SDK, constructor options, retry behavior, and cleanup.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://workapps.mintlify.site/_mintlify/api/og/v2?division=SDK\u0026amp;title=SDK+Initialization\u0026amp;description=Loading+the+HASP+JS+SDK%2C+constructor+options%2C+retry+behavior%2C+and+cleanup.\u0026amp;theme=262f935bc2f41b10b1c70bfe\u0026amp;signature=2c3e97c2d415bfd1b6121bd5c13327f07d14a1bd72f0ab019b5772ff21ce0963\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/workapps/kP-rXhixNqC1D8jR/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"HASP\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0EA5E9\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.usehasp.com/app-builder/sdk/initialization\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/app-builder/sdk/initialization.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.usehasp.com/#organization\",\"name\":\"HASP\",\"url\":\"https://docs.usehasp.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/workapps/0CUJixHMbM2i7Uxm/logo/light.svg?fit=max\u0026auto=format\u0026n=0CUJixHMbM2i7Uxm\u0026q=85\u0026s=ec1dbeb022fb6132da3624b1705c42c1\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.usehasp.com#website\",\"name\":\"HASP\",\"url\":\"https://docs.usehasp.com\",\"publisher\":{\"@id\":\"https://docs.usehasp.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.usehasp.com/app-builder/sdk/initialization#webpage\",\"url\":\"https://docs.usehasp.com/app-builder/sdk/initialization\",\"name\":\"SDK Initialization\",\"description\":\"Loading the HASP JS SDK, constructor options, retry behavior, and cleanup.\",\"dateModified\":\"2026-10-09T23:48:23.810Z\",\"isPartOf\":{\"@id\":\"https://docs.usehasp.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.usehasp.com/app-builder/sdk/initialization#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.usehasp.com/app-builder/sdk/initialization#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"App Builder SDK\",\"item\":\"https://docs.usehasp.com/app-builder/getting-started\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SDK Initialization\",\"item\":\"https://docs.usehasp.com/app-builder/sdk/initialization\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.usehasp.com/app-builder/sdk/initialization#article\",\"headline\":\"SDK Initialization\",\"name\":\"SDK Initialization\",\"description\":\"Loading the HASP JS SDK, constructor options, retry behavior, and cleanup.\",\"url\":\"https://docs.usehasp.com/app-builder/sdk/initialization\",\"mainEntityOfPage\":{\"@id\":\"https://docs.usehasp.com/app-builder/sdk/initialization#webpage\"},\"dateModified\":\"2026-10-09T23:48:23.810Z\",\"publisher\":{\"@id\":\"https://docs.usehasp.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.usehasp.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"HASP\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"HASP","nav":{"global":null,"groups":[{"group":"AI Studio","pages":[{"title":"Getting Started with AI Studio","href":"/studio/quickstart"},{"title":"Project Model","href":"/studio/projects"},{"title":"Apps Authoring","href":"/studio/apps"},{"title":"Workflow Authoring","href":"/studio/workflows"},{"title":"Entities","href":"/studio/entities"},{"title":"Integrations","href":"/studio/integrations"},{"title":"Webhooks","href":"/studio/webhooks"},{"title":"Trace \u0026 Replay","href":"/studio/trace-replay"},{"title":"Release \u0026 Sandbox","href":"/studio/release-sandbox"},{"title":"Dashboards","href":"/studio/dashboards"},{"title":"Settings","href":"/studio/settings"},{"title":"Compliance \u0026 Audit","href":"/studio/compliance-audit"},{"title":"A2A Protocol","href":"/studio/a2a-protocol"},{"title":"API Reference","href":"/studio/api-reference"},{"group":"Examples","pages":[{"title":"Example: Patient Intake \u0026 Triage","href":"/studio/examples/patient-intake"},{"title":"Example: Multi-Agent Care Coordination","href":"/studio/examples/care-coordination"},{"title":"Example: Scheduled Compliance Scan","href":"/studio/examples/compliance-scan"},{"title":"Example: Referral Routing \u0026 Follow-Up","href":"/studio/examples/referral-routing"}]}]},{"group":"Platform","pages":[{"title":"Platform Overview","href":"/platform/overview"},{"title":"Assistant","href":"/platform/assistant"},{"title":"Compliance Posture","href":"/platform/compliance-posture"},{"title":"BAA Structure","href":"/platform/baa-structure"},{"title":"Audit Chain","href":"/platform/audit-chain"},{"title":"Error Handling","href":"/platform/error-handling"},{"title":"Rate Limits","href":"/platform/rate-limits"},{"title":"Setting up alert destinations","href":"/platform/alert-destinations"},{"title":"Knowledge Base \u0026 RAG","href":"/platform/knowledge-base"},{"group":"OAuth \u0026 Applications","pages":[{"title":"OAuth 2.1 Quickstart","href":"/platform/oauth/quickstart"},{"title":"PKCE (Proof Key for Code Exchange)","href":"/platform/oauth/pkce"},{"title":"Consent Screen","href":"/platform/oauth/consent-screen"},{"title":"Token Introspection","href":"/platform/oauth/introspection"},{"title":"Discovery \u0026 Metadata","href":"/platform/oauth/discovery"},{"title":"Device Authorization","href":"/platform/oauth/device-authorization"},{"title":"OAuth FAQ","href":"/platform/oauth/faq"}]}]},{"group":"AI API","pages":[{"title":"Quickstart","href":"/ai-api/quickstart"},{"title":"Authentication","href":"/ai-api/authentication"},{"group":"Concepts","pages":[{"title":"PHI Guard","href":"/ai-api/concepts/phi-guard"},{"title":"Identifier Contract","href":"/ai-api/concepts/identifiers"},{"title":"BAA Gating","href":"/ai-api/concepts/baa-gating"},{"title":"The store Flag","href":"/ai-api/concepts/store-flag"},{"title":"Native vs. Anthropic-Compat","href":"/ai-api/concepts/native-vs-anthropic"},{"title":"Model Selection","href":"/ai-api/concepts/model-selection"},{"title":"Budget Controls \u0026 Billing Transparency","href":"/ai-api/concepts/budget-controls"},{"title":"Idempotency","href":"/ai-api/concepts/idempotency"},{"title":"Pagination","href":"/ai-api/concepts/pagination"},{"title":"Versioning","href":"/ai-api/concepts/versioning"}]},{"group":"Control Plane","pages":[{"title":"API Keys","href":"/ai-api/control/api-keys"},{"title":"Identity","href":"/ai-api/control/identity"},{"title":"Usage","href":"/ai-api/control/usage"},{"title":"Budget","href":"/ai-api/control/budget"},{"title":"Models","href":"/ai-api/control/models"},{"title":"Model access","href":"/ai-api/control/model-access"},{"title":"Webhooks","href":"/ai-api/control/webhooks"},{"title":"Audit Log","href":"/ai-api/control/audit"},{"title":"Files","href":"/ai-api/control/files"},{"title":"Conversations","href":"/ai-api/control/conversations"},{"title":"Personas","href":"/ai-api/control/personas"},{"title":"Customers","href":"/ai-api/control/customers"}]},{"group":"Agents","pages":[{"title":"Agent Identity Overview","href":"/ai-api/agents/overview"},{"title":"Registering Agents","href":"/ai-api/agents/registering-agents"},{"title":"Issuing Credentials","href":"/ai-api/agents/issuing-credentials"},{"title":"Scope Grants","href":"/ai-api/agents/scope-grants"},{"title":"Revocation","href":"/ai-api/agents/revocation"}]},{"group":"Tools","pages":[{"title":"Tools Overview","href":"/ai-api/tools/overview"},{"title":"web.search","href":"/ai-api/tools/web-search"},{"title":"web.fetch","href":"/ai-api/tools/web-fetch"},{"title":"knowledge.search","href":"/ai-api/tools/knowledge-search"}]},{"group":"Reference","pages":[{"title":"POST /v1/ai/chat","href":"/ai-api/reference/chat"},{"title":"POST /v1/messages","href":"/ai-api/reference/messages"},{"title":"POST /v1/chat/completions","href":"/ai-api/reference/chat-completions"},{"title":"Constraint Solving","href":"/ai-api/reference/solve"},{"title":"Error Reference","href":"/ai-api/reference/errors"},{"title":"Rate Limits","href":"/ai-api/reference/rate-limits"}]},{"group":"Endpoints","pages":[{"group":"AgentVersions","pages":[{"title":"List all versions for an agent (draft + published, newest first), cursor-paginated","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /agents/{agentId}/versions","href":"/ai-api/endpoints/agentversions/list-all-versions-for-an-agent-draft-+-published-newest-first-cursor-paginated"},{"title":"Retrieve a specific version by version number","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /agents/{agentId}/versions/{version_number}","href":"/ai-api/endpoints/agentversions/retrieve-a-specific-version-by-version-number"},{"title":"Create or update the current draft version for an agent","deprecated":null,"version":null,"openapi":"/openapi/v1.json put /agents/{agentId}/draft","href":"/ai-api/endpoints/agentversions/create-or-update-the-current-draft-version-for-an-agent"},{"title":"Publish the current draft version","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /agents/{agentId}/draft/publish","href":"/ai-api/endpoints/agentversions/publish-the-current-draft-version"}]},{"group":"Agents","pages":[{"title":"List agents for the caller's org, cursor-paginated","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /agents","href":"/ai-api/endpoints/agents/list-agents-for-the-callers-org-cursor-paginated"},{"title":"Register a new agent","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /agents","href":"/ai-api/endpoints/agents/register-a-new-agent"},{"title":"Retrieve a single agent","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /agents/{agentId}","href":"/ai-api/endpoints/agents/retrieve-a-single-agent"},{"title":"Update agent settings","deprecated":null,"version":null,"openapi":"/openapi/v1.json patch /agents/{agentId}","href":"/ai-api/endpoints/agents/update-agent-settings"},{"title":"Archive an agent (revokes all active credentials)","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /agents/{agentId}/archive","href":"/ai-api/endpoints/agents/archive-an-agent-revokes-all-active-credentials"},{"title":"Reactivate an archived agent","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /agents/{agentId}/reactivate","href":"/ai-api/endpoints/agents/reactivate-an-archived-agent"}]},{"group":"AiMessages","pages":[{"title":"Retrieve a previously-issued inference message by id","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /ai/messages/{id}","href":"/ai-api/endpoints/aimessages/retrieve-a-previously-issued-inference-message-by-id"}]},{"group":"ApiKeys","pages":[{"title":"List all non-revoked personal access tokens for the caller's org, cursor-paginated","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /api_keys","href":"/ai-api/endpoints/apikeys/list-all-non-revoked-personal-access-tokens-for-the-callers-org-cursor-paginated"},{"title":"Issue a new personal access token for the caller's org. Returns the plaintext token once","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /api_keys","href":"/ai-api/endpoints/apikeys/issue-a-new-personal-access-token-for-the-callers-org-returns-the-plaintext-token-once"},{"title":"Retrieve a single non-revoked personal access token. Scoped to the caller's org","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /api_keys/{keyId}","href":"/ai-api/endpoints/apikeys/retrieve-a-single-non-revoked-personal-access-token-scoped-to-the-callers-org"},{"title":"Revoke a personal access token. Scoped to the caller's org","deprecated":null,"version":null,"openapi":"/openapi/v1.json delete /api_keys/{keyId}","href":"/ai-api/endpoints/apikeys/revoke-a-personal-access-token-scoped-to-the-callers-org"}]},{"group":"ApiKeysBulk","pages":[{"title":"Bulk revoke personal access tokens for the caller's org, returning per-item results","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /api_keys/bulk","href":"/ai-api/endpoints/apikeysbulk/bulk-revoke-personal-access-tokens-for-the-callers-org-returning-per-item-results"}]},{"group":"Audit","pages":[{"title":"List audit log entries for the caller's org, cursor-paginated","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /audit","href":"/ai-api/endpoints/audit/list-audit-log-entries-for-the-callers-org-cursor-paginated"},{"title":"Retrieve a single audit log entry. Scoped to the caller's org","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /audit/{eventId}","href":"/ai-api/endpoints/audit/retrieve-a-single-audit-log-entry-scoped-to-the-callers-org"}]},{"group":"AuditExportDownload","pages":[{"title":"Download a signed audit-export ZIP","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /audit/exports/{export}/download","href":"/ai-api/endpoints/auditexportdownload/download-a-signed-audit-export-zip"}]},{"group":"AuditExports","pages":[{"title":"Request a signed audit export","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /audit/exports","href":"/ai-api/endpoints/auditexports/request-a-signed-audit-export"},{"title":"Poll a requested export","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /audit/exports/{export}","href":"/ai-api/endpoints/auditexports/poll-a-requested-export"}]},{"group":"Baa","pages":[{"title":"Return the org's current BAA status and current acceptance metadata","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /compliance/baa","href":"/ai-api/endpoints/baa/return-the-orgs-current-baa-status-and-current-acceptance-metadata"},{"title":"List all BAA acceptances for the org (full history), cursor-paginated","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /compliance/baa/acceptances","href":"/ai-api/endpoints/baa/list-all-baa-acceptances-for-the-org-full-history-cursor-paginated"},{"title":"Return a single BAA acceptance record","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /compliance/baa/acceptances/{acceptanceId}","href":"/ai-api/endpoints/baa/return-a-single-baa-acceptance-record"},{"title":"Download the executed PDF for a specific acceptance","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /compliance/baa/acceptances/{acceptanceId}/download","href":"/ai-api/endpoints/baa/download-the-executed-pdf-for-a-specific-acceptance"}]},{"group":"Budget","pages":[{"title":"Return the caller org's budget settings (read-only)","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /usage/budget","href":"/ai-api/endpoints/budget/return-the-caller-orgs-budget-settings-read-only"},{"title":"Update the spend cap and/or the alert thresholds","deprecated":null,"version":null,"openapi":"/openapi/v1.json patch /usage/budget","href":"/ai-api/endpoints/budget/update-the-spend-cap-andor-the-alert-thresholds"}]},{"group":"Chat","pages":[{"title":"Run HASP's native chat completion for the caller's org","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /ai/chat","href":"/ai-api/endpoints/chat/run-hasps-native-chat-completion-for-the-callers-org"}]},{"group":"ChatCompletions","pages":[{"title":"Handle an OpenAI Chat Completions-compatible request, streaming or returning the assembled response","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /chat/completions","href":"/ai-api/endpoints/chatcompletions/handle-an-openai-chat-completions-compatible-request-streaming-or-returning-the-assembled-response"}]},{"group":"ConversationMessages","pages":[{"title":"Read a conversation's transcript, oldest turn first","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /conversations/{conversation}/messages","href":"/ai-api/endpoints/conversationmessages/read-a-conversations-transcript-oldest-turn-first"},{"title":"Export a conversation's transcript in one response","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /conversations/{conversation}/export","href":"/ai-api/endpoints/conversationmessages/export-a-conversations-transcript-in-one-response"},{"title":"List the files bound to a conversation","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /conversations/{conversation}/attachments","href":"/ai-api/endpoints/conversationmessages/list-the-files-bound-to-a-conversation"}]},{"group":"Conversations","pages":[{"title":"List the caller's own conversations, most recently updated first","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /conversations","href":"/ai-api/endpoints/conversations/list-the-callers-own-conversations-most-recently-updated-first"},{"title":"Open a server-owned conversation and take custody of its transcript","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /conversations","href":"/ai-api/endpoints/conversations/open-a-server-owned-conversation-and-take-custody-of-its-transcript"},{"title":"Fetch one conversation's metadata","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /conversations/{conversation}","href":"/ai-api/endpoints/conversations/fetch-one-conversations-metadata"},{"title":"Update a conversation's metadata","deprecated":null,"version":null,"openapi":"/openapi/v1.json patch /conversations/{conversation}","href":"/ai-api/endpoints/conversations/update-a-conversations-metadata"}]},{"group":"CountTokens","pages":[{"title":"Count input tokens for an Anthropic-compatible request","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /messages/count_tokens","href":"/ai-api/endpoints/counttokens/count-input-tokens-for-an-anthropic-compatible-request"}]},{"group":"Credentials","pages":[{"title":"List credentials for an agent, cursor-paginated","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /agents/{agentId}/credentials","href":"/ai-api/endpoints/credentials/list-credentials-for-an-agent-cursor-paginated"},{"title":"Issue a new credential for an agent","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /agents/{agentId}/credentials","href":"/ai-api/endpoints/credentials/issue-a-new-credential-for-an-agent"},{"title":"Retrieve a single credential","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /agents/{agentId}/credentials/{credentialId}","href":"/ai-api/endpoints/credentials/retrieve-a-single-credential"},{"title":"Revoke a credential (and all delegation descendants)","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /agents/{agentId}/credentials/{credentialId}/revoke","href":"/ai-api/endpoints/credentials/revoke-a-credential-and-all-delegation-descendants"}]},{"group":"Customers","pages":[{"title":"List the org's customers, cursor-paginated","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /customers","href":"/ai-api/endpoints/customers/list-the-orgs-customers-cursor-paginated"},{"title":"Create a customer","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /customers","href":"/ai-api/endpoints/customers/create-a-customer"},{"title":"Retrieve a single customer","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /customers/{customerId}","href":"/ai-api/endpoints/customers/retrieve-a-single-customer"},{"title":"Update a customer's mutable attributes. Every field is optional — only\nsent fields change. A `status` change routes through the lifecycle\ntransition (suspension fails the customer's credentials closed)","deprecated":null,"version":null,"openapi":"/openapi/v1.json patch /customers/{customerId}","href":"/ai-api/endpoints/customers/update-a-customers-mutable-attributes-every-field-is-optional-—-onlysent-fields-change-a-`status`-change-routes-through-the-lifecycletransition-suspension-fails-the-customers-credentials-closed"},{"title":"Assign a project to this customer","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /customers/{customerId}/projects","href":"/ai-api/endpoints/customers/assign-a-project-to-this-customer"},{"title":"Release a project from this customer back to the builder's\ndirectly-held set","deprecated":null,"version":null,"openapi":"/openapi/v1.json delete /customers/{customerId}/projects/{projectId}","href":"/ai-api/endpoints/customers/release-a-project-from-this-customer-back-to-the-buildersdirectly-held-set"}]},{"group":"EndUserExport","pages":[{"title":"Export a runtime end user's data for GDPR data portability","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /orgs/{organization}/end-users/{runtimeUser}/export","href":"/ai-api/endpoints/enduserexport/export-a-runtime-end-users-data-for-gdpr-data-portability"}]},{"group":"Files","pages":[{"title":"List uploaded files for the caller's org, cursor-paginated","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /files","href":"/ai-api/endpoints/files/list-uploaded-files-for-the-callers-org-cursor-paginated"},{"title":"Upload a file","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /files","href":"/ai-api/endpoints/files/upload-a-file"},{"title":"Retrieve metadata for a single uploaded file by id","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /files/{id}","href":"/ai-api/endpoints/files/retrieve-metadata-for-a-single-uploaded-file-by-id"},{"title":"Delete an uploaded file and its storage object","deprecated":null,"version":null,"openapi":"/openapi/v1.json delete /files/{id}","href":"/ai-api/endpoints/files/delete-an-uploaded-file-and-its-storage-object"},{"title":"Return the stored file content","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /files/{id}/content","href":"/ai-api/endpoints/files/return-the-stored-file-content"}]},{"group":"Identity","pages":[{"title":"Return the authenticated caller's own identity","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /me","href":"/ai-api/endpoints/identity/return-the-authenticated-callers-own-identity"}]},{"group":"IntegrationBindings","pages":[{"title":"List bindings for a custom_http integration credential, cursor-paginated","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /integrations/{integrationId}/bindings","href":"/ai-api/endpoints/integrationbindings/list-bindings-for-a-custom_http-integration-credential-cursor-paginated"},{"title":"Bind a custom_http integration credential into a project","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /integrations/{integrationId}/bindings","href":"/ai-api/endpoints/integrationbindings/bind-a-custom_http-integration-credential-into-a-project"},{"title":"Remove a binding. The underlying credential is unaffected","deprecated":null,"version":null,"openapi":"/openapi/v1.json delete /integrations/{integrationId}/bindings/{bindingId}","href":"/ai-api/endpoints/integrationbindings/remove-a-binding-the-underlying-credential-is-unaffected"}]},{"group":"Integrations","pages":[{"title":"List all custom_http integration credentials for the caller's org, cursor-paginated","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /integrations","href":"/ai-api/endpoints/integrations/list-all-custom_http-integration-credentials-for-the-callers-org-cursor-paginated"},{"title":"Register a new custom_http integration: endpoint config + write-only secret","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /integrations","href":"/ai-api/endpoints/integrations/register-a-new-custom_http-integration:-endpoint-config-+-write-only-secret"},{"title":"Retrieve a single custom_http integration credential's metadata. Never\nincludes the stored secret","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /integrations/{integrationId}","href":"/ai-api/endpoints/integrations/retrieve-a-single-custom_http-integration-credentials-metadata-neverincludes-the-stored-secret"},{"title":"Revoke a custom_http integration credential (ADR-2Q9RMV)","deprecated":null,"version":null,"openapi":"/openapi/v1.json delete /integrations/{integrationId}","href":"/ai-api/endpoints/integrations/revoke-a-custom_http-integration-credential-adr-2q9rmv"},{"title":"Replace the secret for an existing custom_http integration credential","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /integrations/{integrationId}/rotate-secret","href":"/ai-api/endpoints/integrations/replace-the-secret-for-an-existing-custom_http-integration-credential"}]},{"group":"KnowledgeDocument","pages":[{"title":"List the org's Document RAG knowledge base documents, cursor-paginated","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /knowledge","href":"/ai-api/endpoints/knowledgedocument/list-the-orgs-document-rag-knowledge-base-documents-cursor-paginated"},{"title":"Upload a document into the org's Document RAG knowledge base","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /knowledge","href":"/ai-api/endpoints/knowledgedocument/upload-a-document-into-the-orgs-document-rag-knowledge-base"},{"title":"Search the knowledge base and return matched chunks with scores and citations","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /knowledge/search","href":"/ai-api/endpoints/knowledgedocument/search-the-knowledge-base-and-return-matched-chunks-with-scores-and-citations"},{"title":"Retrieve metadata for a single knowledge base document by id","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /knowledge/{document}","href":"/ai-api/endpoints/knowledgedocument/retrieve-metadata-for-a-single-knowledge-base-document-by-id"},{"title":"Delete a knowledge base document and its storage object","deprecated":null,"version":null,"openapi":"/openapi/v1.json delete /knowledge/{document}","href":"/ai-api/endpoints/knowledgedocument/delete-a-knowledge-base-document-and-its-storage-object"},{"title":"List a document's chunks (paginated)","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /knowledge/{document}/chunks","href":"/ai-api/endpoints/knowledgedocument/list-a-documents-chunks-paginated"}]},{"group":"Messages","pages":[{"title":"Handle an Anthropic Messages-compatible request, streaming or returning the assembled response","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /messages","href":"/ai-api/endpoints/messages/handle-an-anthropic-messages-compatible-request-streaming-or-returning-the-assembled-response"}]},{"group":"ModelAccess","pages":[{"title":"Return the caller org's model-access settings (API-surface scoped)","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /model-access","href":"/ai-api/endpoints/modelaccess/return-the-caller-orgs-model-access-settings-api-surface-scoped"},{"title":"Update any of the model-access fields","deprecated":null,"version":null,"openapi":"/openapi/v1.json patch /model-access","href":"/ai-api/endpoints/modelaccess/update-any-of-the-model-access-fields"}]},{"group":"Models","pages":[{"title":"List every API-surface model with the caller org's access state, cursor-paginated","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /models","href":"/ai-api/endpoints/models/list-every-api-surface-model-with-the-caller-orgs-access-state-cursor-paginated"},{"title":"Return a single API-surface model's catalog entry","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /models/{modelId}","href":"/ai-api/endpoints/models/return-a-single-api-surface-models-catalog-entry"}]},{"group":"Persona","pages":[{"title":"GET /v1/assistant/persona","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /assistant/persona","href":"/ai-api/endpoints/persona/get-v1assistantpersona"},{"title":"PUT /v1/assistant/persona","deprecated":null,"version":null,"openapi":"/openapi/v1.json put /assistant/persona","href":"/ai-api/endpoints/persona/put-v1assistantpersona"}]},{"group":"Personas","pages":[{"title":"List personas visible to the caller, cursor-paginated","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /personas","href":"/ai-api/endpoints/personas/list-personas-visible-to-the-caller-cursor-paginated"},{"title":"Create a new private persona in draft state","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /personas","href":"/ai-api/endpoints/personas/create-a-new-private-persona-in-draft-state"},{"title":"Retrieve a single persona — the caller's own, or any published\norg-library persona","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /personas/{personaId}","href":"/ai-api/endpoints/personas/retrieve-a-single-persona-—-the-callers-own-or-any-publishedorg-library-persona"},{"title":"Delete a private persona","deprecated":null,"version":null,"openapi":"/openapi/v1.json delete /personas/{personaId}","href":"/ai-api/endpoints/personas/delete-a-private-persona"},{"title":"Update a draft persona in place. Errors if the current version is\npublished (call /revise first)","deprecated":null,"version":null,"openapi":"/openapi/v1.json patch /personas/{personaId}","href":"/ai-api/endpoints/personas/update-a-draft-persona-in-place-errors-if-the-current-version-ispublished-call-revise-first"},{"title":"Publish the current draft version","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /personas/{personaId}/publish","href":"/ai-api/endpoints/personas/publish-the-current-draft-version"},{"title":"Create a new draft revision from the currently published version","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /personas/{personaId}/revise","href":"/ai-api/endpoints/personas/create-a-new-draft-revision-from-the-currently-published-version"},{"title":"Admin-only: promote a private persona to a new org-library persona","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /personas/{personaId}/promote","href":"/ai-api/endpoints/personas/admin-only:-promote-a-private-persona-to-a-new-org-library-persona"}]},{"group":"Project","pages":[{"title":"List projects in the caller's org, cursor-paginated","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /projects","href":"/ai-api/endpoints/project/list-projects-in-the-callers-org-cursor-paginated"},{"title":"Create a new project","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /projects","href":"/ai-api/endpoints/project/create-a-new-project"},{"title":"Show a single project","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /projects/{project}","href":"/ai-api/endpoints/project/show-a-single-project"},{"title":"Update a project's mutable attributes. Every field is optional — only\nsent fields change","deprecated":null,"version":null,"openapi":"/openapi/v1.json patch /projects/{project}","href":"/ai-api/endpoints/project/update-a-projects-mutable-attributes-every-field-is-optional-—-onlysent-fields-change"},{"title":"Archive a project (reversible; the project row and its data are kept)","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /projects/{project}/archive","href":"/ai-api/endpoints/project/archive-a-project-reversible;-the-project-row-and-its-data-are-kept"}]},{"group":"ProviderStatus","pages":[{"title":"Return the AI gateway's combined upstream provider health for customer monitoring","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /provider-status","href":"/ai-api/endpoints/providerstatus/return-the-ai-gateways-combined-upstream-provider-health-for-customer-monitoring"}]},{"group":"Schema","pages":[{"title":"List all entity definitions for a project, cursor-paginated","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /projects/{project}/schemas","href":"/ai-api/endpoints/schema/list-all-entity-definitions-for-a-project-cursor-paginated"},{"title":"Create a new entity definition in the project","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /projects/{project}/schemas","href":"/ai-api/endpoints/schema/create-a-new-entity-definition-in-the-project"},{"title":"Show a single entity definition with its fields","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /projects/{project}/schemas/{entity}","href":"/ai-api/endpoints/schema/show-a-single-entity-definition-with-its-fields"},{"title":"Soft-delete an entity definition","deprecated":null,"version":null,"openapi":"/openapi/v1.json delete /projects/{project}/schemas/{entity}","href":"/ai-api/endpoints/schema/soft-delete-an-entity-definition"},{"title":"Update an entity definition's mutable attributes. Every field is\noptional — only sent fields change","deprecated":null,"version":null,"openapi":"/openapi/v1.json patch /projects/{project}/schemas/{entity}","href":"/ai-api/endpoints/schema/update-an-entity-definitions-mutable-attributes-every-field-isoptional-—-only-sent-fields-change"},{"title":"Create a field on an entity definition","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /projects/{project}/schemas/{entity}/fields","href":"/ai-api/endpoints/schema/create-a-field-on-an-entity-definition"},{"title":"Delete a field from an entity definition","deprecated":null,"version":null,"openapi":"/openapi/v1.json delete /projects/{project}/schemas/{entity}/fields/{field}","href":"/ai-api/endpoints/schema/delete-a-field-from-an-entity-definition"},{"title":"Update an existing field. Every field is optional — only sent fields change","deprecated":null,"version":null,"openapi":"/openapi/v1.json patch /projects/{project}/schemas/{entity}/fields/{field}","href":"/ai-api/endpoints/schema/update-an-existing-field-every-field-is-optional-—-only-sent-fields-change"}]},{"group":"Solve","pages":[{"title":"Solve a deterministic constraint-satisfaction / assignment problem","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /solve","href":"/ai-api/endpoints/solve/solve-a-deterministic-constraint-satisfaction-assignment-problem"}]},{"group":"Tools","pages":[{"title":"List HASP-supplied tools available for `tool_allowlist` selection","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /tools","href":"/ai-api/endpoints/tools/list-hasp-supplied-tools-available-for-`tool_allowlist`-selection"}]},{"group":"Usage","pages":[{"title":"Return the current billing cycle usage summary visible to the caller","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /usage","href":"/ai-api/endpoints/usage/return-the-current-billing-cycle-usage-summary-visible-to-the-caller"}]},{"group":"WebhookDeliveries","pages":[{"title":"List cursor-paginated delivery history for a webhook endpoint, scoped to the caller's org","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /webhooks/{endpointId}/deliveries","href":"/ai-api/endpoints/webhookdeliveries/list-cursor-paginated-delivery-history-for-a-webhook-endpoint-scoped-to-the-callers-org"}]},{"group":"WebhookDeliveriesBulkReplay","pages":[{"title":"Bulk replay webhook deliveries for the caller's org, enqueuing a new delivery job per item","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /webhooks/deliveries/bulk-replay","href":"/ai-api/endpoints/webhookdeliveriesbulkreplay/bulk-replay-webhook-deliveries-for-the-callers-org-enqueuing-a-new-delivery-job-per-item"}]},{"group":"WebhookEventTypes","pages":[{"title":"List the catalog of webhook event types a webhook endpoint may subscribe to","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /webhooks/event-types","href":"/ai-api/endpoints/webhookeventtypes/list-the-catalog-of-webhook-event-types-a-webhook-endpoint-may-subscribe-to"}]},{"group":"Webhooks","pages":[{"title":"List all non-deleted webhook endpoints for the caller's org, cursor-paginated","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /webhooks","href":"/ai-api/endpoints/webhooks/list-all-non-deleted-webhook-endpoints-for-the-callers-org-cursor-paginated"},{"title":"Create a new webhook endpoint under an org-owned app","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /webhooks","href":"/ai-api/endpoints/webhooks/create-a-new-webhook-endpoint-under-an-org-owned-app"},{"title":"Retrieve a single webhook endpoint. Scoped to the caller's org","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /webhooks/{endpointId}","href":"/ai-api/endpoints/webhooks/retrieve-a-single-webhook-endpoint-scoped-to-the-callers-org"},{"title":"Delete a webhook endpoint. Scoped to the caller's org","deprecated":null,"version":null,"openapi":"/openapi/v1.json delete /webhooks/{endpointId}","href":"/ai-api/endpoints/webhooks/delete-a-webhook-endpoint-scoped-to-the-callers-org"},{"title":"Update a webhook endpoint's url, events, and/or description","deprecated":null,"version":null,"openapi":"/openapi/v1.json patch /webhooks/{endpointId}","href":"/ai-api/endpoints/webhooks/update-a-webhook-endpoints-url-events-andor-description"},{"title":"Rotate a webhook endpoint's signing secret","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /webhooks/{endpointId}/rotate-secret","href":"/ai-api/endpoints/webhooks/rotate-a-webhook-endpoints-signing-secret"}]},{"group":"WebhooksBulk","pages":[{"title":"Bulk delete webhook endpoints for the caller's org, returning per-item results","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /webhooks/bulk","href":"/ai-api/endpoints/webhooksbulk/bulk-delete-webhook-endpoints-for-the-callers-org-returning-per-item-results"}]},{"group":"Workflow","pages":[{"title":"List all current workflow definitions for a project, cursor-paginated","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /projects/{project}/workflows","href":"/ai-api/endpoints/workflow/list-all-current-workflow-definitions-for-a-project-cursor-paginated"},{"title":"Create a new workflow draft","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /projects/{project}/workflows","href":"/ai-api/endpoints/workflow/create-a-new-workflow-draft"},{"title":"Show a single workflow definition","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /projects/{project}/workflows/{workflow}","href":"/ai-api/endpoints/workflow/show-a-single-workflow-definition"},{"title":"Update a workflow draft (name, description, triggers, steps)","deprecated":null,"version":null,"openapi":"/openapi/v1.json patch /projects/{project}/workflows/{workflow}","href":"/ai-api/endpoints/workflow/update-a-workflow-draft-name-description-triggers-steps"},{"title":"Publish the current draft version of a workflow","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /projects/{project}/workflows/{workflow}/publish","href":"/ai-api/endpoints/workflow/publish-the-current-draft-version-of-a-workflow"}]},{"group":"WorkflowRun","pages":[{"title":"Trigger a new workflow run","deprecated":null,"version":null,"openapi":"/openapi/v1.json post /projects/{project}/workflows/{workflow}/runs","href":"/ai-api/endpoints/workflowrun/trigger-a-new-workflow-run"},{"title":"List runs for all workflows in a project (cursor-paginated, newest first)","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /projects/{project}/runs","href":"/ai-api/endpoints/workflowrun/list-runs-for-all-workflows-in-a-project-cursor-paginated-newest-first"},{"title":"Show a single run with its status and outputs","deprecated":null,"version":null,"openapi":"/openapi/v1.json get /projects/{project}/runs/{run}","href":"/ai-api/endpoints/workflowrun/show-a-single-run-with-its-status-and-outputs"}]}]},{"title":"Compatibility Policy","href":"/ai-api/compatibility"},{"title":"Changelog","href":"/ai-api/changelog"}]},{"group":"Data API","pages":[{"title":"Data API overview","href":"/data-api/overview"},{"group":"Endpoints","pages":[{"group":"Bootstrap","pages":[{"title":"Bootstrap the app","deprecated":null,"version":null,"openapi":"/openapi/data-v1.json get /bootstrap","href":"/data-api/endpoints/bootstrap/bootstrap-the-app"}]},{"group":"EntityRecordFile","pages":[{"title":"Upload a file and attach it to an EntityRecord","deprecated":null,"version":null,"openapi":"/openapi/data-v1.json post /projects/{project}/entities/{entity}/records/{id}/files","href":"/data-api/endpoints/entityrecordfile/upload-a-file-and-attach-it-to-an-entityrecord"},{"title":"Generate a signed download URL for an EntityRecordFile","deprecated":null,"version":null,"openapi":"/openapi/data-v1.json get /projects/{project}/files/{fileId}","href":"/data-api/endpoints/entityrecordfile/generate-a-signed-download-url-for-an-entityrecordfile"}]},{"group":"EntitySchema","pages":[{"title":"Return the project's entity schema — every entity definition and its fields","deprecated":null,"version":null,"openapi":"/openapi/data-v1.json get /projects/{project}/schema","href":"/data-api/endpoints/entityschema/return-the-projects-entity-schema-—-every-entity-definition-and-its-fields"}]},{"group":"Records","pages":[{"title":"Bulk-create records","deprecated":null,"version":null,"openapi":"/openapi/data-v1.json post /projects/{project}/entities/{entity}/records/bulk","href":"/data-api/endpoints/records/bulk-create-records"},{"title":"Bulk-delete records","deprecated":null,"version":null,"openapi":"/openapi/data-v1.json delete /projects/{project}/entities/{entity}/records/bulk","href":"/data-api/endpoints/records/bulk-delete-records"},{"title":"Bulk-update records","deprecated":null,"version":null,"openapi":"/openapi/data-v1.json patch /projects/{project}/entities/{entity}/records/bulk","href":"/data-api/endpoints/records/bulk-update-records"},{"title":"List records","deprecated":null,"version":null,"openapi":"/openapi/data-v1.json get /projects/{project}/entities/{entity}/records","href":"/data-api/endpoints/records/list-records"},{"title":"Create a record","deprecated":null,"version":null,"openapi":"/openapi/data-v1.json post /projects/{project}/entities/{entity}/records","href":"/data-api/endpoints/records/create-a-record"},{"title":"Retrieve a record","deprecated":null,"version":null,"openapi":"/openapi/data-v1.json get /projects/{project}/entities/{entity}/records/{id}","href":"/data-api/endpoints/records/retrieve-a-record"},{"title":"Delete a record","deprecated":null,"version":null,"openapi":"/openapi/data-v1.json delete /projects/{project}/entities/{entity}/records/{id}","href":"/data-api/endpoints/records/delete-a-record"},{"title":"Update a record","deprecated":null,"version":null,"openapi":"/openapi/data-v1.json patch /projects/{project}/entities/{entity}/records/{id}","href":"/data-api/endpoints/records/update-a-record"},{"title":"Submit a record anonymously","deprecated":null,"version":null,"openapi":"/openapi/data-v1.json post /projects/{project}/entities/{entity}/records/anonymous","href":"/data-api/endpoints/records/submit-a-record-anonymously"}]},{"group":"Status","pages":[{"title":"Check status","deprecated":null,"version":null,"openapi":"/openapi/data-v1.json get /status","href":"/data-api/endpoints/status/check-status"}]}]}]},{"group":"App Builder SDK","pages":[{"title":"Getting Started","description":"Understand the App Builder platform and build your first workflow app.","href":"/app-builder/getting-started"},{"group":"SDK","pages":[{"title":"SDK Initialization","href":"/app-builder/sdk/initialization"},{"title":"Records (CRUD)","description":"listRecords, getRecord, createRecord, updateRecord, and deleteRecord — the core Data API operations.","href":"/app-builder/sdk/records"},{"title":"Bootstrap \u0026 Schema","href":"/app-builder/sdk/bootstrap"},{"title":"Bulk Operations","href":"/app-builder/sdk/bulk-operations"},{"title":"File Uploads \u0026 Downloads","href":"/app-builder/sdk/file-uploads"},{"title":"Filtering","href":"/app-builder/sdk/filtering"},{"title":"Pagination","href":"/app-builder/sdk/pagination"},{"title":"Error Handling","href":"/app-builder/sdk/error-handling"},{"title":"Maintenance Mode","href":"/app-builder/sdk/maintenance-mode"},{"title":"Cancellation \u0026 Cleanup","href":"/app-builder/sdk/cancellation-and-cleanup"}]},{"group":"Reference","pages":[{"title":"Field Types","href":"/app-builder/reference/field-types"},{"title":"Roles \u0026 Permissions","href":"/app-builder/reference/roles"},{"title":"Limits","href":"/app-builder/reference/limits"},{"title":"Outbound Webhooks","href":"/app-builder/reference/outbound-webhooks"},{"title":"Inbound Webhooks","href":"/app-builder/reference/inbound-webhooks"},{"title":"Admin Overrides","href":"/app-builder/reference/admin-overrides"}]},{"group":"Guides","pages":[{"title":"Schema Design","href":"/app-builder/guides/schema-design"},{"title":"Role-Based UI","href":"/app-builder/guides/role-based-ui"},{"title":"Example: Task Tracker","href":"/app-builder/guides/examples/task-tracker"},{"title":"Example: Contact Directory","href":"/app-builder/guides/examples/contact-directory"},{"title":"Example: Inventory Tracker","href":"/app-builder/guides/examples/inventory-tracker"}]}]}]},"basePath":"","title":"SDK Initialization - HASP","buildId":"dpl_BLQvU86QFwq3AhPofSTw6q8dGWKm","deploymentId":"dpl_BLQvU86QFwq3AhPofSTw6q8dGWKm","dynamics":[],"chunks":[]}