Simulation Environment

Create an environment

Changed on

Creates an environment for the project: a noise bed and the level it plays at. Reference it by id when setting a customer flow variant's environment. Roark's curated presets always play at the default level, so this is how a project gets the same bed louder or quieter.

post/v1/simulation/environment

Request

  • Base URL
    https://api.roark.ai
  • URL
    https://api.roark.ai/v1/simulation/environment
  • Auth
    HTTP bearer

Request body

namestring required

Display name, shown wherever a flow variant references the environment

descriptionstring nullable

Optional note on when to use this environment

backgroundNoise'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'CONSTRUCTION' | 'CRYING_BABY' | 'DRIVING' | 'LIBRARY' | 'OFFICE' | 'THUNDERSTORM' | 'TRAIN' required

The noise bed played underneath the simulated caller. NONE plays nothing.

backgroundNoiseVolumenumber

How loud the bed plays, as a gain from 0 (silent) to 1 (as loud as the caller). Defaults to 0.1, which sits well under the caller. Ignored on Vapi endpoints, which have no level control.

Example request

{
  "name": "Busy call centre",
  "description": "Open-plan office at peak hours",
  "backgroundNoise": "OFFICE",
  "backgroundNoiseVolume": 0.3
}

Response

The created environment

Changes

    • warning

      added the new CONSTRUCTION enum value to the / response property for the response status

    • warning

      added the new CRYING_BABY enum value to the / response property for the response status

    • warning

      added the new LIBRARY enum value to the / response property for the response status

    • warning

      added the new TRAIN enum value to the / response property for the response status

    • info

      added the new CONSTRUCTION enum value to the request property

    • info

      added the new CRYING_BABY enum value to the request property

    • info

      added the new LIBRARY enum value to the request property

    • info

      added the new TRAIN enum value to the request property

    • info

      endpoint added