Eedesy
Book Demo
HomeProductsContact
Number Masking API
  • Introduction
  • Quick Start
  • Authentication
  • Call Lifecycle
  • Complete Example
  • Overview
  • Create a Session
  • Manage a Session
  • Dynamic Routing Webhook
  • Event Webhooks
  • Enroll Your Own Numbers
  • Overview
  • Initiate a Call
  • Get Call Status
  • Get Call Recording
  • List Call Logs
  • Get Usage Stats
  • Get Wallet Balance
  • Webhooks
  • Error Codes

Related Products

  • AI Voice Agent
  • AI Voice Assistant
  • Try Free
Number Masking API
  • Introduction
  • Quick Start
  • Authentication
  • Call Lifecycle
  • Complete Example
  • Overview
  • Create a Session
  • Manage a Session
  • Dynamic Routing Webhook
  • Event Webhooks
  • Enroll Your Own Numbers
  • Overview
  • Initiate a Call
  • Get Call Status
  • Get Call Recording
  • List Call Logs
  • Get Usage Stats
  • Get Wallet Balance
  • Webhooks
  • Error Codes
  1. Docs
  2. Number Masking API
  3. Two-Way Sessions
  4. Dynamic Routing Webhook

Dynamic Routing Webhook

Let your own server decide, per call, who a masked number connects to. When a call arrives we POST a signed request to your endpoint and bridge to the number it returns.

Dynamic Routing Webhook

Dynamic routing lets your server decide, in real time, who a masked number connects to on each call — instead of pre-registering a fixed mapping. Point a number at your HTTPS endpoint; when a call arrives, we ask your endpoint for the target and bridge the call to whatever it returns (or reject it).

This is ideal for round-robin agent assignment, time- or location-based routing, and blocking abusive callers — any decision your own systems already know how to make.

Enabling it

Set a number's routing mode to webhook and give it your endpoint. See Enroll Your Own Numbers for the PATCH /masking/numbers/:id/routing call, including webhook_url, webhook_method, webhook_secret, and fallback_internal.

The request we send

When a call reaches a webhook-mode number, we POST a JSON body to your endpoint:

{
  "event": "masking.route",
  "call_sid": "d28be7cd-9840-4b23-9627-199f1ef81fc6",
  "caller": "9876543210",
  "masked_number": "918071387146",
  "direction": "inbound",
  "timestamp": "2026-07-14T18:00:00Z"
}
Field Description
event Always masking.route.
call_sid The call's id (empty for test events).
caller The normalized number of the person calling.
masked_number The virtual number that was dialed.
direction inbound.
timestamp RFC 3339 UTC.

Signature verification

If you set a webhook_secret, we sign the raw request body with HMAC-SHA256 and send it in the X-Edesy-Signature header, formatted as sha256=<hex>. Recompute the HMAC over the exact body you received and compare to confirm the request genuinely came from us.

Limits

  • Timeout: your endpoint must respond within 5 seconds — the caller is on the line while you decide.
  • Response size: we read at most 8 KB of your response.
  • Method: POST (default) or GET.

The response we expect

Reply with JSON telling us what to do:

{
  "action": "connect",
  "target_number": "9123456789",
  "caller_id": "918071387146"
}
Field Type Description
action string connect (default when a target_number is present) or reject.
target_number string Number to bridge to. Required when action is connect.
caller_id string Optional caller-ID override. Defaults to the masked number.
reject_reason string Optional message played to the caller when action is reject.

To turn a call away, return:

{ "action": "reject", "reject_reason": "This line is closed. Please try again during business hours." }

Fallback

If your endpoint errors, times out, or returns a non-2xx status, behaviour depends on the number's fallback_internal setting: when enabled, we fall back to the number's internal mapping; when disabled, the call is rejected. Set this based on how critical it is that calls always connect.

Testing

Use POST /masking/numbers/:id/routing/test to send a synthetic masking.route event to your endpoint and see the HTTP status, latency, raw body, and the decision we parsed — so you can validate your integration before going live.

Related

  • Enroll Your Own Numbers
  • Event Webhooks — for lifecycle notifications (distinct from routing)
