[{"data":1,"prerenderedAt":668},["ShallowReactive",2],{"help-article-settings-webhook-configuration":3,"help-siblings-settings":616},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"category":5,"order":10,"difficulty":11,"time_to_complete":12,"related":13,"body":17,"_type":610,"_id":611,"_source":612,"_file":613,"_stem":614,"_extension":615},"\u002Fhelp\u002Fsettings\u002Fwebhook-configuration","settings",false,"","Configuring outbound webhooks","How to set up webhooks to receive real-time notifications when events happen in AIsoule.",10,"intermediate","4 minutes",[14,15,16],"\u002Fhelp\u002Fintegrations\u002Fwebhooks-receiving","\u002Fhelp\u002Fintegrations\u002Fapi-overview","\u002Fhelp\u002Fsettings\u002Fapi-keys",{"type":18,"children":19,"toc":599},"root",[20,28,34,41,115,127,133,138,320,325,331,359,365,370,422,428,441,449,461,467,472,510,516,540,546],{"type":21,"tag":22,"props":23,"children":25},"element","h1",{"id":24},"configuring-outbound-webhooks",[26],{"type":27,"value":8},"text",{"type":21,"tag":29,"props":30,"children":31},"p",{},[32],{"type":27,"value":33},"Webhooks push real-time event data to your server whenever something happens in AIsoule.",{"type":21,"tag":35,"props":36,"children":38},"h2",{"id":37},"creating-a-webhook",[39],{"type":27,"value":40},"Creating a webhook",{"type":21,"tag":42,"props":43,"children":44},"ol",{},[45,57,67,106],{"type":21,"tag":46,"props":47,"children":48},"li",{},[49,51],{"type":27,"value":50},"Go to ",{"type":21,"tag":52,"props":53,"children":54},"strong",{},[55],{"type":27,"value":56},"Settings → Webhooks",{"type":21,"tag":46,"props":58,"children":59},{},[60,62],{"type":27,"value":61},"Click ",{"type":21,"tag":52,"props":63,"children":64},{},[65],{"type":27,"value":66},"\"New Webhook\"",{"type":21,"tag":46,"props":68,"children":69},{},[70,72],{"type":27,"value":71},"Configure:\n",{"type":21,"tag":73,"props":74,"children":75},"ul",{},[76,86,96],{"type":21,"tag":46,"props":77,"children":78},{},[79,84],{"type":21,"tag":52,"props":80,"children":81},{},[82],{"type":27,"value":83},"Name",{"type":27,"value":85}," — Descriptive name (e.g., \"CRM Sync\", \"Order Notifications\")",{"type":21,"tag":46,"props":87,"children":88},{},[89,94],{"type":21,"tag":52,"props":90,"children":91},{},[92],{"type":27,"value":93},"URL",{"type":27,"value":95}," — Your server endpoint (must be HTTPS)",{"type":21,"tag":46,"props":97,"children":98},{},[99,104],{"type":21,"tag":52,"props":100,"children":101},{},[102],{"type":27,"value":103},"Events",{"type":27,"value":105}," — Which events to subscribe to",{"type":21,"tag":46,"props":107,"children":108},{},[109,110],{"type":27,"value":61},{"type":21,"tag":52,"props":111,"children":112},{},[113],{"type":27,"value":114},"Save",{"type":21,"tag":29,"props":116,"children":117},{},[118,120,125],{"type":27,"value":119},"A ",{"type":21,"tag":52,"props":121,"children":122},{},[123],{"type":27,"value":124},"secret key",{"type":27,"value":126}," is auto-generated for signature verification.",{"type":21,"tag":35,"props":128,"children":130},{"id":129},"selecting-events",[131],{"type":27,"value":132},"Selecting events",{"type":21,"tag":29,"props":134,"children":135},{},[136],{"type":27,"value":137},"Choose which events trigger the webhook:",{"type":21,"tag":139,"props":140,"children":141},"table",{},[142,161],{"type":21,"tag":143,"props":144,"children":145},"thead",{},[146],{"type":21,"tag":147,"props":148,"children":149},"tr",{},[150,156],{"type":21,"tag":151,"props":152,"children":153},"th",{},[154],{"type":27,"value":155},"Event",{"type":21,"tag":151,"props":157,"children":158},{},[159],{"type":27,"value":160},"When it fires",{"type":21,"tag":162,"props":163,"children":164},"tbody",{},[165,184,201,218,235,252,269,286,303],{"type":21,"tag":147,"props":166,"children":167},{},[168,179],{"type":21,"tag":169,"props":170,"children":171},"td",{},[172],{"type":21,"tag":173,"props":174,"children":176},"code",{"className":175},[],[177],{"type":27,"value":178},"message.incoming",{"type":21,"tag":169,"props":180,"children":181},{},[182],{"type":27,"value":183},"Customer sends a message",{"type":21,"tag":147,"props":185,"children":186},{},[187,196],{"type":21,"tag":169,"props":188,"children":189},{},[190],{"type":21,"tag":173,"props":191,"children":193},{"className":192},[],[194],{"type":27,"value":195},"message.sent",{"type":21,"tag":169,"props":197,"children":198},{},[199],{"type":27,"value":200},"Your message is sent",{"type":21,"tag":147,"props":202,"children":203},{},[204,213],{"type":21,"tag":169,"props":205,"children":206},{},[207],{"type":21,"tag":173,"props":208,"children":210},{"className":209},[],[211],{"type":27,"value":212},"message.delivered",{"type":21,"tag":169,"props":214,"children":215},{},[216],{"type":27,"value":217},"Message delivered to phone",{"type":21,"tag":147,"props":219,"children":220},{},[221,230],{"type":21,"tag":169,"props":222,"children":223},{},[224],{"type":21,"tag":173,"props":225,"children":227},{"className":226},[],[228],{"type":27,"value":229},"message.read",{"type":21,"tag":169,"props":231,"children":232},{},[233],{"type":27,"value":234},"Message read by customer",{"type":21,"tag":147,"props":236,"children":237},{},[238,247],{"type":21,"tag":169,"props":239,"children":240},{},[241],{"type":21,"tag":173,"props":242,"children":244},{"className":243},[],[245],{"type":27,"value":246},"message.failed",{"type":21,"tag":169,"props":248,"children":249},{},[250],{"type":27,"value":251},"Message delivery failed",{"type":21,"tag":147,"props":253,"children":254},{},[255,264],{"type":21,"tag":169,"props":256,"children":257},{},[258],{"type":21,"tag":173,"props":259,"children":261},{"className":260},[],[262],{"type":27,"value":263},"contact.created",{"type":21,"tag":169,"props":265,"children":266},{},[267],{"type":27,"value":268},"New contact added",{"type":21,"tag":147,"props":270,"children":271},{},[272,281],{"type":21,"tag":169,"props":273,"children":274},{},[275],{"type":21,"tag":173,"props":276,"children":278},{"className":277},[],[279],{"type":27,"value":280},"contact.updated",{"type":21,"tag":169,"props":282,"children":283},{},[284],{"type":27,"value":285},"Contact info changed",{"type":21,"tag":147,"props":287,"children":288},{},[289,298],{"type":21,"tag":169,"props":290,"children":291},{},[292],{"type":21,"tag":173,"props":293,"children":295},{"className":294},[],[296],{"type":27,"value":297},"campaign.completed",{"type":21,"tag":169,"props":299,"children":300},{},[301],{"type":27,"value":302},"Campaign finished",{"type":21,"tag":147,"props":304,"children":305},{},[306,315],{"type":21,"tag":169,"props":307,"children":308},{},[309],{"type":21,"tag":173,"props":310,"children":312},{"className":311},[],[313],{"type":27,"value":314},"transfer.created",{"type":21,"tag":169,"props":316,"children":317},{},[318],{"type":27,"value":319},"Agent transfer initiated",{"type":21,"tag":29,"props":321,"children":322},{},[323],{"type":27,"value":324},"Select only the events you need — fewer events = less load on your server.",{"type":21,"tag":35,"props":326,"children":328},{"id":327},"testing-your-webhook",[329],{"type":27,"value":330},"Testing your webhook",{"type":21,"tag":42,"props":332,"children":333},{},[334,344,349,354],{"type":21,"tag":46,"props":335,"children":336},{},[337,339],{"type":27,"value":338},"After creating, click ",{"type":21,"tag":52,"props":340,"children":341},{},[342],{"type":27,"value":343},"\"Test\"",{"type":21,"tag":46,"props":345,"children":346},{},[347],{"type":27,"value":348},"A sample payload is sent to your URL",{"type":21,"tag":46,"props":350,"children":351},{},[352],{"type":27,"value":353},"Verify your server responds with HTTP 200",{"type":21,"tag":46,"props":355,"children":356},{},[357],{"type":27,"value":358},"Check the response in the webhook logs",{"type":21,"tag":35,"props":360,"children":362},{"id":361},"webhook-logs",[363],{"type":27,"value":364},"Webhook logs",{"type":21,"tag":29,"props":366,"children":367},{},[368],{"type":27,"value":369},"View delivery history:",{"type":21,"tag":42,"props":371,"children":372},{},[373,378,394],{"type":21,"tag":46,"props":374,"children":375},{},[376],{"type":27,"value":377},"Open the webhook",{"type":21,"tag":46,"props":379,"children":380},{},[381,382,387,389],{"type":27,"value":61},{"type":21,"tag":52,"props":383,"children":384},{},[385],{"type":27,"value":386},"\"Logs\"",{"type":27,"value":388}," or ",{"type":21,"tag":52,"props":390,"children":391},{},[392],{"type":27,"value":393},"\"Recent Deliveries\"",{"type":21,"tag":46,"props":395,"children":396},{},[397,399],{"type":27,"value":398},"See:\n",{"type":21,"tag":73,"props":400,"children":401},{},[402,407,412,417],{"type":21,"tag":46,"props":403,"children":404},{},[405],{"type":27,"value":406},"Timestamp",{"type":21,"tag":46,"props":408,"children":409},{},[410],{"type":27,"value":411},"Event type",{"type":21,"tag":46,"props":413,"children":414},{},[415],{"type":27,"value":416},"Response status (200, 500, timeout)",{"type":21,"tag":46,"props":418,"children":419},{},[420],{"type":27,"value":421},"Response time",{"type":21,"tag":35,"props":423,"children":425},{"id":424},"signature-verification",[426],{"type":27,"value":427},"Signature verification",{"type":21,"tag":29,"props":429,"children":430},{},[431,433,439],{"type":27,"value":432},"Every webhook includes an ",{"type":21,"tag":173,"props":434,"children":436},{"className":435},[],[437],{"type":27,"value":438},"X-Webhook-Signature",{"type":27,"value":440}," header containing an HMAC-SHA256 signature.",{"type":21,"tag":29,"props":442,"children":443},{},[444],{"type":21,"tag":52,"props":445,"children":446},{},[447],{"type":27,"value":448},"Verify in your code:",{"type":21,"tag":450,"props":451,"children":456},"pre",{"className":452,"code":454,"language":455,"meta":7},[453],"language-javascript","const crypto = require('crypto');\n\nfunction verifyWebhook(body, signature, secret) {\n  const expected = crypto\n    .createHmac('sha256', secret)\n    .update(body)\n    .digest('hex');\n  return expected === signature;\n}\n","javascript",[457],{"type":21,"tag":173,"props":458,"children":459},{"__ignoreMap":7},[460],{"type":27,"value":454},{"type":21,"tag":35,"props":462,"children":464},{"id":463},"retry-behavior",[465],{"type":27,"value":466},"Retry behavior",{"type":21,"tag":29,"props":468,"children":469},{},[470],{"type":27,"value":471},"If your endpoint fails (non-200 response or timeout):",{"type":21,"tag":73,"props":473,"children":474},{},[475,485,495,505],{"type":21,"tag":46,"props":476,"children":477},{},[478,483],{"type":21,"tag":52,"props":479,"children":480},{},[481],{"type":27,"value":482},"Retry 1:",{"type":27,"value":484}," After 10 seconds",{"type":21,"tag":46,"props":486,"children":487},{},[488,493],{"type":21,"tag":52,"props":489,"children":490},{},[491],{"type":27,"value":492},"Retry 2:",{"type":27,"value":494}," After 60 seconds",{"type":21,"tag":46,"props":496,"children":497},{},[498,503],{"type":21,"tag":52,"props":499,"children":500},{},[501],{"type":27,"value":502},"Retry 3:",{"type":27,"value":504}," After 5 minutes",{"type":21,"tag":46,"props":506,"children":507},{},[508],{"type":27,"value":509},"After 3 failures: webhook is marked as \"failing\"",{"type":21,"tag":35,"props":511,"children":513},{"id":512},"disabling-a-webhook",[514],{"type":27,"value":515},"Disabling a webhook",{"type":21,"tag":42,"props":517,"children":518},{},[519,523,535],{"type":21,"tag":46,"props":520,"children":521},{},[522],{"type":27,"value":377},{"type":21,"tag":46,"props":524,"children":525},{},[526,528,533],{"type":27,"value":527},"Toggle ",{"type":21,"tag":52,"props":529,"children":530},{},[531],{"type":27,"value":532},"\"Active\"",{"type":27,"value":534}," to OFF",{"type":21,"tag":46,"props":536,"children":537},{},[538],{"type":27,"value":539},"Events will no longer be sent (but the configuration is preserved)",{"type":21,"tag":35,"props":541,"children":543},{"id":542},"tips",[544],{"type":27,"value":545},"Tips",{"type":21,"tag":42,"props":547,"children":548},{},[549,559,569,579,589],{"type":21,"tag":46,"props":550,"children":551},{},[552,557],{"type":21,"tag":52,"props":553,"children":554},{},[555],{"type":27,"value":556},"Respond quickly",{"type":27,"value":558}," — Return 200 immediately, process async",{"type":21,"tag":46,"props":560,"children":561},{},[562,567],{"type":21,"tag":52,"props":563,"children":564},{},[565],{"type":27,"value":566},"Handle duplicates",{"type":27,"value":568}," — Same event may arrive twice (use event ID)",{"type":21,"tag":46,"props":570,"children":571},{},[572,577],{"type":21,"tag":52,"props":573,"children":574},{},[575],{"type":27,"value":576},"Monitor failures",{"type":27,"value":578}," — Check webhook status weekly",{"type":21,"tag":46,"props":580,"children":581},{},[582,587],{"type":21,"tag":52,"props":583,"children":584},{},[585],{"type":27,"value":586},"Use the secret",{"type":27,"value":588}," — Always verify signatures in production",{"type":21,"tag":46,"props":590,"children":591},{},[592,597],{"type":21,"tag":52,"props":593,"children":594},{},[595],{"type":27,"value":596},"Start with one event",{"type":27,"value":598}," — Add more as needed",{"title":7,"searchDepth":600,"depth":600,"links":601},2,[602,603,604,605,606,607,608,609],{"id":37,"depth":600,"text":40},{"id":129,"depth":600,"text":132},{"id":327,"depth":600,"text":330},{"id":361,"depth":600,"text":364},{"id":424,"depth":600,"text":427},{"id":463,"depth":600,"text":466},{"id":512,"depth":600,"text":515},{"id":542,"depth":600,"text":545},"markdown","content:help:settings:webhook-configuration.md","content","help\u002Fsettings\u002Fwebhook-configuration.md","help\u002Fsettings\u002Fwebhook-configuration","md",[617,619,622,625,628,631,634,637,640,643,646,649,652,655,658,661,664,665],{"_path":16,"title":618},"Setting up API keys for programmatic access",{"_path":620,"title":621},"\u002Fhelp\u002Fsettings\u002Faudit-logs","Understanding audit logs",{"_path":623,"title":624},"\u002Fhelp\u002Fsettings\u002Fbusiness-profile","Business profile settings",{"_path":626,"title":627},"\u002Fhelp\u002Fsettings\u002Fcanned-responses-management","Managing canned responses",{"_path":629,"title":630},"\u002Fhelp\u002Fsettings\u002Fcreating-templates","Creating and managing message templates",{"_path":632,"title":633},"\u002Fhelp\u002Fsettings\u002Fcustom-actions","Custom actions (webhook, URL, JavaScript)",{"_path":635,"title":636},"\u002Fhelp\u002Fsettings\u002Fdark-mode","Dark mode and theme settings",{"_path":638,"title":639},"\u002Fhelp\u002Fsettings\u002Flanguage-settings","Language settings (i18n)",{"_path":641,"title":642},"\u002Fhelp\u002Fsettings\u002Fmanaging-accounts","Managing WhatsApp Business accounts",{"_path":644,"title":645},"\u002Fhelp\u002Fsettings\u002Fmanaging-users","Managing users (invite, deactivate, roles)",{"_path":647,"title":648},"\u002Fhelp\u002Fsettings\u002Fnotification-preferences","Notification preferences",{"_path":650,"title":651},"\u002Fhelp\u002Fsettings\u002Frate-limiting","Rate limiting and API quotas",{"_path":653,"title":654},"\u002Fhelp\u002Fsettings\u002Froles-permissions","Creating custom roles and permissions",{"_path":656,"title":657},"\u002Fhelp\u002Fsettings\u002Fsso-configuration","Configuring SSO (Google, Microsoft, GitHub)",{"_path":659,"title":660},"\u002Fhelp\u002Fsettings\u002Fteams-assignment","Setting up teams and assignment strategies",{"_path":662,"title":663},"\u002Fhelp\u002Fsettings\u002Ftemplate-approval-tips","Template approval process and best practices",{"_path":4,"title":8},{"_path":666,"title":667},"\u002Fhelp\u002Fsettings\u002Fwhatsapp-flows","WhatsApp Flows (Meta Flows) management",1780423184413]