Use a Flow via API

The Use via API panel in the IVR builder - flow ID, detected variables, ready-to-run cURL, Node.js, Python and PHP requests, a readiness checklist, Try it, and a hand-off note for your developer.

3 min read

Base URL
https://voice-api.edesy.in/v1/ivr
Auth
Authorization: Bearer sk_...Get a key

Every flow has a Use via API button in the builder. It opens a panel with the flow ID, the variables the flow uses, a ready-to-run request in cURL, Node.js, Python or PHP, and a readiness checklist that shows what would make a call fail (unpublished flow, no caller ID, wallet below Rs 1.50, no API key, outside 09:00 to 21:00 IST). Try it places a real call and shows the requests the flow sends while it runs.

What the panel shows#

Part What it is
Flow ID Sent as flow_id to POSThttps://voice-api.edesy.in/v1/ivr/calls. Copy button included
Variables Every {{var.name}} token the flow uses, with the steps that use it, and whether it is spoken or sent to your API. Edit the example values and the code updates
Call to (to) The Indian number to call
Caller ID (from) One of your numbers, or blank for your default IVR number
reference_id Optional. Your own ID, echoed back in callbacks
status_callback_url Optional. Receives the call result when the call ends
API key Paste an existing key, or press Create a new key in the panel
Request The full request in cURL, Node.js (18+, built-in fetch), Python or PHP
What the flow sends to your system Each HTTP Request step: whether the caller waits for your reply or it runs in the background, timeouts, retries and headers

The request returns 202 with data.call_sid. Reusing an Idempotency-Key within 24 hours returns the first call instead of dialling again. Full field reference: Outbound IVR Calls.

Readiness checklist#

The panel checks your workspace and marks each item as ready or to fix:

Check If it fails
Flow published API calls run the published version; an unpublished flow returns 409 flow_not_published
Caller ID You need a number to call from (buying one needs approved KYC); otherwise calls fail with no_caller_id
Wallet Calls need a balance of at least Rs 1.50; otherwise 402 insufficient_balance
API key Your system needs one to call the API
Signing secret Requests your flow sends carry X-Edesy-Signature; generate a secret so your system can verify them. See HTTP Signing Secret
Calling hours Outside 09:00 to 21:00 IST, calls are refused with 422 outside_calling_hours, unless your workspace is allowed to call outside hours

Try it#

Enter your own number in Call to and press Place this call. Your phone rings with the published flow. Pick up and press keys: the panel shows the call's status and, as they happen, the requests the flow sent, such as each HTTP Request step and the status callback. A Try it call is a real call, billed like any other: Rs 1 per minute plus text-to-speech characters.

Hand it to your developer#

Copy for your developer copies a plain-text note with the endpoint, the auth header, the flow ID, the variables to send and a cURL example. It never contains an API key: your developer creates one or you share it separately.

Example (Node.js)#

// Node.js 18+ (built-in fetch)
const res = await fetch("https://voice-api.edesy.in/v1/ivr/calls", {
  method: "POST",
  headers: {
    "X-API-Key": process.env.EDESY_API_KEY,
    "Idempotency-Key": "order-A123-confirm",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    flow_id: "5b1c2f0e-0000-4000-8000-000000000000",
    to: "+919800000000",
    variables: { name: "Ravi", order_id: "A123" },
  }),
});
console.log(res.status, await res.json());

The panel fills in your own flow ID, variables and caller ID.

Was this page helpful?