Use the typed, server-side JavaScript client for Glean Feed’s complete public REST API.
@gleanfeed/sdk is the typed server-side client for the public /api/v1
contract. Use it when trusted JavaScript or TypeScript code needs in-process
feedback, roadmap, changelog, workspace, tag, comment, pagination, timeout, and
error handling.
API keys are server credentials. The SDK refuses to initialize in a browser by default. Never put
a key in a public bundle, mobile app, client component, or NEXT_PUBLIC_... variable.
Requirements and install
Node.js 20 or later, or a server/edge runtime with standards-compatible
fetch, Headers, URL, AbortController, and Response globals.
A workspace API key with the scopes required by each operation.
npm install @gleanfeed/sdk
Read feedback
import { GleanFeed } from "@gleanfeed/sdk";const glean = new GleanFeed({ apiKey: process.env.GLEAN_FEED_API_KEY!,});for await (const request of glean.feedback.iterate({ stage: "in_review" })) { console.log(request.id, request.title);}
Async iterators follow opaque cursors without loading an unbounded workspace into
memory. The API key determines the workspace; the SDK does not accept a workspace
override.
Use a stable source.externalId when the same external record can be delivered
again. Source metadata is private triage context, but it must not contain
credentials, raw connector payloads, unnecessary personal data, or message
history. Use a stable idempotency key when a separate process may retry the same
logical create.
Pass an AbortSignal to any operation. API failures expose the HTTP status,
stable error code, optional safe details, and retry interval where applicable.
Compatibility and versions
The SDK ships ESM and TypeScript declarations. Its major version tracks breaking
SDK interface changes. It targets /api/v1 and is contract-tested against the
OpenAPI reference; additive v1 response fields do not require
an SDK major release. A future /api/v2 will require explicit SDK support rather
than silently changing this package’s base path.Pin an exact version for controlled production rollouts, or use a compatible
range when additive SDK releases are acceptable. Verify the package publisher,
repository, version, and changelog before upgrading.Use the Headless SDK guides for customer-facing UI patterns,
the widget package for a ready-made browser
interface, or the CLI for repository and terminal workflows.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Glean Feed","description":"Learn how to collect feedback, publish roadmap updates, launch a public portal, and embed Glean Feed in your product.","colors":{"primary":"#1A1816","light":"#F6F6F5","dark":"#1A1816"},"logo":{"light":"https://mintcdn.com/gleanfeed/9Cksmp6iAukvIiii/brand/glean-lockup.svg?fit=max\u0026auto=format\u0026n=9Cksmp6iAukvIiii\u0026q=85\u0026s=de09e922b5d0a5f97d2a6a4945603fea","dark":"https://mintcdn.com/gleanfeed/9Cksmp6iAukvIiii/brand/glean-lockup-dark.svg?fit=max\u0026auto=format\u0026n=9Cksmp6iAukvIiii\u0026q=85\u0026s=1be992be3aa54fecd0438b453a1746d8","href":"https://gleanfeed.com"},"favicon":{"light":"https://mintcdn.com/gleanfeed/9Cksmp6iAukvIiii/brand/glean-mark.svg?fit=max\u0026auto=format\u0026n=9Cksmp6iAukvIiii\u0026q=85\u0026s=862024ec9ac2347df27e89e133d99059","dark":"https://mintcdn.com/gleanfeed/9Cksmp6iAukvIiii/brand/glean-mark-white.svg?fit=max\u0026auto=format\u0026n=9Cksmp6iAukvIiii\u0026q=85\u0026s=54948197c0db5e98a450464e53bd4c14"},"appearance":{"default":"system"},"background":{"color":{"light":"#FAFAF9","dark":"#100F0D"}},"navbar":{"links":[{"href":"https://gleanfeed.com","label":"Home"}],"primary":{"type":"button","label":"Open app","href":"https://app.gleanfeed.com"}},"search":{"prompt":"Search Glean Feed docs"},"seo":{"indexing":"navigable"},"fonts":{"family":"Geist"},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","grok","aistudio","mcp","add-mcp","cursor","vscode"],"display":"header"},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"gleanfeed","hasAudioNarration":false,"actualSubdomain":"gleanfeed","customDomains":["gleanfeed.com"],"gitSource":{"type":"github","owner":"mweisberg21","repo":"gleanfeed-app","deployBranch":"main","contentDirectory":"docs","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6ae95b0634ab80277e3e0971:success","clientVersion":"0.0.4377","searchFilterCounts":[{"language":"default","tag":"Developer guides","count":32},{"language":"default","tag":"Product guides","count":16},{"language":"default","tag":"API \u0026 MCP","count":8},{"language":"default","tag":"Start in your repository","count":7},{"language":"default","tag":"iOS SDK","count":7},{"language":"default","tag":"Embed Glean Feed","count":7},{"language":"default","tag":"Customize your portal","count":5},{"language":"default","tag":"Account and workspace","count":3},{"language":"default","tag":"Headless SDK","count":3},{"language":"default","tag":"Integrations","count":3}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"/docs","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":"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":"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":"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":"turbopuffer-dual-write","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":"editor-metadata","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":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":true},"customCss":[{"filePath":"custom.css","content":":root{--gf-bg: #fafaf9;--gf-surface: #ffffff;--gf-muted: #f6f6f5;--gf-border: #e8e6e2;--gf-ink: #1a1816;--gf-ink-muted: #605c56;--gf-link: #1a1816;--gf-active: color-mix(in srgb, var(--gf-muted), var(--gf-ink) 7%);--gf-code-bg: #100f0d;--gf-font-sans:\n \"Geist\", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif;--gf-font-mono: \"Geist Mono\", \"SFMono-Regular\", Consolas, \"Liberation Mono\", Menlo, monospace}html.dark{--gf-bg: #100f0d;--gf-surface: #1a1816;--gf-muted: #1f1d1a;--gf-border: #2a2723;--gf-ink: #f6f6f5;--gf-ink-muted: #a3a09a;--gf-link: #f6f6f5;--gf-active: color-mix(in srgb, var(--gf-muted), var(--gf-ink) 7%);--gf-code-bg: #0b0a09}html,body,#background-color{background:var(--gf-bg)!important;color:var(--gf-ink);font-family:var(--gf-font-sans)}::selection{background:color-mix(in srgb, var(--gf-ink) 14%, transparent)}#navbar{border-bottom:1px solid var(--gf-border);background:color-mix(in srgb, var(--gf-bg) 92%, transparent);backdrop-filter:blur(16px) saturate(140%)}nav-logo img{height:24px;width:auto}#sidebar,#sidebar-content,#table-of-contents,#table-of-contents-content{background:var(--gf-bg)}#page-title,mdx-content h1,mdx-content h2,mdx-content h3,mdx-content h4{color:var(--gf-ink);font-family:var(--gf-font-sans);font-weight:600;letter-spacing:0}mdx-content p,mdx-content li,mdx-content td{color:var(--gf-ink-muted)}mdx-content strong,mdx-content th{color:var(--gf-ink)}mdx-content a,link{color:var(--gf-link);text-decoration-color:color-mix(in srgb, var(--gf-link) 38%, transparent);text-underline-offset:0.18em}mdx-content a:hover{text-decoration-color:var(--gf-link)}#search-bar-entry,#search-bar-entry-mobile,button,input,textarea,select{border-radius:8px}#search-bar-entry,#search-bar-entry-mobile{border:1px solid var(--gf-border);background:var(--gf-surface);color:var(--gf-ink-muted)}#topbar-cta-button{font-weight:500}a[href^=\"https://www.mintlify.com?utm_campaign=poweredBy\"]{color:var(--gf-ink-muted)!important}#sidebar-content :is(li[data-active],li[data-active-nav-item])>a,#sidebar-content a[aria-current=\"page\"],toc-item[data-active],toc-item[data-active-deepest]{background:var(--gf-active);border-radius:8px;color:var(--gf-ink);font-weight:500;text-shadow:none}icon,tab-icon{color:var(--gf-ink)}html.dark img[src$=\"/integrations/linear.svg\"]{content:url(\"/integrations/linear-dark.svg\")}html.dark img[src^=\"/icons/\"],html.dark img[src*=\"/icons/\"]{filter:brightness(0) invert(1)}card,callout,accordion,code-block{border:1px solid var(--gf-border);border-radius:8px;box-shadow:none}card{background:var(--gf-surface)}card:hover{border-color:color-mix(in srgb, var(--gf-ink) 30%, var(--gf-border))}callout,accordion{background:var(--gf-muted)}code-block,pre{background:var(--gf-code-bg)!important;font-family:var(--gf-font-mono)}mdx-content :not(pre)>code{border:1px solid var(--gf-border);border-radius:6px;background:var(--gf-muted);color:var(--gf-ink);font-family:var(--gf-font-mono)}mdx-content table{border-color:var(--gf-border)}mdx-content th{background:var(--gf-muted)}mdx-content tr{border-color:var(--gf-border)}"}]}
{"page":{"pagePath":"api/javascript-sdk","slug":"/api/javascript-sdk","pageMetadata":{"title":"JavaScript SDK","description":"Use the typed, server-side JavaScript client for Glean Feed's complete public REST API.","sidebarTitle":"JavaScript SDK","icon":"/icons/filled/code.svg","href":"/api/javascript-sdk"},"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: \"Use the typed, server-side JavaScript client for Glean Feed’s complete public REST API.\"\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`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[_jsx(_components.code,{children:`@gleanfeed/sdk`}),` is the typed server-side client for the public `,_jsx(_components.code,{children:`/api/v1`}),`\ncontract. Use it when trusted JavaScript or TypeScript code needs in-process\nfeedback, roadmap, changelog, workspace, tag, comment, pagination, timeout, and\nerror handling.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`API keys are server credentials. The SDK refuses to initialize in a browser by default. Never put\na key in a public bundle, mobile app, client component, or `,_jsx(_components.code,{children:`NEXT_PUBLIC_...`}),` variable.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`requirements-and-install`,children:`Requirements and install`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Node.js 20 or later, or a server/edge runtime with standards-compatible\n`,_jsx(_components.code,{children:`fetch`}),`, `,_jsx(_components.code,{children:`Headers`}),`, `,_jsx(_components.code,{children:`URL`}),`, `,_jsx(_components.code,{children:`AbortController`}),`, and `,_jsx(_components.code,{children:`Response`}),` globals.`]}),`\n`,_jsxs(_components.li,{children:[`A workspace API key with the `,_jsx(_components.a,{href:`/api/scopes`,children:`scopes`}),` required by each operation.`]}),`\n`]}),`\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:`npm`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` install`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` @gleanfeed/sdk`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`read-feedback`,children:`Read feedback`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`typescript`,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:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`GleanFeed`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"@gleanfeed/sdk\"`}),_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:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` glean`}),_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:` GleanFeed`}),_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:` apiKey:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`GLEAN_FEED_API_KEY`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},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`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`for`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` request`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` of`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` glean`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`feedback`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`iterate`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`stage:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"in_review\"`}),_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:` console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`request`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`request`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`title`}),_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`,_jsx(_components.p,{children:`Async iterators follow opaque cursors without loading an unbounded workspace into\nmemory. The API key determines the workspace; the SDK does not accept a workspace\noverride.`}),`\n`,_jsx(Heading,{level:`2`,id:`create-feedback-safely`,children:`Create feedback safely`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`15`,language:`typescript`,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:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`15`,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:` request`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` glean`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`feedback`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`create`}),_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`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` boardId:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`GLEAN_FEED_BOARD_ID`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`!`}),_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:` title:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Filter exports by board\"`}),_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:` description:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Let workspace admins export requests from one board.\"`}),_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:` source:`}),_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:` kind:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"github\"`}),_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:` externalId:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"acme/product#42\"`}),_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:` url:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://github.com/acme/product/issues/42\"`}),_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:` capturedAt:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"2026-07-12T12:00:00Z\"`}),_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:` metadata:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`label:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"customer-request\"`}),_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`,_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:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`idempotencyKey:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` crypto`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`randomUUID`}),_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 a stable `,_jsx(_components.code,{children:`source.externalId`}),` when the same external record can be delivered\nagain. Source metadata is private triage context, but it must not contain\ncredentials, raw connector payloads, unnecessary personal data, or message\nhistory. Use a stable idempotency key when a separate process may retry the same\nlogical create.`]}),`\n`,_jsx(Heading,{level:`2`,id:`handle-errors-timeouts-and-cancellation`,children:`Handle errors, timeouts, and cancellation`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`13`,language:`typescript`,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:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`13`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`GleanFeedAbortError`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`GleanFeedApiError`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`GleanFeedTimeoutError`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"@gleanfeed/sdk\"`}),_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:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`try`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` glean`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`workspace`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`get`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`timeoutMs:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 10_000`}),_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\":`#D4D4D4`},children:`} `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`catch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`error`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` instanceof`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` GleanFeedApiError`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u0026\u0026`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`code`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ===`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"rate_limited\"`}),_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:` console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`retryAfterSeconds`}),_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\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`else`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`error`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` instanceof`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` GleanFeedTimeoutError`}),_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:` console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"The request timed out.\"`}),_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\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`else`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`error`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` instanceof`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` GleanFeedAbortError`}),_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:` console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"The caller canceled the request.\"`}),_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`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Pass an `,_jsx(_components.code,{children:`AbortSignal`}),` to any operation. API failures expose the HTTP status,\nstable error code, optional safe details, and retry interval where applicable.`]}),`\n`,_jsx(Heading,{level:`2`,id:`compatibility-and-versions`,children:`Compatibility and versions`}),`\n`,_jsxs(_components.p,{children:[`The SDK ships ESM and TypeScript declarations. Its major version tracks breaking\nSDK interface changes. It targets `,_jsx(_components.code,{children:`/api/v1`}),` and is contract-tested against the\n`,_jsx(_components.a,{href:`/api/endpoints`,children:`OpenAPI reference`}),`; additive v1 response fields do not require\nan SDK major release. A future `,_jsx(_components.code,{children:`/api/v2`}),` will require explicit SDK support rather\nthan silently changing this package’s base path.`]}),`\n`,_jsx(_components.p,{children:`Pin an exact version for controlled production rollouts, or use a compatible\nrange when additive SDK releases are acceptable. Verify the package publisher,\nrepository, version, and changelog before upgrading.`}),`\n`,_jsxs(_components.p,{children:[`Use the `,_jsx(_components.a,{href:`/headless/overview`,children:`Headless SDK guides`}),` for customer-facing UI patterns,\nthe `,_jsx(_components.a,{href:`/widget/install#install-from-npm`,children:`widget package`}),` for a ready-made browser\ninterface, or the `,_jsx(_components.a,{href:`/api/cli`,children:`CLI`}),` for repository and terminal workflows.`]})]})}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":"JavaScript SDK","description":"Use the typed, server-side JavaScript client for Glean Feed's complete public REST API.","sidebarTitle":"JavaScript SDK","icon":"/icons/filled/code.svg","href":"/api/javascript-sdk"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Requirements and install","slug":"requirements-and-install","depth":2,"children":[]},{"title":"Read feedback","slug":"read-feedback","depth":2,"children":[]},{"title":"Create feedback safely","slug":"create-feedback-safely","depth":2,"children":[]},{"title":"Handle errors, timeouts, and cancellation","slug":"handle-errors-timeouts-and-cancellation","depth":2,"children":[]},{"title":"Compatibility and versions","slug":"compatibility-and-versions","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/docs/_mintlify/custom/gleanfeed/77ef72ca4eb06d1a/accessibility.js"],"subdomain":"gleanfeed","siteName":"Glean Feed","title":"JavaScript SDK - Glean Feed","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-07-14T12:38:34.528Z","originalFileLocation":"api/javascript-sdk.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=\"Use the typed, server-side JavaScript client for Glean Feed\u0026#x27;s complete public REST API.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Glean Feed\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/gleanfeed/r2xFMCuqxaZbs1pW/_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=\"/docs/mintlify-assets/_mintlify/favicons/gleanfeed/r2xFMCuqxaZbs1pW/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/gleanfeed/r2xFMCuqxaZbs1pW/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/gleanfeed/r2xFMCuqxaZbs1pW/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/gleanfeed/r2xFMCuqxaZbs1pW/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/gleanfeed/r2xFMCuqxaZbs1pW/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/gleanfeed/r2xFMCuqxaZbs1pW/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/gleanfeed/r2xFMCuqxaZbs1pW/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/gleanfeed/r2xFMCuqxaZbs1pW/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"JavaScript SDK - Glean Feed\">\u003cmeta data-mint-head property=\"og:description\" content=\"Use the typed, server-side JavaScript client for Glean Feed\u0026#x27;s complete public REST API.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Glean Feed\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://gleanfeed.com/docs/api/javascript-sdk\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://gleanfeed.mintlify.site/docs/_mintlify/api/og/v2?division=API+%26+MCP\u0026amp;title=JavaScript+SDK\u0026amp;description=Use+the+typed%2C+server-side+JavaScript+client+for+Glean+Feed%27s+complete+public+REST+API.\u0026amp;theme=337f7cd54256ebd32b426179\u0026amp;signature=af39b49bc2bb2ef7deb9ebf399b16341b44df7b9a6201378b07b9efc6c8d09e8\">\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=\"JavaScript SDK - Glean Feed\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Use the typed, server-side JavaScript client for Glean Feed\u0026#x27;s complete public REST API.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://gleanfeed.mintlify.site/docs/_mintlify/api/og/v2?division=API+%26+MCP\u0026amp;title=JavaScript+SDK\u0026amp;description=Use+the+typed%2C+server-side+JavaScript+client+for+Glean+Feed%27s+complete+public+REST+API.\u0026amp;theme=337f7cd54256ebd32b426179\u0026amp;signature=af39b49bc2bb2ef7deb9ebf399b16341b44df7b9a6201378b07b9efc6c8d09e8\">\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=\"/docs/mintlify-assets/_mintlify/favicons/gleanfeed/r2xFMCuqxaZbs1pW/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Glean Feed\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#1A1816\">\u003clink data-mint-head rel=\"canonical\" href=\"https://gleanfeed.com/docs/api/javascript-sdk\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/api/javascript-sdk.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://gleanfeed.com/#organization\",\"name\":\"Glean Feed\",\"url\":\"https://gleanfeed.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/gleanfeed/9Cksmp6iAukvIiii/brand/glean-lockup.svg?fit=max\u0026auto=format\u0026n=9Cksmp6iAukvIiii\u0026q=85\u0026s=de09e922b5d0a5f97d2a6a4945603fea\"}},{\"@type\":\"WebSite\",\"@id\":\"https://gleanfeed.com/docs#website\",\"name\":\"Glean Feed\",\"url\":\"https://gleanfeed.com/docs\",\"publisher\":{\"@id\":\"https://gleanfeed.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://gleanfeed.com/docs/api/javascript-sdk#webpage\",\"url\":\"https://gleanfeed.com/docs/api/javascript-sdk\",\"name\":\"JavaScript SDK\",\"description\":\"Use the typed, server-side JavaScript client for Glean Feed's complete public REST API.\",\"dateModified\":\"2026-07-14T12:38:34.528Z\",\"isPartOf\":{\"@id\":\"https://gleanfeed.com/docs#website\"},\"breadcrumb\":{\"@id\":\"https://gleanfeed.com/docs/api/javascript-sdk#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://gleanfeed.com/docs/api/javascript-sdk#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"API \u0026 MCP\",\"item\":\"https://gleanfeed.com/docs/api/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"JavaScript SDK\",\"item\":\"https://gleanfeed.com/docs/api/javascript-sdk\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://gleanfeed.com/docs/api/javascript-sdk#article\",\"headline\":\"JavaScript SDK\",\"name\":\"JavaScript SDK\",\"description\":\"Use the typed, server-side JavaScript client for Glean Feed's complete public REST API.\",\"url\":\"https://gleanfeed.com/docs/api/javascript-sdk\",\"mainEntityOfPage\":{\"@id\":\"https://gleanfeed.com/docs/api/javascript-sdk#webpage\"},\"dateModified\":\"2026-07-14T12:38:34.528Z\",\"publisher\":{\"@id\":\"https://gleanfeed.com/#organization\"},\"isPartOf\":{\"@id\":\"https://gleanfeed.com/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Glean Feed\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Glean Feed\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/api/javascript-sdk.md","siteName":"Glean Feed","nav":{"global":null,"tabs":[{"tab":"Product guides","pages":[{"title":"Product guides","href":""}]},{"tab":"Developer guides","groups":[{"group":"Start in your repository","root":{"title":"Build with Glean Feed","sidebarTitle":"Choose an integration","icon":"https://mintlify.s3.us-west-1.amazonaws.com/gleanfeed/icons/filled/code.svg","href":"/developers"},"pages":[{"title":"Glean Feed CLI","sidebarTitle":"CLI overview","icon":"https://mintlify.s3.us-west-1.amazonaws.com/gleanfeed/icons/filled/code.svg","href":"/api/cli"},{"title":"CLI quickstart","sidebarTitle":"Five-minute quickstart","icon":"https://mintlify.s3.us-west-1.amazonaws.com/gleanfeed/icons/filled/rocket.svg","href":"/api/cli-quickstart"},{"title":"CLI command reference","sidebarTitle":"Command reference","icon":"https://mintlify.s3.us-west-1.amazonaws.com/gleanfeed/icons/filled/code.svg","href":"/api/cli-reference"},{"title":"CLI profiles and repository config","sidebarTitle":"Profiles and config","icon":"https://mintlify.s3.us-west-1.amazonaws.com/gleanfeed/icons/filled/settings.svg","href":"/api/cli-profiles"},{"title":"Use the CLI with agents and CI","sidebarTitle":"Agents and CI","icon":"https://mintlify.s3.us-west-1.amazonaws.com/gleanfeed/icons/filled/code.svg","href":"/api/cli-agents-ci"},{"title":"CLI security","sidebarTitle":"Security","icon":"https://mintlify.s3.us-west-1.amazonaws.com/gleanfeed/icons/filled/key.svg","href":"/api/cli-security"},{"title":"Troubleshoot the CLI","sidebarTitle":"Troubleshooting","icon":"https://mintlify.s3.us-west-1.amazonaws.com/gleanfeed/icons/filled/help.svg","href":"/api/cli-troubleshooting"}]},{"group":"API \u0026 MCP","pages":[{"title":"Make your first API request","description":"Create a Glean Feed API key and list feedback requests with one verified REST call.","sidebarTitle":"API quickstart","icon":"https://mintlify.s3.us-west-1.amazonaws.com/gleanfeed/icons/filled/rocket.svg","href":"/api/overview"},{"title":"JavaScript SDK","sidebarTitle":"JavaScript SDK","icon":"https://mintlify.s3.us-west-1.amazonaws.com/gleanfeed/icons/filled/code.svg","href":"/api/javascript-sdk"},{"title":"Authentication","description":"Authenticate REST requests with a workspace API key or OAuth, and connect AI assistants securely.","sidebarTitle":"Authentication","icon":"https://mintlify.s3.us-west-1.amazonaws.com/gleanfeed/icons/filled/key.svg","href":"/api/authentication"},{"title":"Scopes","sidebarTitle":"Scopes","icon":"https://mintlify.s3.us-west-1.amazonaws.com/gleanfeed/icons/filled/key.svg","href":"/api/scopes"},{"title":"Endpoints","sidebarTitle":"Endpoints","icon":"https://mintlify.s3.us-west-1.amazonaws.com/gleanfeed/icons/filled/code.svg","href":"/api/endpoints"},{"title":"Connect over MCP","sidebarTitle":"Connect over MCP","icon":"https://mintlify.s3.us-west-1.amazonaws.com/gleanfeed/icons/filled/link.svg","href":"/api/mcp"},{"title":"Install agent skills","sidebarTitle":"Agent skills","icon":"https://mintlify.s3.us-west-1.amazonaws.com/gleanfeed/icons/filled/code.svg","href":"/api/agent-skills"},{"title":"REST API examples","sidebarTitle":"Examples","icon":"https://mintlify.s3.us-west-1.amazonaws.com/gleanfeed/icons/filled/code.svg","href":"/api/examples"}]},{"group":"Headless SDK","pages":[{"title":"Headless SDK overview","sidebarTitle":"Overview","icon":"https://mintlify.s3.us-west-1.amazonaws.com/gleanfeed/icons/filled/code.svg","href":"/headless/overview"},{"title":"Capture feedback in your own UI","sidebarTitle":"Feedback quickstart","icon":"https://mintlify.s3.us-west-1.amazonaws.com/gleanfeed/icons/filled/feedback.svg","href":"/headless/feedback"},{"title":"Render updates in your own UI","sidebarTitle":"Updates quickstart","icon":"https://mintlify.s3.us-west-1.amazonaws.com/gleanfeed/icons/filled/changelog.svg","href":"/headless/changelog"}]},{"group":"Embed Glean Feed","pages":[{"title":"Install the widget","icon":"https://mintlify.s3.us-west-1.amazonaws.com/gleanfeed/icons/filled/code.svg","href":"/widget/install"},{"title":"Use the widget with React","sidebarTitle":"React","icon":"https://mintlify.s3.us-west-1.amazonaws.com/gleanfeed/icons/filled/code.svg","href":"/widget/react"},{"title":"Configure the widget","sidebarTitle":"Configuration","icon":"https://mintlify.s3.us-west-1.amazonaws.com/gleanfeed/icons/filled/sliders.svg","href":"/widget/configuration"},{"title":"Identify customers","sidebarTitle":"Identity","icon":"https://mintlify.s3.us-west-1.amazonaws.com/gleanfeed/icons/filled/key.svg","href":"/widget/identity"},{"title":"Widget notifications","sidebarTitle":"Notifications","icon":"https://mintlify.s3.us-west-1.amazonaws.com/gleanfeed/icons/filled/bell.svg","href":"/widget/notifications"},{"title":"Web package compatibility","sidebarTitle":"Versions and compatibility","icon":"https://mintlify.s3.us-west-1.amazonaws.com/gleanfeed/icons/filled/code.svg","href":"/widget/versions"},{"title":"Troubleshoot the widget","sidebarTitle":"Troubleshooting","icon":"https://mintlify.s3.us-west-1.amazonaws.com/gleanfeed/icons/filled/help.svg","href":"/widget/troubleshooting"}]},{"group":"iOS SDK","pages":[{"title":"iOS SDK overview","sidebarTitle":"Overview","icon":"https://mintlify.s3.us-west-1.amazonaws.com/gleanfeed/icons/filled/book-open.svg","href":"/ios-sdk/overview"},{"title":"Install the iOS SDK","sidebarTitle":"Install","icon":"https://mintlify.s3.us-west-1.amazonaws.com/gleanfeed/icons/filled/code.svg","href":"/ios-sdk/install"},{"title":"Identify customers","sidebarTitle":"Identity","icon":"https://mintlify.s3.us-west-1.amazonaws.com/gleanfeed/icons/filled/key.svg","href":"/ios-sdk/identity"},{"title":"Self-service sign-in","sidebarTitle":"Self-service sign-in","icon":"https://mintlify.s3.us-west-1.amazonaws.com/gleanfeed/icons/filled/key.svg","href":"/ios-sdk/self-service-auth"},{"title":"Unread count","sidebarTitle":"Unread count","icon":"https://mintlify.s3.us-west-1.amazonaws.com/gleanfeed/icons/filled/bell.svg","href":"/ios-sdk/notifications"},{"title":"Diagnostics and privacy","sidebarTitle":"Diagnostics \u0026 privacy","icon":"https://mintlify.s3.us-west-1.amazonaws.com/gleanfeed/icons/filled/sliders.svg","href":"/ios-sdk/diagnostics"},{"title":"Troubleshooting","sidebarTitle":"Troubleshooting","icon":"https://mintlify.s3.us-west-1.amazonaws.com/gleanfeed/icons/filled/help.svg","href":"/ios-sdk/troubleshooting"}]}]}]},"basePath":"","title":"JavaScript SDK - Glean Feed","deploymentId":"dpl_DPZjiNpvAcGiwobuijLfKPtJL4Ux","buildId":"dpl_DPZjiNpvAcGiwobuijLfKPtJL4Ux","dynamics":[],"chunks":[]}