Skip to main content
Your application can create IVRs, point numbers at them, and ring people into them. The IVR itself is drawn in FireTone’s designer, which your application opens in a popup. Your users need no FireTone login. Make the key from the IVRs & numbers preset (Developer → API keys).

The whole sequence

1. Create an IVR

The answer carries the IVR’s id. It has an empty draft and no published revision yet, so it answers no calls.

2. Open the designer

On your server, ask for a link. Never do this from the browser: it needs your API key.
  • return_origin is the origin of the page that will open the popup: scheme, host and port, nothing else. The designer reports to this origin only. It must be https (http://localhost is accepted while you develop). A wildcard is refused.
  • ttl_minutes is how long the link and the designer session last: 120 by default, 5 to 480.
In the browser, open the URL in a popup and listen for the designer’s messages:
Open the popup from a click, or the browser blocks it. Don’t pass noopener: the designer needs the window that opened it to report back.

What the designer tells you

A message is a hint to look. Read the IVR back with GET /ivr-flows/{id} before acting on it, and always check event.origin.
  • It works once. The designer trades it for a session as it loads. A copied, reused or reloaded link shows “This designer link has ended”; ask for a new one.
  • The session is for one IVR. It can read, save and publish that IVR, and read the lists its steps choose from (agents, queues, extensions, recordings, templates). It can upload a recording. Everything else answers 403 designer_session_scope.
  • It ends at expires_at, when the user presses Done, or when the API key that asked for it is revoked.
  • The secret is in the URL fragment (after #), which browsers never send to a server. Don’t log the URL or store it.

3. Read the definition

The answer has the IVR’s published_revision and draft_revision, its nodes (each step: id, kind, label, config) and its edges (which outlet of which step leads where). Add ?revision=draft for the work in progress, or ?revision=published for what callers hear. The definition is for reading. To change an IVR, open the designer; there is no public call that accepts a drawing. POST /ivr-flows/{id}/publish publishes the current draft from your server. It answers 422 with a list of what is wrong when the draft can’t run.

4. Point a number at it

From the next call, the number is answered by the IVR’s published revision.

Numbers

A number goes to one destination: The destination must belong to the same organisation as the number.

5. Ring someone into it

  • It answers 202 straight away, with a request_id. The number is dialled in the background.
  • Whoever answers hears the IVR’s published revision, exactly as a caller to a number pointed at it would.
  • variables are available to the IVR’s steps as {{name}}: in a spoken prompt, an SMS, an email or a data lookup. Up to 30, of up to 500 characters each.
  • caller_id must be one of your numbers. You can leave it out if you have only one.
  • Progress goes to callback_url (call.started, call.ended, or call.failed with the reason) and is kept on GET /call-requests/{request_id}. A callback URL needs a callback secret.
Refused straight away, with 422 and the reason:
  • the IVR has never been published;
  • the number is one of your own;
  • no route reaches it;
  • billing refuses it.
Add ?dry_run=true to check all of that and get the plan back without ringing anyone.