Skip to main content
The IVR API lets you provision IVRs, add menu options, generate greetings, and publish — everything the visual builder does in the dashboard, available over HTTP.

Authentication

All endpoints require a JWT bearer token (from /auth/user-login) OR an API key with ivr.* permissions.
All responses are scoped to your organization automatically.

List IVRs

Response:

Get a single IVR (with menu options)

Returns the IVR plus its menu options in the menuOptions array.

Create an IVR

Creating an IVR does NOT automatically generate a greeting or publish it. Call /generate-greeting and /publish separately. Response (201): the created IVR row.

Update an IVR

Same fields as create. All fields optional.
Updates alone do NOT regenerate the dialplan. Call /publish when you’re ready.

Delete an IVR

Cascades to menu options. Greeting .wav file is also removed. The DID still has routing_type=ivr but the destination UUID is dead — calls will get “number not in service” until you reroute.

Save menu options

Replaces ALL menu options for the IVR atomically.
For action_type=ivr, the destination must be another IVR’s UUID (not extension). For action_type=hangup or callback, destination is null.

Generate a TTS greeting

Calls Google Cloud TTS and saves the .wav to the server. Updates greeting_prompt, greeting_text, greeting_language, greeting_voice on the IVR.
Response:
text is required. language + voice default to the IVR’s current settings if omitted. This does NOT publish — call /publish to make the new greeting live.

Preview the generated audio

Returns the raw .wav as audio/wav. Useful for UI playback or QA automation.

Publish an IVR

Triggers a full dialplan regeneration for your organization. The IVR and its menu options become live on the Asterisk dialplan. Any DIDs routed to this IVR will start ringing it on the next call.
Response:
Publish is idempotent. Safe to call multiple times.
Publishing regenerates the ENTIRE dialplan for your org, not just this IVR. If another user edited a queue or user extension without publishing, their changes will also go live with this publish. Coordinate with your team.

Common error responses

End-to-end example: create a working IVR

Call the DID from a phone — you should hear your greeting, then routing works on digit press.