Skip to content

Get an IVR

GET
/v1/ivrs/{id}
curl --request GET \
--url https://api.customer.onsim.uk/v1/ivrs/1 \
--header 'x-api-key: <x-api-key>'
id
required
integer

The ID of the resource.

OK

Media typeapplication/json

A menu that plays to the caller and sends them on by the key they press.

object
id
required

The ID of the IVR. It does not change when the extension does.

integer
extension
required

What others dial to reach it. It can change.

string
label
required

The label of the extension, as app.onsim and the call records show it. It is not the name of a person.

string
menus

The menus of the IVR. An IVR that plays no menu has none.

Array<object>

A menu that an IVR plays.

object
name
required

The name of the menu. Every IVR has a menu with the name ROOT, which a caller hears first. A step with the action menu goes to another.

string
active

When the menu is active, in words: Always, or a schedule.

string
keys
required

The steps of the menu.

Array<object>

One step of a menu: what starts it, and what the menu then does.

object
key
required

What starts the step: a key from 0 to 9, * or #. Also timeout when the caller presses no key, inactive when the menu is not active, and fax.

string
action
required

What the menu does: transfer, menu, queue, voicemail, directory, dial_extension, make_call, hang_up, none or other. More values can come.

string
extension

For transfer to an extension: the extension that the menu dials.

string
number

For transfer to an outside number: the digits of that number.

string
menu

For menu: the name of the menu that comes next.

string
Examplegenerated
{
"id": 1,
"extension": "example",
"label": "example",
"menus": [
{
"name": "example",
"active": "example",
"keys": [
{
"key": "example",
"action": "example",
"extension": "example",
"number": "example",
"menu": "example"
}
]
}
]
}

The request is not valid

Media typeapplication/problem+json

An error, as RFC 9457 Problem Details.

object
type
required

A URI that names the kind of error. It is also a page of the docs.

string
title
required

A short summary of the kind of error.

string
status
required

The HTTP status.

integer
detail

What went wrong in this request.

string
errors

Each parameter that is not valid. Only an invalid-request error has it.

Array<object>
object
field
required

The parameter that is not valid.

string
detail
required

Why it is not valid.

string
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"errors": [
{
"field": "example",
"detail": "example"
}
]
}

The API key is missing or not valid, or: This request is not permitted

Media typeapplication/problem+json

An error, as RFC 9457 Problem Details.

object
type
required

A URI that names the kind of error. It is also a page of the docs.

string
title
required

A short summary of the kind of error.

string
status
required

The HTTP status.

integer
detail

What went wrong in this request.

string
errors

Each parameter that is not valid. Only an invalid-request error has it.

Array<object>
object
field
required

The parameter that is not valid.

string
detail
required

Why it is not valid.

string
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"errors": [
{
"field": "example",
"detail": "example"
}
]
}

No such resource

Media typeapplication/problem+json

An error, as RFC 9457 Problem Details.

object
type
required

A URI that names the kind of error. It is also a page of the docs.

string
title
required

A short summary of the kind of error.

string
status
required

The HTTP status.

integer
detail

What went wrong in this request.

string
errors

Each parameter that is not valid. Only an invalid-request error has it.

Array<object>
object
field
required

The parameter that is not valid.

string
detail
required

Why it is not valid.

string
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"errors": [
{
"field": "example",
"detail": "example"
}
]
}

The request is too large

Media typeapplication/problem+json

An error, as RFC 9457 Problem Details.

object
type
required

A URI that names the kind of error. It is also a page of the docs.

string
title
required

A short summary of the kind of error.

string
status
required

The HTTP status.

integer
detail

What went wrong in this request.

string
errors

Each parameter that is not valid. Only an invalid-request error has it.

Array<object>
object
field
required

The parameter that is not valid.

string
detail
required

Why it is not valid.

string
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"errors": [
{
"field": "example",
"detail": "example"
}
]
}

Too many requests, or: The daily quota is used up

Media typeapplication/problem+json

An error, as RFC 9457 Problem Details.

object
type
required

A URI that names the kind of error. It is also a page of the docs.

string
title
required

A short summary of the kind of error.

string
status
required

The HTTP status.

integer
detail

What went wrong in this request.

string
errors

Each parameter that is not valid. Only an invalid-request error has it.

Array<object>
object
field
required

The parameter that is not valid.

string
detail
required

Why it is not valid.

string
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"errors": [
{
"field": "example",
"detail": "example"
}
]
}

The request failed

Media typeapplication/problem+json

An error, as RFC 9457 Problem Details.

object
type
required

A URI that names the kind of error. It is also a page of the docs.

string
title
required

A short summary of the kind of error.

string
status
required

The HTTP status.

integer
detail

What went wrong in this request.

string
errors

Each parameter that is not valid. Only an invalid-request error has it.

Array<object>
object
field
required

The parameter that is not valid.

string
detail
required

Why it is not valid.

string
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"errors": [
{
"field": "example",
"detail": "example"
}
]
}

Your records are not available now

Media typeapplication/problem+json

An error, as RFC 9457 Problem Details.

object
type
required

A URI that names the kind of error. It is also a page of the docs.

string
title
required

A short summary of the kind of error.

string
status
required

The HTTP status.

integer
detail

What went wrong in this request.

string
errors

Each parameter that is not valid. Only an invalid-request error has it.

Array<object>
object
field
required

The parameter that is not valid.

string
detail
required

Why it is not valid.

string
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"errors": [
{
"field": "example",
"detail": "example"
}
]
}

The request took too long

Media typeapplication/problem+json

An error, as RFC 9457 Problem Details.

object
type
required

A URI that names the kind of error. It is also a page of the docs.

string
title
required

A short summary of the kind of error.

string
status
required

The HTTP status.

integer
detail

What went wrong in this request.

string
errors

Each parameter that is not valid. Only an invalid-request error has it.

Array<object>
object
field
required

The parameter that is not valid.

string
detail
required

Why it is not valid.

string
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"errors": [
{
"field": "example",
"detail": "example"
}
]
}