[{"data":1,"prerenderedAt":191},["ShallowReactive",2],{"academy-step:en:website-server-relay:2026-08-12-interactive:understand-api-v2":3},{"outline":4,"page":46},[5,22],{"chapterId":6,"title":7,"steps":8},"server-relay-contract","Understand the contract",[9],{"stepId":10,"ref":11,"pageRef":14,"route":18,"title":19,"description":20,"durationMinutes":21},"understand-api-v2",{"courseId":12,"revisionId":13,"stepId":10},"website-server-relay","2026-08-12-interactive",{"spaceId":15,"versionId":16,"docId":17},"api","v2","api-overview","\u002Fen\u002Facademy\u002Fwebsite-server-relay\u002F2026-08-12-interactive\u002Funderstand-api-v2","TalkIt API v2 overview","Understand the current TalkIt HTTP API version, authentication boundary, and response conventions.",5,{"chapterId":23,"title":24,"steps":25},"server-relay-implementation","Implement the client flow",[26,37],{"stepId":27,"ref":28,"pageRef":29,"route":33,"title":34,"description":35,"durationMinutes":36},"choose-javascript-sdk",{"courseId":12,"revisionId":13,"stepId":27},{"spaceId":30,"versionId":31,"docId":32},"sdk",null,"javascript-sdk","\u002Fen\u002Facademy\u002Fwebsite-server-relay\u002F2026-08-12-interactive\u002Fchoose-javascript-sdk","TalkIt JavaScript SDK","Install the TalkIt browser SDK and choose the supported chat, voice, or server-relay entry point.",7,{"stepId":38,"ref":39,"pageRef":40,"route":42,"title":43,"description":44,"durationMinutes":45},"connect-web-chat",{"courseId":12,"revisionId":13,"stepId":38},{"spaceId":41,"versionId":31,"docId":38},"integrations","\u002Fen\u002Facademy\u002Fwebsite-server-relay\u002F2026-08-12-interactive\u002Fconnect-web-chat","Connect Web Chat with server relay","Connect an authenticated website user to TalkIt without exposing Website integration credentials.",12,{"id":47,"title":19,"authors":48,"badges":50,"body":51,"contentType":179,"deprecatedSince":31,"description":20,"docId":17,"durationMinutes":21,"extension":180,"introducedIn":16,"meta":181,"navigation":182,"path":183,"releaseVersion":31,"removedIn":31,"seo":184,"spaceId":15,"status":185,"stem":186,"tags":187,"updatedAt":189,"version":16,"__hash__":190},"docs_en\u002Fdocs\u002Fapi\u002Fv2\u002Fapi-overview.md",[49],"talkit-docs",[],{"type":52,"value":53,"toc":173},"minimark",[54,58,63,71,75,78,86,90,97,146,149,153,162,169],[55,56,57],"p",{},"API v2 is the current TalkIt HTTP contract. Current reference pages use stable URLs without a version segment; the version label on the page identifies the contract being shown.",[59,60,62],"h2",{"id":61},"base-url","Base URL",[55,64,65,66,70],{},"Use the HTTPS base URL assigned to your TalkIt deployment. Examples in this\nreference use ",[67,68,69],"code",{},"https:\u002F\u002Fyour-talkit-host.example",".",[59,72,74],{"id":73},"authentication-boundary","Authentication boundary",[55,76,77],{},"Server endpoints that accept a Website client secret must be called only from a trusted backend. The backend exchanges that credential for a short-lived grant and returns only the grant to the authenticated browser client.",[79,80,83],"doc-callout",{"title":81,"type":82},"Never expose a client secret","danger",[55,84,85],{},"Do not embed a Website client secret in JavaScript, a mobile web bundle, a URL, or a browser-visible environment variable.",[59,87,89],{"id":88},"response-envelope","Response envelope",[55,91,92,93,96],{},"Successful HTTP responses may wrap their result in a ",[67,94,95],{},"data"," property:",[98,99,104],"pre",{"className":100,"code":101,"language":102,"meta":103,"style":103},"language-json shiki shiki-themes github-light github-dark","{\n  \"success\": true,\n  \"data\": {}\n}\n","json","",[67,105,106,115,131,140],{"__ignoreMap":103},[107,108,111],"span",{"class":109,"line":110},"line",1,[107,112,114],{"class":113},"sVt8B","{\n",[107,116,118,122,125,128],{"class":109,"line":117},2,[107,119,121],{"class":120},"sj4cs","  \"success\"",[107,123,124],{"class":113},": ",[107,126,127],{"class":120},"true",[107,129,130],{"class":113},",\n",[107,132,134,137],{"class":109,"line":133},3,[107,135,136],{"class":120},"  \"data\"",[107,138,139],{"class":113},": {}\n",[107,141,143],{"class":109,"line":142},4,[107,144,145],{"class":113},"}\n",[55,147,148],{},"Client code should also use the HTTP status. Do not treat a JSON body as successful when the response status is not successful.",[59,150,152],{"id":151},"website-endpoints","Website endpoints",[55,154,155,156,161],{},"Start with ",[157,158,160],"a",{"href":159},"website-server-session-grant","Create a server-relay Website session grant"," to issue a one-use text or voice grant from a trusted backend.",[55,163,164,165,70],{},"For browser client setup, continue to the ",[157,166,168],{"href":167},"..\u002Fsdk\u002Fjavascript-sdk","JavaScript SDK guide",[170,171,172],"style",{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":103,"searchDepth":133,"depth":133,"links":174},[175,176,177,178],{"id":61,"depth":117,"text":62},{"id":73,"depth":117,"text":74},{"id":88,"depth":117,"text":89},{"id":151,"depth":117,"text":152},"reference","md",{},true,"\u002Fdocs\u002Fapi\u002Fv2\u002Fapi-overview",{"title":19,"description":20},"published","docs\u002Fapi\u002Fv2\u002Fapi-overview",[15,188],"authentication","2026-08-12","9s72X4NxbHSNeKxP3irOtzhX8xyO4BCVc-pXci6P5Wk",1792741583032]