Skip to main content
PUT
JavaScript

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

environmentId
string<uuid>
required

Body

application/json

Input for updating an environment. Only the fields sent are changed. Roark-curated environments cannot be edited.

name
string

Display name, shown wherever a flow variant references the environment

Minimum string length: 1
Example:

"Busy call centre"

description
string | null

Optional note on when to use this environment

Example:

"Open-plan office at peak hours"

backgroundNoise
enum<string>

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

Available options:
NONE,
AIRPORT,
CHILDREN_PLAYING,
CITY,
COFFEE_SHOP,
DRIVING,
OFFICE,
THUNDERSTORM
Example:

"OFFICE"

backgroundNoiseVolume
number
default:0.1

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.

Required range: 0 <= x <= 1
Example:

0.3

Response

The updated environment

data
object
required

A simulation environment: the ambient conditions a customer flow variant runs under. The list includes both your own and the ones Roark curates for every project.