[{"data":1,"prerenderedAt":672},["ShallowReactive",2],{"navigation_docs_en":3,"-en-api-webhooks":333,"-en-api-webhooks-surround":667},[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":213,"body":335,"description":661,"extension":662,"links":663,"meta":664,"navigation":529,"path":214,"seo":665,"stem":215,"__hash__":666},"docs_en\u002Fen\u002F09.api\u002F03.webhooks.md",{"type":336,"value":337,"toc":650},"minimark",[338,342,347,359,406,418,423,491,495,498,506,513,546,549,553,603,607,611,620,623,626,632,635,639,646],[339,340,341],"p",{},"Diska sends outbound webhooks to your systems when events happen (completed calls, bookings) and receives external webhooks for asynchronous events.",[343,344,346],"h2",{"id":345},"outbound-webhooks-call-events","Outbound webhooks (call events)",[339,348,349,350,353,354,358],{},"Register endpoints via the ",[351,352,205],"a",{"href":206}," with the ",[355,356,357],"code",{},"webhooks:manage"," scope:",[360,361,366],"pre",{"className":362,"code":363,"language":364,"meta":365,"style":365},"language-http shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","POST \u002Fv1\u002Fwebhook-endpoints\nAuthorization: Bearer dsk_…\n{\n  \"url\": \"https:\u002F\u002Fyour-system.com\u002Fhooks\u002Fdiska\",\n  \"events\": [\"call.completed\"]\n}\n","http","",[355,367,368,376,382,388,394,400],{"__ignoreMap":365},[369,370,373],"span",{"class":371,"line":372},"line",1,[369,374,375],{},"POST \u002Fv1\u002Fwebhook-endpoints\n",[369,377,379],{"class":371,"line":378},2,[369,380,381],{},"Authorization: Bearer dsk_…\n",[369,383,385],{"class":371,"line":384},3,[369,386,387],{},"{\n",[369,389,391],{"class":371,"line":390},4,[369,392,393],{},"  \"url\": \"https:\u002F\u002Fyour-system.com\u002Fhooks\u002Fdiska\",\n",[369,395,397],{"class":371,"line":396},5,[369,398,399],{},"  \"events\": [\"call.completed\"]\n",[369,401,403],{"class":371,"line":402},6,[369,404,405],{},"}\n",[339,407,408,409,413,414,417],{},"The response includes the ",[410,411,412],"strong",{},"signing secret"," (",[355,415,416],{},"dskw_…",") — store it: it is shown only once.",[419,420,422],"h3",{"id":421},"available-events","Available events",[424,425,426,442],"table",{},[427,428,429],"thead",{},[430,431,432,436,439],"tr",{},[433,434,435],"th",{},"Event",[433,437,438],{},"When it fires",[433,440,441],{},"Payload",[443,444,445,471],"tbody",{},[430,446,447,453,460],{},[448,449,450],"td",{},[355,451,452],{},"call.completed",[448,454,455,456,459],{},"A call finishes successfully and post-call processing completes. Failed, cancelled or abandoned calls do ",[410,457,458],{},"not"," fire this event.",[448,461,462,463,466,467,470],{},"Full transcript, extracted data, evaluations, sentiment, executed actions, ",[355,464,465],{},"call_id"," (usable with ",[355,468,469],{},"GET \u002Fv1\u002Fcalls\u002F{call_id}",").",[430,472,473,478,481],{},[448,474,475],{},[355,476,477],{},"booking.created",[448,479,480],{},"A booking is created during a call.",[448,482,483,486,487,490],{},[355,484,485],{},"booking_id",", ",[355,488,489],{},"session_id",".",[419,492,494],{"id":493},"verifying-the-signature","Verifying the signature",[339,496,497],{},"Every delivery includes the headers:",[360,499,504],{"className":500,"code":502,"language":503,"meta":365},[501],"language-text","X-Diska-Event:      call.completed\nX-Diska-Delivery:   \u003Cunique delivery uuid>\nX-Diska-Timestamp:  \u003Cunix seconds>\nX-Diska-Signature:  sha256=\u003Chex>\n","text",[355,505,502],{"__ignoreMap":365},[339,507,508,509,512],{},"The signature is an HMAC-SHA256 of the text ",[355,510,511],{},"{timestamp}.{request body}"," with the endpoint's secret:",[360,514,518],{"className":515,"code":516,"language":517,"meta":365,"style":365},"language-python shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import hashlib, hmac\n\ndef is_valid(secret: str, timestamp: str, body: bytes, signature: str) -> bool:\n    expected = hmac.new(secret.encode(), f\"{timestamp}.\".encode() + body, hashlib.sha256).hexdigest()\n    return hmac.compare_digest(f\"sha256={expected}\", signature)\n","python",[355,519,520,525,531,536,541],{"__ignoreMap":365},[369,521,522],{"class":371,"line":372},[369,523,524],{},"import hashlib, hmac\n",[369,526,527],{"class":371,"line":378},[369,528,530],{"emptyLinePlaceholder":529},true,"\n",[369,532,533],{"class":371,"line":384},[369,534,535],{},"def is_valid(secret: str, timestamp: str, body: bytes, signature: str) -> bool:\n",[369,537,538],{"class":371,"line":390},[369,539,540],{},"    expected = hmac.new(secret.encode(), f\"{timestamp}.\".encode() + body, hashlib.sha256).hexdigest()\n",[369,542,543],{"class":371,"line":396},[369,544,545],{},"    return hmac.compare_digest(f\"sha256={expected}\", signature)\n",[339,547,548],{},"Reject requests whose timestamp is older than 5 minutes to prevent replay.",[419,550,552],{"id":551},"delivery-and-failures","Delivery and failures",[554,555,556,564,571,585,596],"ul",{},[557,558,559,560,563],"li",{},"Respond ",[355,561,562],{},"2xx"," quickly (ideally: enqueue and process later). Any other response counts as a failure.",[557,565,566,567,570],{},"Each delivery is attempted up to 3 times with backoff; ",[355,568,569],{},"4xx"," errors (except 408\u002F429) are not retried.",[557,572,573,574,577,578,581,582,490],{},"After 20 consecutive failures the endpoint is disabled automatically (",[355,575,576],{},"disabled_reason"," explains). Fix it and re-enable with ",[355,579,580],{},"PATCH \u002Fv1\u002Fwebhook-endpoints\u002F{id}"," ",[355,583,584],{},"{\"active\": true}",[557,586,587,588,591,592,595],{},"Use ",[355,589,590],{},"POST \u002Fv1\u002Fwebhook-endpoints\u002F{id}\u002Ftest"," to receive a signed ",[355,593,594],{},"ping"," and validate your implementation.",[557,597,598,599,602],{},"Delivery is best-effort: for reconciliation, ",[355,600,601],{},"GET \u002Fv1\u002Fcalls"," remains the source of truth.",[343,604,606],{"id":605},"inbound-webhooks","Inbound webhooks",[419,608,610],{"id":609},"sms-inbound","SMS inbound",[360,612,614],{"className":362,"code":613,"language":364,"meta":365,"style":365},"POST \u002Fapi\u002Fv1\u002Fwebhooks\u002Fsms\u002Finbound\n",[355,615,616],{"__ignoreMap":365},[369,617,618],{"class":371,"line":372},[369,619,613],{},[339,621,622],{},"Receives SMS messages from the provider Ombala. The body varies depending on the provider payload. The API validates the origin, associates the message with a session if one exists and can advance the flow when configured to await a response.",[339,624,625],{},"Configure the webhook URL in the provider dashboard:",[360,627,630],{"className":628,"code":629,"language":503,"meta":365},[501],"https:\u002F\u002Fapi.diska.ai\u002Fapi\u002Fv1\u002Fwebhooks\u002Fsms\u002Finbound\n",[355,631,629],{"__ignoreMap":365},[339,633,634],{},"Security: validate provider signatures or tokens when available, use HTTPS and restrict source IPs if the provider supports it.",[343,636,638],{"id":637},"future","Future",[339,640,641,642,645],{},"Additional outbound events (",[355,643,644],{},"call.failed",", realtime call states) and inbound webhooks for Cal.com and Twilio are planned.",[647,648,649],"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":365,"searchDepth":378,"depth":378,"links":651},[652,657,660],{"id":345,"depth":378,"text":346,"children":653},[654,655,656],{"id":421,"depth":384,"text":422},{"id":493,"depth":384,"text":494},{"id":551,"depth":384,"text":552},{"id":605,"depth":378,"text":606,"children":658},[659],{"id":609,"depth":384,"text":610},{"id":637,"depth":378,"text":638},"Outbound (call event) and inbound webhooks supported by Diska.","md",null,{},{"title":213,"description":661},"1ksv55_Z9uTQndyCbbccMg13JVPT6ywVLs01377jE4E",[668,670],{"title":209,"path":210,"stem":211,"description":669,"children":-1},"API keys for integrations and Better Auth sessions for the backoffice.",{"title":217,"path":218,"stem":219,"description":671,"children":-1},"The API Channel for integrations and the internal API reference.",1786954568508]