Simulation Environment

Update an environment

Changed on

Updates one of the project's environments. Only the fields sent are changed. Runs already built keep the snapshot they were built with. Roark-curated environments cannot be edited (403).

put/v1/simulation/environment/{environmentId}

Request

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

Path parameters

environmentIdstring uuid required

Request body

namestring

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'

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 updated 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