Previous
Manage a Session
Next
Event Webhooks

On this page

  • Enabling it
  • The request we send
  • Signature verification
  • Limits
  • The response we expect
  • Fallback
  • Testing
  • Related

Stay Updated

Get the latest updates on AI voice technology, product releases, and exclusive resources.

Get Started

Try our products for free
AI Voice Agent
Build voice AI for calls
WhatsApp AI Bot
Automate WhatsApp chats
Website Chatbot
AI chat for websites
Edesy CRM
Manage leads & customers
Book a DemoCall UsEmail Us
Eedesy

Your all-in-one platform for digital innovation. We build AI-powered solutions that transform how businesses operate.

[email protected]+91 95475 31359

Products

  • AI Voice Assistant
  • Voice AI Suite
  • Telephony Suite
  • Messaging Suite
  • Business Apps Suite
  • WhatsApp Voice AI
  • WhatsApp Bot Builder
  • AI Website Chatbot
  • AI-SDR
  • Number Masking
  • Shopify Apps
  • View All Products

Solutions

  • For E-commerce
  • For Healthcare
  • For Real Estate
  • For Restaurants
  • For Appointments
  • View All Use Cases

Services

  • AI Chatbot Development
  • Voice AI Development
  • Shopify Development
  • SaaS Development
  • WhatsApp API Integration
  • View All Services

Resources

  • Documentation
  • Voice Agent Docs
  • API Reference
  • Number Masking API Docs
  • Blog
  • Changelog
  • Book a Demo

Company

  • About Us
  • Contact
  • Careers
  • Privacy Policy
  • Terms of Service

Products

  • AI Voice Assistant
  • Voice AI Suite
  • Telephony Suite
  • Messaging Suite
  • Business Apps Suite
  • WhatsApp Voice AI
  • WhatsApp Bot Builder
  • AI Website Chatbot
  • AI-SDR
  • Number Masking
  • Shopify Apps
  • View All Products

Solutions

  • For E-commerce
  • For Healthcare
  • For Real Estate
  • For Restaurants
  • For Appointments
  • View All Use Cases

Services

  • AI Chatbot Development
  • Voice AI Development
  • Shopify Development
  • SaaS Development
  • WhatsApp API Integration
  • View All Services

Resources

  • Documentation
  • Voice Agent Docs
  • API Reference
  • Number Masking API Docs
  • Blog
  • Changelog
  • Book a Demo

Company

  • About Us
  • Contact
  • Careers
  • Privacy Policy
  • Terms of Service
  • AI Voice Assistant
  • Voice AI Suite
  • Telephony Suite
  • Messaging Suite
  • Business Apps Suite
  • WhatsApp Voice AI
  • WhatsApp Bot Builder
  • AI Website Chatbot
  • AI-SDR
  • Number Masking
  • Shopify Apps
  • View All Products
  • For E-commerce
  • For Healthcare
  • For Real Estate
  • For Restaurants
  • For Appointments
  • View All Use Cases
  • AI Chatbot Development
  • Voice AI Development
  • Shopify Development
  • SaaS Development
  • WhatsApp API Integration
  • View All Services
  • Documentation
  • Voice Agent Docs
  • API Reference
  • Number Masking API Docs
  • Blog
  • Changelog
  • Book a Demo
  • About Us
  • Contact
  • Careers
  • Privacy Policy
  • Terms of Service

Popular Free Tools

Compress PDFMerge PDFPDF to WordGST CalculatorEMI CalculatorSIP CalculatorJSON FormatterBase64 EncoderImage CompressorQR Code GeneratorVoice AI ROI CalculatorAmazon FBA CalculatorAI Email WriterVideo to GIFPrivacy Policy GeneratorCRM ROI CalculatorMeeting Cost Calculator
Categories:PDF ToolsDeveloper ToolsFinance CalculatorsImage ToolsVideo ToolsAI Writing ToolsAudio ToolsWhatsApp ToolsDocument GeneratorsVoice AI ToolsE-commerce ToolsView All Tools

© 2026 Edesy Technology Labs Pvt Ltd

SSL Secured
99.9% Uptime