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. Create a Session

Create a Session

POST /masking/sessions — bind two real numbers to one virtual number for a limited lifetime and get the virtual number back. Idempotent on your reference id.

Create a Session

POST /masking/sessions

Binds two real numbers to one virtual number and returns the virtual number. Either party can then call that number and is bridged to the other — routing is decided by who is calling, so the same number works in both directions. Idempotent on reference: repeating the call for an active reference returns the existing session.

Body parameters

Parameter Type Required Description
party_a string Yes First participant — 10-digit Indian mobile (with or without +91/91; we normalize).
party_b string Yes Second participant. Either party may call the virtual number.
reference string No Your external id for this session (order/ride/ticket id). Makes create idempotent and appears on events and call logs.
expiry_minutes integer No Auto-expire the session after this many minutes (1–43200, i.e. up to 30 days). Omit for no expiry — end it explicitly instead.
max_calls integer No Optional cap on the number of calls this session will route.
metadata object No Arbitrary JSON stored with the session and echoed back on reads.

Request

curl -X POST https://voice-api.edesy.in/v1/masking/sessions \
  -H "Authorization: Bearer vp_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "party_a": "9876543210",
    "party_b": "9123456789",
    "reference": "ORD-4821",
    "expiry_minutes": 30
  }'
const response = await fetch("https://voice-api.edesy.in/v1/masking/sessions", {
  method: "POST",
  headers: {
    "Authorization": "Bearer vp_YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    party_a: "9876543210",
    party_b: "9123456789",
    reference: "ORD-4821",
    expiry_minutes: 30,
  }),
});
const data = await response.json();
console.log(data);
import requests

response = requests.post(
    "https://voice-api.edesy.in/v1/masking/sessions",
    headers={
        "Authorization": "Bearer vp_YOUR_API_KEY",
        "Content-Type": "application/json",
    },
    json={
        "party_a": "9876543210",
        "party_b": "9123456789",
        "reference": "ORD-4821",
        "expiry_minutes": 30,
    },
)
print(response.json())

Responses

201 — Session created (or the existing one for this reference)

{
  "data": {
    "session_id": "3f9a1c72-5b8e-4d21-9c34-7a2e6f0b1d55",
    "virtual_number": "918071387146",
    "party_a": "9876543210",
    "party_b": "9123456789",
    "reference": "ORD-4821",
    "status": "active",
    "expires_at": "2026-07-14T18:30:00Z",
    "total_calls": 0,
    "created_at": "2026-07-14T18:00:00Z"
  }
}

Give virtual_number to both parties. Track the session with session_id.

422 — No free virtual number, the same party twice, or the reference is already active with different parties

{
  "error": {
    "code": "session_error",
    "message": "all 1 enrolled masking numbers are busy for these parties; enroll more numbers to add capacity"
  }
}

When every enrolled number is already busy for these parties, enroll more numbers to add concurrency capacity.

See all error codes.

Previous
Overview
Next
Manage a Session

On this page

  • Body parameters
  • Request
  • Responses

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