[{"data":1,"prerenderedAt":687},["ShallowReactive",2],{"navigation_docs_en":3,"-en-api-authentication":333,"-en-api-authentication-surround":682},[4,8,26,52,94,124,174,188,198,224,234,244,289,319],{"title":5,"path":6,"stem":7},"Introduction","\u002Fen\u002Fintroduction","en\u002F01.introduction",{"title":9,"path":10,"stem":11,"children":12},"Getting started","\u002Fen\u002Fgetting-started","en\u002F02.getting-started\u002Findex",[13,14,18,22],{"title":9,"path":10,"stem":11},{"title":15,"path":16,"stem":17},"Initial setup","\u002Fen\u002Fgetting-started\u002Finitial-setup","en\u002F02.getting-started\u002F01.initial-setup",{"title":19,"path":20,"stem":21},"Create your first agent","\u002Fen\u002Fgetting-started\u002Ffirst-agent","en\u002F02.getting-started\u002F02.first-agent",{"title":23,"path":24,"stem":25},"Make a test call","\u002Fen\u002Fgetting-started\u002Ftest-call","en\u002F02.getting-started\u002F03.test-call",{"title":27,"path":28,"stem":29,"children":30},"Concepts","\u002Fen\u002Fconcepts","en\u002F03.concepts\u002Findex",[31,32,36,40,44,48],{"title":27,"path":28,"stem":29},{"title":33,"path":34,"stem":35},"Voice agent","\u002Fen\u002Fconcepts\u002Fagent","en\u002F03.concepts\u002F01.agent",{"title":37,"path":38,"stem":39},"Flow","\u002Fen\u002Fconcepts\u002Fflow","en\u002F03.concepts\u002F02.flow",{"title":41,"path":42,"stem":43},"Runtime","\u002Fen\u002Fconcepts\u002Fruntime","en\u002F03.concepts\u002F03.runtime",{"title":45,"path":46,"stem":47},"Organization and tenants","\u002Fen\u002Fconcepts\u002Forganization","en\u002F03.concepts\u002F04.organization",{"title":49,"path":50,"stem":51},"Prompt Builder","\u002Fen\u002Fconcepts\u002Fprompt-builder","en\u002F03.concepts\u002F05.prompt-builder",{"title":53,"path":54,"stem":55,"children":56},"Guides","\u002Fen\u002Fguides","en\u002F04.guides\u002Findex",[57,58,62,66,70,74,78,82,86,90],{"title":53,"path":54,"stem":55},{"title":59,"path":60,"stem":61},"Create your first agent step-by-step","\u002Fen\u002Fguides\u002Fcreate-first-agent","en\u002F04.guides\u002F01.create-first-agent",{"title":63,"path":64,"stem":65},"Use the Flow Builder","\u002Fen\u002Fguides\u002Fuse-flow-builder","en\u002F04.guides\u002F02.use-flow-builder",{"title":67,"path":68,"stem":69},"Publish and receive calls","\u002Fen\u002Fguides\u002Fpublish-agent","en\u002F04.guides\u002F03.publish-agent",{"title":71,"path":72,"stem":73},"Test an agent","\u002Fen\u002Fguides\u002Ftest-agent","en\u002F04.guides\u002F04.test-agent",{"title":75,"path":76,"stem":77},"Transfer to a human","\u002Fen\u002Fguides\u002Ftransfer-to-human","en\u002F04.guides\u002F05.transfer-to-human",{"title":79,"path":80,"stem":81},"Schedule meetings with Cal.com","\u002Fen\u002Fguides\u002Fbook-meetings","en\u002F04.guides\u002F06.book-meetings",{"title":83,"path":84,"stem":85},"Send SMS during a call","\u002Fen\u002Fguides\u002Fsend-sms","en\u002F04.guides\u002F07.send-sms",{"title":87,"path":88,"stem":89},"Configure a Phone Book","\u002Fen\u002Fguides\u002Fconfigure-phone-book","en\u002F04.guides\u002F08.configure-phone-book",{"title":91,"path":92,"stem":93},"Embed the voice widget","\u002Fen\u002Fguides\u002Fembed-widget","en\u002F04.guides\u002F09.embed-widget",{"title":95,"path":96,"stem":97,"children":98},"Flow Builder","\u002Fen\u002Fflow-builder","en\u002F05.flow-builder\u002Findex",[99,100,104,108,112,116,120],{"title":95,"path":96,"stem":97},{"title":101,"path":102,"stem":103},"Builder interface","\u002Fen\u002Fflow-builder\u002Finterface","en\u002F05.flow-builder\u002F01.interface",{"title":105,"path":106,"stem":107},"Flow structure","\u002Fen\u002Fflow-builder\u002Fstructure","en\u002F05.flow-builder\u002F02.structure",{"title":109,"path":110,"stem":111},"Flow variables","\u002Fen\u002Fflow-builder\u002Fvariables","en\u002F05.flow-builder\u002F03.variables",{"title":113,"path":114,"stem":115},"Branches and conditions","\u002Fen\u002Fflow-builder\u002Fbranches","en\u002F05.flow-builder\u002F04.branches",{"title":117,"path":118,"stem":119},"Test a flow","\u002Fen\u002Fflow-builder\u002Ftesting","en\u002F05.flow-builder\u002F05.testing",{"title":121,"path":122,"stem":123},"Validation and publishing","\u002Fen\u002Fflow-builder\u002Fvalidation-publishing","en\u002F05.flow-builder\u002F06.validation-publishing",{"title":125,"path":126,"stem":127,"children":128},"Nodes","\u002Fen\u002Fnodes","en\u002F06.nodes\u002Findex",[129,130,134,138,142,146,150,154,158,162,166,170],{"title":125,"path":126,"stem":127},{"title":131,"path":132,"stem":133},"Conversation","\u002Fen\u002Fnodes\u002Fconversation","en\u002F06.nodes\u002F01.conversation",{"title":135,"path":136,"stem":137},"Message","\u002Fen\u002Fnodes\u002Fmessage","en\u002F06.nodes\u002F02.message",{"title":139,"path":140,"stem":141},"Split path","\u002Fen\u002Fnodes\u002Fsplit-path","en\u002F06.nodes\u002F03.split-path",{"title":143,"path":144,"stem":145},"Jump to","\u002Fen\u002Fnodes\u002Fjump-to","en\u002F06.nodes\u002F04.jump-to",{"title":147,"path":148,"stem":149},"Trigger subflow","\u002Fen\u002Fnodes\u002Ftrigger-subflow","en\u002F06.nodes\u002F05.trigger-subflow",{"title":151,"path":152,"stem":153},"Custom action","\u002Fen\u002Fnodes\u002Fcustom-action","en\u002F06.nodes\u002F06.custom-action",{"title":155,"path":156,"stem":157},"Send SMS during the call","\u002Fen\u002Fnodes\u002Fsend-sms-during-call","en\u002F06.nodes\u002F07.send-sms-during-call",{"title":159,"path":160,"stem":161},"Transfer","\u002Fen\u002Fnodes\u002Ftransfer","en\u002F06.nodes\u002F08.transfer",{"title":163,"path":164,"stem":165},"Booking","\u002Fen\u002Fnodes\u002Fbooking","en\u002F06.nodes\u002F09.booking",{"title":167,"path":168,"stem":169},"End call","\u002Fen\u002Fnodes\u002Fend-call","en\u002F06.nodes\u002F10.end-call",{"title":171,"path":172,"stem":173},"Nodes coming soon","\u002Fen\u002Fnodes\u002Fcoming-soon","en\u002F06.nodes\u002F11.coming-soon",{"title":175,"path":176,"stem":177,"children":178},"Knowledge Base","\u002Fen\u002Fknowledge-base","en\u002F07.knowledge-base\u002Findex",[179,180,184],{"title":175,"path":176,"stem":177},{"title":181,"path":182,"stem":183},"Sources","\u002Fen\u002Fknowledge-base\u002Fsources","en\u002F07.knowledge-base\u002F01.sources",{"title":185,"path":186,"stem":187},"Citations","\u002Fen\u002Fknowledge-base\u002Fcitations","en\u002F07.knowledge-base\u002F02.citations",{"title":189,"path":190,"stem":191,"children":192},"Test Center","\u002Fen\u002Ftest-center","en\u002F08.test-center\u002Findex",[193,194],{"title":189,"path":190,"stem":191},{"title":195,"path":196,"stem":197},"Evaluations","\u002Fen\u002Ftest-center\u002Fevaluations","en\u002F08.test-center\u002F01.evaluations",{"title":199,"path":200,"stem":201,"children":202},"API","\u002Fen\u002Fapi","en\u002F09.api\u002Findex",[203,204,208,212,216,220],{"title":199,"path":200,"stem":201},{"title":205,"path":206,"stem":207},"API Channel","\u002Fen\u002Fapi\u002Fapi-channel","en\u002F09.api\u002F01.api-channel",{"title":209,"path":210,"stem":211},"Authentication","\u002Fen\u002Fapi\u002Fauthentication","en\u002F09.api\u002F02.authentication",{"title":213,"path":214,"stem":215},"Webhooks","\u002Fen\u002Fapi\u002Fwebhooks","en\u002F09.api\u002F03.webhooks",{"title":217,"path":218,"stem":219},"Endpoints","\u002Fen\u002Fapi\u002Fendpoints","en\u002F09.api\u002F04.endpoints",{"title":221,"path":222,"stem":223},"Realtime","\u002Fen\u002Fapi\u002Frealtime","en\u002F09.api\u002F05.realtime",{"title":225,"path":226,"stem":227,"children":228},"Integrations","\u002Fen\u002Fintegrations","en\u002F10.integrations\u002Findex",[229,230],{"title":225,"path":226,"stem":227},{"title":231,"path":232,"stem":233},"Cal.com","\u002Fen\u002Fintegrations\u002Fcalcom","en\u002F10.integrations\u002F01.calcom",{"title":235,"path":236,"stem":237,"children":238},"Telephony","\u002Fen\u002Ftelephony","en\u002F11.telephony\u002Findex",[239,240],{"title":235,"path":236,"stem":237},{"title":241,"path":242,"stem":243},"Phone numbers","\u002Fen\u002Ftelephony\u002Fnumbers","en\u002F11.telephony\u002F01.numbers",{"title":245,"path":246,"stem":247,"children":248},"Settings","\u002Fen\u002Fsettings","en\u002F12.settings\u002Findex",[249,250,254,258,262,266,270,274,278,282,285],{"title":245,"path":246,"stem":247},{"title":251,"path":252,"stem":253},"Personal profile","\u002Fen\u002Fsettings\u002Fpersonal-profile","en\u002F12.settings\u002F01.personal-profile",{"title":255,"path":256,"stem":257},"Credentials","\u002Fen\u002Fsettings\u002Fcredentials","en\u002F12.settings\u002F02.credentials",{"title":259,"path":260,"stem":261},"Password","\u002Fen\u002Fsettings\u002Fpassword","en\u002F12.settings\u002F03.password",{"title":263,"path":264,"stem":265},"Two-factor authentication","\u002Fen\u002Fsettings\u002Ftwo-factor","en\u002F12.settings\u002F04.two-factor",{"title":267,"path":268,"stem":269},"Active sessions","\u002Fen\u002Fsettings\u002Fsessions","en\u002F12.settings\u002F05.sessions",{"title":271,"path":272,"stem":273},"Company","\u002Fen\u002Fsettings\u002Fcompany","en\u002F12.settings\u002F06.company",{"title":275,"path":276,"stem":277},"Organization","\u002Fen\u002Fsettings\u002Forganization","en\u002F12.settings\u002F07.organization",{"title":279,"path":280,"stem":281},"Members","\u002Fen\u002Fsettings\u002Fmembers","en\u002F12.settings\u002F08.members",{"title":225,"path":283,"stem":284},"\u002Fen\u002Fsettings\u002Fintegrations","en\u002F12.settings\u002F09.integrations",{"title":286,"path":287,"stem":288},"API Keys","\u002Fen\u002Fsettings\u002Fapi-keys","en\u002F12.settings\u002F10.api-keys",{"title":290,"path":291,"stem":292,"children":293},"Troubleshooting","\u002Fen\u002Ftroubleshooting","en\u002F13.troubleshooting\u002Findex",[294,295,299,303,307,311,315],{"title":290,"path":291,"stem":292},{"title":296,"path":297,"stem":298},"Agent not answering","\u002Fen\u002Ftroubleshooting\u002Fagent-not-answering","en\u002F13.troubleshooting\u002F01.agent-not-answering",{"title":300,"path":301,"stem":302},"Calls dropping","\u002Fen\u002Ftroubleshooting\u002Fcalls-drop","en\u002F13.troubleshooting\u002F02.calls-drop",{"title":304,"path":305,"stem":306},"Flow won't publish","\u002Fen\u002Ftroubleshooting\u002Fflow-not-publishing","en\u002F13.troubleshooting\u002F03.flow-not-publishing",{"title":308,"path":309,"stem":310},"Knowledge Base not responding","\u002Fen\u002Ftroubleshooting\u002Fkb-not-answering","en\u002F13.troubleshooting\u002F04.kb-not-answering",{"title":312,"path":313,"stem":314},"Integration won't connect","\u002Fen\u002Ftroubleshooting\u002Fintegration-not-connecting","en\u002F13.troubleshooting\u002F05.integration-not-connecting",{"title":316,"path":317,"stem":318},"Tests failing","\u002Fen\u002Ftroubleshooting\u002Ftests-failing","en\u002F13.troubleshooting\u002F06.tests-failing",{"title":320,"path":321,"stem":322,"children":323,"page":332},"Legal","\u002Fen\u002Flegal","en\u002F14.legal",[324,328],{"title":325,"path":326,"stem":327},"Privacy Policy","\u002Fen\u002Flegal\u002Fprivacy","en\u002F14.legal\u002F01.privacy",{"title":329,"path":330,"stem":331},"Terms and Conditions","\u002Fen\u002Flegal\u002Fterms","en\u002F14.legal\u002F02.terms",false,{"id":334,"title":209,"body":335,"description":675,"extension":676,"links":677,"meta":678,"navigation":679,"path":210,"seo":680,"stem":211,"__hash__":681},"docs_en\u002Fen\u002F09.api\u002F02.authentication.md",{"type":336,"value":337,"toc":667},"minimark",[338,342,406,415,420,438,441,457,466,478,482,493,509,514,521,530,557,561,564,618,621,625,663],[339,340,341],"p",{},"Diska has two authentication mechanisms, for two different uses:",[343,344,345,361],"table",{},[346,347,348],"thead",{},[349,350,351,355,358],"tr",{},[352,353,354],"th",{},"Use",[352,356,357],{},"Mechanism",[352,359,360],{},"Surface",[362,363,364,389],"tbody",{},[349,365,366,373,380],{},[367,368,369,372],"td",{},[370,371,225],"strong",{}," (your code talking to Diska)",[367,374,375,379],{},[376,377,378],"code",{},"dsk_…"," API key",[367,381,382,385,386],{},[383,384,205],"a",{"href":206}," — ",[376,387,388],{},"https:\u002F\u002Fapi.diska.ai\u002Fv1",[349,390,391,397,400],{},[367,392,393,396],{},[370,394,395],{},"Backoffice"," (people using app.diska.ai)",[367,398,399],{},"Better Auth session (JWT)",[367,401,402,403],{},"Internal API — ",[376,404,405],{},"\u002Fapi\u002Fv1",[407,408,410,411,414],"callout",{"type":409},"tip","If you are building an integration, use ",[370,412,413],{},"API keys and the API Channel",". Backoffice session tokens belong to the product: their format and the internal endpoints they authenticate can change without notice.",[416,417,419],"h2",{"id":418},"api-keys-api-channel","API keys (API Channel)",[339,421,422,423,426,427,429,430,432,433,437],{},"API keys are managed in ",[370,424,425],{},"Settings → API Keys"," and authenticate the ",[383,428,205],{"href":206}," — the public REST surface at ",[376,431,388],{},". Each key has a name, an optional description, a masked preview, ",[383,434,436],{"href":435},"\u002Fen\u002Fapi\u002Fapi-channel#scopes","optional scopes"," (no scopes = full access), an optional expiry, a creation date and last use, and can be revoked at any time.",[339,439,440],{},"The key is sent in one of these headers:",[442,443,448],"pre",{"className":444,"code":445,"language":446,"meta":447,"style":447},"language-http shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","Authorization: Bearer dsk_…\n","http","",[376,449,450],{"__ignoreMap":447},[451,452,455],"span",{"class":453,"line":454},"line",1,[451,456,445],{},[442,458,460],{"className":444,"code":459,"language":446,"meta":447,"style":447},"X-API-Key: dsk_…\n",[376,461,462],{"__ignoreMap":447},[451,463,464],{"class":453,"line":454},[451,465,459],{},[339,467,468,469,471,472,474,475,477],{},"A key acts only on its own organization's data — reads (agents, calls, analytics, numbers, knowledge) plus the writes its scopes allow (agent create\u002Fpublish, knowledge ingestion, webhook management); it is not accepted by any internal ",[376,470,405],{}," endpoint. See ",[383,473,286],{"href":287}," for management and ",[383,476,205],{"href":206}," for the endpoints.",[416,479,481],{"id":480},"backoffice-sessions-better-auth","Backoffice sessions (Better Auth)",[339,483,484,485,488,489,492],{},"Signing in to ",[376,486,487],{},"app.diska.ai"," is handled by Diska's identity service, built on ",[370,490,491],{},"Better Auth",". After login, the backoffice sends a short-lived, asymmetrically signed JWT with every internal API request, verified by the API via JWKS — no shared secret ever leaves the identity service:",[442,494,496],{"className":444,"code":495,"language":446,"meta":447,"style":447},"Authorization: Bearer \u003Cjwt>\nX-Organization-Id: \u003Corganization_id>\n",[376,497,498,503],{"__ignoreMap":447},[451,499,500],{"class":453,"line":454},[451,501,502],{},"Authorization: Bearer \u003Cjwt>\n",[451,504,506],{"class":453,"line":505},2,[451,507,508],{},"X-Organization-Id: \u003Corganization_id>\n",[510,511,513],"h3",{"id":512},"organization-selection","Organization selection",[339,515,516,517,520],{},"A user may belong to multiple organizations. The active organization is determined by the ",[376,518,519],{},"X-Organization-Id"," header; the backoffice lists the user's organizations and records the switch:",[442,522,524],{"className":444,"code":523,"language":446,"meta":447,"style":447},"GET \u002Fapi\u002Fv1\u002Forganizations\n",[376,525,526],{"__ignoreMap":447},[451,527,528],{"class":453,"line":454},[451,529,523],{},[442,531,533],{"className":444,"code":532,"language":446,"meta":447,"style":447},"POST \u002Fapi\u002Fv1\u002Forganizations\u002Fswitch\n{\n  \"organization_id\": \"\u003Cid>\"\n}\n",[376,534,535,540,545,551],{"__ignoreMap":447},[451,536,537],{"class":453,"line":454},[451,538,539],{},"POST \u002Fapi\u002Fv1\u002Forganizations\u002Fswitch\n",[451,541,542],{"class":453,"line":505},[451,543,544],{},"{\n",[451,546,548],{"class":453,"line":547},3,[451,549,550],{},"  \"organization_id\": \"\u003Cid>\"\n",[451,552,554],{"class":453,"line":553},4,[451,555,556],{},"}\n",[510,558,560],{"id":559},"organization-roles","Organization roles",[339,562,563],{},"Access within an organization is defined by the member's role:",[343,565,566,576],{},[346,567,568],{},[349,569,570,573],{},[352,571,572],{},"Role",[352,574,575],{},"Summary",[362,577,578,588,598,608],{},[349,579,580,585],{},[367,581,582],{},[376,583,584],{},"owner",[367,586,587],{},"Full control, including deleting the organization.",[349,589,590,595],{},[367,591,592],{},[376,593,594],{},"admin",[367,596,597],{},"Organization settings, members, API keys, archiving and deletions.",[349,599,600,605],{},[367,601,602],{},[376,603,604],{},"editor",[367,606,607],{},"Creates, edits and publishes agents, flows, knowledge and actions.",[349,609,610,615],{},[367,611,612],{},[376,613,614],{},"viewer",[367,616,617],{},"Read-only (agents, history, analytics) plus testing, no changes.",[339,619,620],{},"Permission checks are performed server-side from the role; internal permission identifiers are not part of the public contract.",[416,622,624],{"id":623},"authentication-errors","Authentication errors",[343,626,627,637],{},[346,628,629],{},[349,630,631,634],{},[352,632,633],{},"Code",[352,635,636],{},"Meaning",[362,638,639,647,655],{},[349,640,641,644],{},[367,642,643],{},"401",[367,645,646],{},"Credential missing, invalid, expired or revoked.",[349,648,649,652],{},[367,650,651],{},"403",[367,653,654],{},"Not allowed (insufficient role or scope) or organization suspended.",[349,656,657,660],{},[367,658,659],{},"404",[367,661,662],{},"Resource does not exist or belongs to another organization.",[664,665,666],"style",{},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":447,"searchDepth":505,"depth":505,"links":668},[669,670,674],{"id":418,"depth":505,"text":419},{"id":480,"depth":505,"text":481,"children":671},[672,673],{"id":512,"depth":547,"text":513},{"id":559,"depth":547,"text":560},{"id":623,"depth":505,"text":624},"API keys for integrations and Better Auth sessions for the backoffice.","md",null,{},true,{"title":209,"description":675},"2Nl7vP7eCFrXS3uah8OAkltbOho_8Te4_VA58bb41as",[683,685],{"title":205,"path":206,"stem":207,"description":684,"children":-1},"Access your organization's data over REST with API keys.",{"title":213,"path":214,"stem":215,"description":686,"children":-1},"Outbound (call event) and inbound webhooks supported by Diska.",1786954568475]