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

Manage a Session

Read a session's status, extend its expiry, pause or resume routing, or end it — GET, PATCH and DELETE on /masking/sessions/:id.

Manage a Session

Once a session exists you can read its status, extend its expiry, pause or resume routing, or end it early. All three operations use the session_id returned by Create a Session.

Get session status

GET /masking/sessions/:id

Returns the session's current status (active, paused, or expired) and details, including total_calls.

curl https://voice-api.edesy.in/v1/masking/sessions/3f9a1c72-5b8e-4d21-9c34-7a2e6f0b1d55 \
  -H "Authorization: Bearer vp_YOUR_API_KEY"

200 — Current session state

{
  "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": 2,
    "created_at": "2026-07-14T18:00:00Z"
  }
}

404 — No such session

{ "error": { "code": "not_found", "message": "Session not found" } }

Extend, pause or resume

PATCH /masking/sessions/:id

Send expiry_minutes to reset the expiry to now + N minutes (for example, the order is still active), and/or status to pause or resume routing.

Parameter Type Required Description
expiry_minutes integer No Reset the session expiry to now + this many minutes (1–43200).
status string No "paused" to block routing, "active" to resume.
curl -X PATCH https://voice-api.edesy.in/v1/masking/sessions/3f9a1c72-5b8e-4d21-9c34-7a2e6f0b1d55 \
  -H "Authorization: Bearer vp_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "expiry_minutes": 30 }'

200 — Updated session

{
  "data": {
    "session_id": "3f9a1c72-5b8e-4d21-9c34-7a2e6f0b1d55",
    "virtual_number": "918071387146",
    "status": "active",
    "expires_at": "2026-07-14T19:00:00Z"
  }
}

While a session is paused, calls to the virtual number are not bridged; resume it by sending status: "active".

End a session

DELETE /masking/sessions/:id

Ends the session immediately: the virtual number stops routing between these parties and is freed for reuse. A session.expired event fires. The call is idempotent — ending an already-ended session is safe.

curl -X DELETE https://voice-api.edesy.in/v1/masking/sessions/3f9a1c72-5b8e-4d21-9c34-7a2e6f0b1d55 \
  -H "Authorization: Bearer vp_YOUR_API_KEY"

200 — Session ended

{
  "data": {
    "session_id": "3f9a1c72-5b8e-4d21-9c34-7a2e6f0b1d55",
    "virtual_number": "918071387146",
    "status": "expired"
  }
}

Sessions with an expiry_minutes also end on their own — a background sweep expires them automatically, freeing the number without an explicit DELETE.

See all error codes.

Previous
Create a Session
Next
Dynamic Routing Webhook

On this page

  • Get session status
  • Extend, pause or resume
  • End a session

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