Update Voice IVR Scenarios

This method allows you to update a Voice IVR Scenario.

Please log in to see full path URL. Learn why.
put
/voice/ivr/1/scenarios/{id}
Request rate limit:
6 requests / minute (per account)
path Parameters
id
required
string

Scenario identifier.

Request Body schema:
application/json
collapse all -
name
required
string

The name of IVR scenario.

description
string

Description of IVR scenario.

script
required
Array of Call API (object) or Capture (object) or Collect (object) or Dial (object) or Dial To Many (object) or Dial To WebRTC (object) or Dial To Conversations (object) or For Each (object) or Go To (object) or Hang-up (string) or If Then Else (object) or Machine Detection (string) or Pause (object) or Play (object) or Play From Recording (object) or Record (object) or Repeat Until (object) or Repeat While (object) or Say (object) or Send SMS (object) or Set Variable (object) or Switch Case (object) or While Do (object)

Array of IVR actions defining scenario. NOTE: Answering Machine Detection, Call Recording and Speech Recognition (used for Capture action) are add-on features. To enable these add-ons, please contact our sales organisation.

Array
One of
  • Call API
  • Capture
  • Collect
  • Dial
  • Dial To Many
  • Dial To WebRTC
  • Dial To Conversations
  • For Each
  • Go To
  • Hang-up
  • If Then Else
  • Machine Detection
  • Pause
  • Play
  • Play From Recording
  • Record
  • Repeat Until
  • Repeat While
  • Say
  • Send SMS
  • Set Variable
  • Switch Case
  • While Do

Call API Action performs an HTTP request to a client’s endpoint, and (if told to) processes the response data. If collectResponse is set, the system will attempt to parse the response from the server. Our platform needs to be able to make HTTP requests to the specified endpoint.

request
required
string

The URL to target

options
required
object
method
required
string
Enum: "GET" "POST" "PUT" "DELETE" "PATCH"

Http method

headers
object

HTTP headers

property name*
string

HTTP headers

body
string

HTTP body

collectResponse
boolean

If this field is set, the system will parse the response and save all its fields as variables inside scenario. Note: Parser ignores non-primitive fields and does not go deeper than the first level. For example, if the response is {"letters": "abcd", "numbers": 12345}, the system will store variables letters and numbers, with values abcd and 12345 respectively. Check the example Say action with Call Api Responses. Response that is parsed can only be in JSON or XML.

actionId
integer <int32>

User-defined ID of an action that can be used with go-to action.

Responses

200

successful response

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

429

Too Many Requests

500

Internal Server Error

Request samples

Content type
application/json
Example

Call API

Copy
Collapse all
{
  • "name": "Call API",
  • "description": "Perform a POST request to provided URL with headers and payload.",
  • "script":
    [
    • {
      • "options":
        {
        • "method": "POST",
        • "headers":
          {
          • "content-type": "application/json"
          },
        • "body":
          {
          • "payload": "${to} finished the IVR."
          }
        }
      }
    ]
}

Response samples

Content type
application/json
Copy
Collapse all
[
  • {
    • "id": "E83E787CF2613450157ADA3476171E3F",
    • "name": "My Scenario",
    • "description": "Scenario to send a message",
    • "createTime": "2023-09-14T15:13:36.735+0000",
    • "updateTime": "2023-09-14T16:20:32.432+0000",
    • "lastUsageDate": "2023-09-14",
    • "script":
      [
      • {
        • "sendSms":
          {
          • "text": "Hello",
          • "to": "${to}"
          }
        }
      ]
    }
]

Encountering issues

Contact our support

What's new? Check out

Release Notes

Unsure about a term? See

Glossary

Research panel

Help shape the future of our products
Learn more
Service status

Copyright @ 2006-2025 Infobip ltd.