> For the complete documentation index, see [llms.txt](https://virtualcontact.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://virtualcontact.gitbook.io/docs/developers/build-an-integration/contact-center-api/ivr.md).

# IVR

## Create CreateIvr

> Save Ivr data in Db.

```json
{"openapi":"3.1.1","info":{"title":"Contact Center API","version":"1.0"},"servers":[{"url":"/api/pbx"}],"paths":{"/blocks/ivr":{"post":{"description":"Save Ivr data in Db.","tags":["IVR"],"summary":"Create CreateIvr","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/response.Response"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/blocks.BlockIvrRequest"}}},"description":"Create Ivr","required":true}}}},"components":{"schemas":{"response.Response":{"type":"object","properties":{"code":{"type":"integer"},"data":{},"status":{"type":"string"}}},"blocks.BlockIvrRequest":{"type":"object","properties":{"block":{"$ref":"#/components/schemas/request_mongo.BlockConfigRequest"},"config":{"$ref":"#/components/schemas/request_mongo.IvrRequest"}}},"request_mongo.BlockConfigRequest":{"type":"object","properties":{"first":{"type":"boolean"},"line_number":{"type":"string"},"name":{"type":"string"}}},"request_mongo.IvrRequest":{"type":"object","properties":{"enders":{"type":"string"},"exit_on_first_timeout":{"type":"boolean"},"ivr_details":{"type":"array","items":{"$ref":"#/components/schemas/request_mongo.IvrDetailsRequest"}},"maximum_error":{"type":"integer"},"maximum_length":{"type":"integer"},"minimum_length":{"type":"integer"},"on_error":{"description":"relazione con sound","type":"string"},"on_timeout":{"description":"relazione con sound","type":"string"},"prompt_audio":{"description":"relazione con sound","type":"string"},"replay_on_error":{"type":"boolean"},"timeout":{"type":"integer"}}},"request_mongo.IvrDetailsRequest":{"type":"object","properties":{"next_block":{"type":"string"},"number":{"type":"integer"}}}}}}
```

## Get Ivr.

> Return list of Ivr.

```json
{"openapi":"3.1.1","info":{"title":"Contact Center API","version":"1.0"},"servers":[{"url":"/api/pbx"}],"paths":{"/blocks/ivr/{id}":{"get":{"description":"Return list of Ivr.","tags":["IVR"],"summary":"Get Ivr.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/response.Response"}}}}}}}},"components":{"schemas":{"response.Response":{"type":"object","properties":{"code":{"type":"integer"},"data":{},"status":{"type":"string"}}}}}}
```

## Delete Ivr

> Remove Ivr data by id.

```json
{"openapi":"3.1.1","info":{"title":"Contact Center API","version":"1.0"},"servers":[{"url":"/api/pbx"}],"paths":{"/blocks/ivr/{id}":{"delete":{"description":"Remove Ivr data by id.","tags":["IVR"],"summary":"Delete Ivr","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/response.Response"}}}}}}}},"components":{"schemas":{"response.Response":{"type":"object","properties":{"code":{"type":"integer"},"data":{},"status":{"type":"string"}}}}}}
```

## Update Ivr

> Update Ivr data.

```json
{"openapi":"3.1.1","info":{"title":"Contact Center API","version":"1.0"},"servers":[{"url":"/api/pbx"}],"paths":{"/blocks/ivr/{id}":{"patch":{"description":"Update Ivr data.","tags":["IVR"],"summary":"Update Ivr","parameters":[{"schema":{"type":"string"},"description":"update Ivr by id","name":"psEndpointId","in":"path","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/response.Response"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/blocks.BlockIvrRequest"}}},"description":"Update Ivr","required":true}}}},"components":{"schemas":{"response.Response":{"type":"object","properties":{"code":{"type":"integer"},"data":{},"status":{"type":"string"}}},"blocks.BlockIvrRequest":{"type":"object","properties":{"block":{"$ref":"#/components/schemas/request_mongo.BlockConfigRequest"},"config":{"$ref":"#/components/schemas/request_mongo.IvrRequest"}}},"request_mongo.BlockConfigRequest":{"type":"object","properties":{"first":{"type":"boolean"},"line_number":{"type":"string"},"name":{"type":"string"}}},"request_mongo.IvrRequest":{"type":"object","properties":{"enders":{"type":"string"},"exit_on_first_timeout":{"type":"boolean"},"ivr_details":{"type":"array","items":{"$ref":"#/components/schemas/request_mongo.IvrDetailsRequest"}},"maximum_error":{"type":"integer"},"maximum_length":{"type":"integer"},"minimum_length":{"type":"integer"},"on_error":{"description":"relazione con sound","type":"string"},"on_timeout":{"description":"relazione con sound","type":"string"},"prompt_audio":{"description":"relazione con sound","type":"string"},"replay_on_error":{"type":"boolean"},"timeout":{"type":"integer"}}},"request_mongo.IvrDetailsRequest":{"type":"object","properties":{"next_block":{"type":"string"},"number":{"type":"integer"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://virtualcontact.gitbook.io/docs/developers/build-an-integration/contact-center-api/ivr.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
